Surveyor: / Express: / Express Plus: / Facet: / Facet L-Band: / Reference Station:
The device has two primary firmwares:
The device firmware is displayed in a variety of places:
RTK Express with firmware v3.0
During power-on, the display will show the current device Firmware.
Main Menu showing RTK Firmware v3.0-Jan 19 2023
The firmware is displayed when the main menu is opened over a serial connection.
WiFi Config page showing device firmware v2.7 and ZED-F9P firmware HPG 1.32
The firmware is shown at the top of the WiFi config page.
From time to time SparkFun will release new firmware for the RTK product line to add and improve functionality. For most users, firmware can be upgraded over WiFi using the OTA method.
The OTA method is generally recommended. For more information see here.
Remember, all SparkFun RTK devices are open source hardware meaning you have total access to the firmware and hardware. Be sure to check out each repo for the latest firmware and hardware information.
Updating Firmware Over-The-AirUpdating the firmware via WiFi config page
Updating the firmware via Firmware serial menu
Introduced with version 3.0, firmware can be updated by pressing a button in the System Configuration section of the WiFi Config page, or over the Firmware menu of the serial interface. This makes checking and upgrading a unit very easy.
Additionally, users may opt into checking for Beta firmware. This is the latest firmware that may have new features and is meant for testing. Beta firmware is not recommended for units deployed into the field as it may not be stable.
If you have a device with firmware lower than v3.0, you will need to use the GUI or a method listed below to get to v3.x.
With version 3.10 automatic release firmware update is supported over WiFi. Enabling this feature is done using the serial firmware menu. The polling period is speified in minutes and defaults to once a day. The automatic firmware update only checks for and installs the current SparkFun released firmware versions over top of any:
RTK Firmware GUI
This GUI makes it easy to point and click your way through a firmware update. There are versions for Windows, Linux, MacOS and a Python package installer.
The latest GUI release can be downloaded here.
Download the latest RTK firmware binary file located on the releases page or from the binaries repo.
To Use
/dev
.Device Manager showing 'USB-Serial CH340' port on COM27
Once complete, the device will reset and power down.
If your RTK 'freezes' after the update, press Reset ESP32
to get it going again.
Firmware update taking place
Download the latest binary file located on the releases page or from the binaries repo.
The firmware upgrade menu will only display files that have the "RTK_Surveyor_Firmware*.bin" file name format so don't change the file names once loaded onto the SD card. Select the firmware you'd like to load and the system will proceed to load the new firmware, then reboot.
Note: The firmware is called RTK_Surveyor_Firmware_vXX.bin
even though there are various RTK products (Facet, Express, Surveyor, etc). We united the different platforms into one. The RTK Firmware runs on all our RTK products.
In the rare event that a unit is not staying on long enough for new firmware to be loaded into a COM port, the RTK Firmware (as of version 1.2) has an override function. If a file named RTK_Surveyor_Firmware_Force.bin is detected on the SD card at boot that file will be used to overwrite the current firmware, and then be deleted. This update path is generally not recommended. Use the GUI or WiFi OTA methods as the first resort.
Updating Firmware From WiFiNote: Firmware versions 1.1 to 1.9 have an issue that severely limits firmware upload over WiFi and is not recommended; use the GUI method instead. Firmware versions v1.10 and beyond support direct firmware updates via WiFi.
Firmware may be uploaded to the unit by clicking on 'Upload BIN', selecting the binary such as 'RTK_Surveyor_Firmware_v3_x.bin' and pressing upload. The unit will automatically reset once the firmware upload is complete.
Updating Firmware From CLIThe command-line interface is also available. You’ll need to download the RTK Firmware Binaries repo. This repo contains the binaries but also various supporting tools including esptool.exe and the three binaries required along with the firmware (bootloader, partitions, and app0).
WindowsConnect a USB A to C cable from your computer to the ESP32 port on the RTK device. Turn the unit on. Now identify the COM port the RTK enumerated at. The easiest way to do this is to open the Device Manager:
CH340 is on COM6 as shown in Device Manager
If the COM port is not showing be sure the unit is turned On. If an unknown device is appearing, you’ll need to install drivers for the CH340. Once you know the COM port, open a command prompt (Windows button + r then type ‘cmd’).
batch_program.bat running esptool
Once the correct COM is identified, run 'batch_program.bat' along with the binary file name and COM port. For example batch_program.bat RTK_Surveyor_Firmware_v2_0.bin COM6. COM6 should be replaced by the COM port you identified earlier.
The batch file runs the following commands:
esptool.exe --chip esp32 --port COM6 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 ./bin/RTK_Surveyor.ino.bootloader.bin 0x8000 ./bin/RTK_Surveyor_Partitions_16MB.bin 0xe000 ./bin/boot_app0.bin 0x10000 ./RTK_Surveyor_Firmware_vxx.bin
Where COM6 is replaced with the COM port that the RTK product enumerated at and RTK_Surveyor_Firmware_vxx.bin is the firmware you would like to load.
Note: Some users have reported the 921600bps baud rate does not work. Decrease this to 115200 as needed.
Upon completion, your RTK device will reset and power down.
macOS / LinuxGet esptool.py. Connect a USB A to C cable from your computer to the ESP32 port on the RTK device. Turn the unit on. Now identify the COM port the RTK enumerated at.
If the COM port is not showing be sure the unit is turned On. If an unknown device is appearing, you’ll need to install drivers for the CH340. Once you know the COM port, run the following command:
py esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 ./bin/RTK_Surveyor.ino.bootloader.bin 0x8000 ./bin/RTK_Surveyor_Partitions_16MB.bin 0xe000 ./bin/boot_app0.bin 0x10000 ./RTK_Surveyor_Firmware_vxx.bin
Where /dev/ttyUSB0 is replaced with the port that the RTK product enumerated at and RTK_Surveyor_Firmware_vxx.bin is the firmware you would like to load.
Note: Some users have reported the 921600bps baud rate does not work. Decrease this to 115200 as needed.
Upon completion, your RTK device will reset and power down.
Updating 4MB SurveyorsRTK Surveyors sold before September 2021 may have an ESP32 WROOM module with 4MB flash instead of 16MB flash. These units still support all the functionality of other RTK products with the following limitations:
The GUI (as of v1.3) will autodetect the ESP32's flash size and load the appropriate partition file. No user interaction is required.
If you are using the CLI method, be sure to point to the 4MB partition file. For example:
esptool.exe --chip esp32 --port COM6 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 ./bin/RTK_Surveyor.ino.bootloader.bin 0x8000 ./bin/**RTK_Surveyor_Partitions_4MB**.bin 0xe000 ./bin/boot_app0.bin 0x10000 ./RTK_Surveyor_Firmware_vxx.bin
Determining The Size of Flash
To determine if the device has a 4MB module:
The following products contain the following u-blox receivers:
The firmware loaded onto the ZED-F9P, ZED-F9R, and NEO-D9S receivers is written by u-blox and can vary depending on the manufacture date. The RTK Firmware (that runs on the ESP32) is designed to flexibly work with any u-blox firmware. Upgrading the ZED-F9x/NEO-D9S is a good thing to consider but is not crucial to the use of RTK products.
Not sure what firmware is loaded onto your RTK product? Open the System Menu to display the module's current firmware version.
The firmware on u-blox devices can be updated using a Windows-based GUI or u-center. A CLI method is also possible using the ubxfwupdate.exe
tool provided with u-center. Additionally, u-blox offers the source for the ubxfwupdate tool that is written in C. It is currently released only under an NDA so contact your local u-blox Field Applications Engineer if you need a different method.
SparkFun RTK u-blox Firmware Update Tool
The SparkFun RTK u-blox Firmware Update Tool is a simple Windows GUI and python script that runs the ubxfwupdate.exe tool. This allows users to directly update module firmware without the need for u-center. Additionally, this tool queries the module to verify that the firmware type matches the module. Because the RTK Facet L-Band contains two u-blox modules that both appear as identical serial ports, it can be difficult and perilous to know which port to load firmware. This tool prevents ZED-F9P firmware from being accidentally loaded onto a NEO-D9S receiver and vice versa.
The SparkFun RTK u-blox Firmware Update Tool will only run on Windows as it relies upon u-blox's ubxfwupdate.exe
. The full, integrated executable for Windows is available here.
Device Manager showing USB Serial port on COM14
Once complete, the u-blox module will restart.
Updating Using u-centerIf you're familiar with u-center a tutorial with step-by-step instructions for locating the firmware version as well as changing the firmware can be found in How to Upgrade Firmware of a u-blox Receiver.
ZED-F9P Firmware ChangesThis module is used in the Surveyor, Express, and Facet. It is capable of both Rover and base modes.
Most of these binaries can be found in the ZED Firmware/ZED-F9P folder.
All field testing and device-specific performance parameters were obtained with ZED-F9P v1.30.
v1.12 has the benefit of working with SBAS and an operational RTK status signal (the LED illuminates correctly). See release notes.
v1.13 has a few RTK and receiver performance improvements but introduces a bug that causes the RTK Status LED to fail when SBAS is enabled. See release notes.
v1.30 has a few RTK and receiver performance improvements, I2C communication improvements, and most importantly support for SPARTN PMP packets. See release notes.
v1.32 has a few SPARTN protocol-specific improvements. See release notes. This firmware is required for use with the NEO-D9S and the decryption of PMP messages.
This module is used in the Express Plus. It contains an internal IMU and additional algorithms to support high-precision location fixes using dead reckoning. The ZED-F9R is not capable of operating in base mode.
Most of these binaries can be found in the ZED Firmware/ZED-F9R folder.
v1.00 Initial release.
v1.21 SPARTN support as well as adding E-scooter and robotic lawnmower dynamic models. See release notes.
This module is used in the Facet L-Band to receive encrypted PMP messages over ~1.55GHz broadcast via a geosynchronous Inmarsat.
This binary file can be found in the NEO Firmware folder.
As of writing, no additional releases of the NEO-D9S firmware have been made.
Compiling Source WindowsThe SparkFun RTK firmware is compiled using Arduino (currently v1.8.15). To compile:
Install Arduino.
Install ESP32 for Arduino. Here are some good instructions for installing it via the Arduino Boards Manager. Note: Use v2.0.2 of the core. Note: We use the 'ESP32 Dev Module' for pin numbering. Select the correct board under Tools->Board->ESP32 Arduino->ESP32 Dev Module.
Change the Partition table. Replace
C:\Users\\[user name]\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\tools\partitions\app3M_fat9M_16MB.csv
with the app3M_fat9M_16MB.csv file found in the Firmware folder. This will increase the program partition from a maximum of 1.9MB to 3MB.
From the Arduino IDE, set the core settings from the Tools menu:
A. Set the 'Partition Scheme' to 16M Flash (3MB APP/9MB FATFS). This will use the 'app3M_fat9M_16MB.csv' updated partition table.
B. Set the 'Flash Size' to 16MB (128mbit)
Obtain all the required libraries.
Once compiled, firmware can be uploaded directly to a unit when the RTK unit is on and the correct COM port is selected under the Arduino IDE Tools->Port menu.
If you are seeing the error:
text section exceeds available space ...
You have not replaced the partition file correctly. See the 'Change Partition table' step inside the Windows instructions.
Note: There are a variety of compile guards (COMPILE_WIFI, COMPILE_AP, etc) at the top of RTK_Surveyor.ino that can be commented out to remove them from compilation. This will greatly reduce the firmware size and allow for faster development of functions that do not rely on these features (serial menus, system configuration, logging, etc).
Required LibrariesNote: You should click on the link next to each of the #includes at the top of RTK_Surveyor.ino within the Arduino IDE to open the library manager and download them. Getting them directly from Github also works but may not be 'official' releases.
Using the library manager in the Arduino IDE, for each of the libraries below:
1. Locate the library by typing the libary name into the search box
2. Click on the library
3. Select the version listed in the compile-rtk-firmware.yml file for the [main](https://github.com/sparkfun/SparkFun_RTK_Firmware/blob/main/.github/workflows/compile-rtk-firmware.yml) or the [release_candidate](https://github.com/sparkfun/SparkFun_RTK_Firmware/blob/release_candidate/.github/workflows/compile-rtk-firmware.yml) branch
4. Click on the Install button in the lower right
The RTK firmware requires the following libraries:
* [Arduino JSON](https://github.com/bblanchon/ArduinoJson)
* [ESP32Time](https://github.com/fbiego/ESP32Time)
* [ESP32 BleSerial](https://github.com/avinabmalla/ESP32_BleSerial)
* [ESP32-OTA-Pull](https://github.com/mikalhart/ESP32-OTA-Pull)
* Ethernet
* [JC_Button](https://github.com/JChristensen/JC_Button)
* [PubSub Client for MQTT](https://github.com/knolleary/pubsubclient)
* [SdFat](https://github.com/greiman/SdFat)
* [SparkFun LIS2DH12 Arduino Library](https://github.com/sparkfun/SparkFun_LIS2DH12_Arduino_Library)
* [SparkFun MAX1704x Fuel Gauge Arduino Library](https://github.com/sparkfun/SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library)
* [SparkFun u-blox GNSS v3](https://github.com/sparkfun/SparkFun_u-blox_GNSS_v3)
* [SparkFun_WebServer_ESP32_W5500](https://github.com/SparkFun/SparkFun_WebServer_ESP32_W5500)
The following libraries are only available via GitHub:
* [AsyncTCP](https://github.com/me-no-dev/AsyncTCP) (not available via library manager)
* [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) (not available via library manager)
* [SparkFun Micro OLED Breakout](https://github.com/sparkfun/SparkFun_Micro_OLED_Arduino_Library)
Ubuntu 20.04 Virtual Machine
Execute the following commands to create the Linux virtual machine:
Using a browser, download the Ubuntu 20.04 Desktop image
virtualbox
Install Ubuntu 20.04
Log into Ubuntu
Click on Activities
Type terminal into the search box
Optionally install the SSH server
In the terminal window
Write down the IP address
On the PC
Execute the following commands to create the build environment for the SparkFun RTK Firmware:
sudo shutdown -r 0
Reboot to ensure that the dialout privilege is available to the user
sudo apt update
nano serial-port.sh
Insert the following text into the file:
#!/bin/bash
# serial-port.sh
#
# Shell script to read the serial data from the RTK Express ESP32 port
#
# Parameters:
# 1: ttyUSBn
#
sudo minicom -b 115200 -8 -D /dev/$1 < /dev/tty
chmod +x serial-port.sh
nano new-firmware.sh
Insert the following text into the file:
#!/bin/bash
# new-firmware.sh
#
# Shell script to load firmware into the RTK Express via the ESP32 port
#
# Parameters:
# 1: ttyUSBn
# 2: Firmware file
#
sudo python3 ~/SparkFun/RTK_Binaries/Uploader_GUI/esptool.py --chip esp32 --port /dev/$1 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect \
0x1000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor.ino.bootloader.bin \
0x8000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor_Partitions_16MB.bin \
0xe000 ~/SparkFun/RTK_Binaries/bin/boot_app0.bin \
0x10000 $2
chmod +x new-firmware.sh
nano new-firmware-4mb.sh
Insert the following text into the file:
#!/bin/bash
# new-firmware-4mb.sh
#
# Shell script to load firmware into the 4MB RTK Express via the ESP32 port
#
# Parameters:
# 1: ttyUSBn
# 2: Firmware file
#
sudo python3 ~/SparkFun/RTK_Binaries/Uploader_GUI/esptool.py --chip esp32 --port /dev/$1 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect \
0x1000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor.ino.bootloader.bin \
0x8000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor_Partitions_4MB.bin \
0xe000 ~/SparkFun/RTK_Binaries/bin/boot_app0.bin \
0x10000 $2
chmod +x new-firmware-4mb.sh
Get the SparkFun RTK Firmware sources
mkdir ~/SparkFun/RTK
git clone https://github.com/sparkfun/SparkFun_RTK_Firmware .
Get the SparkFun RTK binaries
mkdir ~/SparkFun/RTK_Binaries
git clone https://github.com/sparkfun/SparkFun_RTK_Firmware_Binaries.git .
Install the Arduino IDE
mkdir ~/SparkFun/arduino
sudo ./install.sh
Add the ESP32 support
Arduino
Get the required external libraries, then add to the Sketchbook location from above
cd ~/Arduino/libraries
git clone https://github.com/me-no-dev/ESPAsyncWebServer .
Connect the Config ESP32 port of the RTK to a USB port on the computer
ls /dev/ttyUSB*
Enable the libraries in the Arduino IDE
Arduino
Select the ESP32 development module
Load the required libraries
For each of the following libraries:
Library List:
Click on the Close button
Select the terminal port
Setup the partitions for the 16 MB flash
cd ~/SparkFun/RTK/
The firmware can be compiled using Arduino CLI. This makes compilation fairly platform independent and flexible. All release candidates and firmware releases are compiled using Arduino CLI using a github action. You can see the source of the action here, and use it as a starting point for Arduino CLI compilation.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4