Just to follow-up on this, and only for interest:
It is possible to update the X20P via I2C. But, you need a board to act as the USB to I2C interface, emulating a UART interface. And you need to be careful with the I2C bus speed and hence the emulated Baud rate. The following worked for me:
- Using a SparkFun ESP32 Thing Plus USB-C
- Using the I2C Serial Passthrough example from the SparkFun u-blox GNSS v3 library
- Replace the start of
setup()with the following, to select 38400 Baud and 100kHz bus speed:
void setup()
{
delay(2000); // Wait for ESP32 and GNSS to start up
mySerial.begin(38400); // Baud rate for u-center
myWire.begin(); // Start I2C
myWire.setClock(100000); // 100kHz
- Connect the Thing Plus to your Windows PC over USB
- Upload the modified sketch onto the Thing Plus - using the Arduino IDE
- Use a Qwiic cable to connect the Thing Plus to the X20P Breakout
- Be careful with I2C pull-ups. The X20P has built-in active pull-ups on the I2C bus. Additional external pull-ups can cause problems.
- If you open a serial console / terminal emulator at 38400 Baud, you should see the standard NMEA stream from the X20P. You may need to reset the ESP32 before you see any NMEA. Close the serial console / terminal emulator afterwards!
- Run the u-blox UBX Firmware Update executable (ubxfwupdate.exe) from a command prompt. ubxfwupdate.exe is installed with u-center.
- I have the Thing Plus connected as COM10. I called ubxfwupdate.exe with:
"C:\Program Files (x86)\u-blox\u-center_v25.03\ubxfwupdate.exe" -p \\.\COM10 -b 38400:38400:38400 --no-fis 1 -s 1 -v 2 --fast 1 --max-num 1 -C 1 -t 0 "C:\Users\pc235\Documents\GNSS\UBX_20_HPG_202_ZED_F20P.329facb56ce18631d607fe15177834dc.bin"
- The update takes about 5 minutes to complete:
----------CMD line arguments-----------
Image file: C:\Users\pc235\Documents\GNSS\UBX_20_HPG_202_ZED_F20P.329facb56ce18631d607fe15177834dc.bin
Flash: <compiled-in>
Fis: flash.xml
Port: \\.\COM10
Baudrates: 38400/38400/38400
Safeboot: 1
Reset: 1
AutoBaud: 0
Verbose: 2
Erase all: 1
Erase only: 0
Training sequence: 0
Chip erase: 1
Merging FIS: 1
Update RAM: 0
Use USB alt: 0
---------------------------------------
0.0 u-blox Firmware Update Tool version 24.11
0.0 Updating Firmware 'C:\Users\pc235\Documents\GNSS\UBX_20_HPG_202_ZED_F20P.329facb56ce18631d607fe15177834dc.bin' of receiver over '\\.\COM10'
0.0 - Opening and buffering image file
0.0 - Verifying image
0.0 - Got an encrypted image with footer info
0.0 - CRC Value : 737F7768
0.0 - Footer Version : 1
0.0 - Number of Images : 2
0.0 - Footer Size : 28
0.0 - Image Config Size : 40
0.0 - Image 0 Size : 668336
0.0 - Image 1 Size : 426320
0.0 - Trying to open port \\.\COM10
0.0 - Setting baudrate to 38400
0.3 - Received Version information
0.3 - Receiver currently running SW 'ROM LDR 1.00 (d225d8)'
0.3 - Receiver HW '000B0000', Generation 20.0
0.3 - Sending ROM CRC Poll
0.3 ROM CRC: 0x22018AE9
0.3 u-blox20 ROM1.00 hardware detected (0x22018AE9)
0.3 Getting Port connection to receiver
2.2 - Connected port is: I2C
2.2 Starting LDR TSK
2.2 - LDR TSK started successfully
2.2 Identify flash loader
2.3 - Uploader version 5.3 detected
2.3 Detecting Flash manufacturer and device IDs
2.3 - Flash ManId: 0x009D DevId: 0x6016
2.4 - Not merging anything
2.4 - Flash size: 4194304
2.4 - Flash block: 1024 x 4096
2.4 Stable clock enabled successfully
2.5 - Setting baudrate to 38400
2.8 Start Flash retention
3.9 - flash retention success
3.9 Chip erase started
3.9 Receiver info collected, downloading to flash...
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
max retries: e: 0( 0) w: 0( 0)
311.2 FW download complete
311.2 Verifying Image on hardware
313.6 Firmware Verification and Flash update complete
313.6 Verify Flash retention
313.6 flash retention success
313.6 Rebooting receiver
313.6 Firmware Update SUCCESS
313.6 - Transfer time duration: 313.639404 sec
Like I say, this is purely for interest. I’m not recommending you update your X20P this way. I’m just saying that it is possible. It could be useful if I2C is your only option.
If anything goes wrong during the update, turn the GNSS off and back on again, and start again. The process is very robust. The GNSS will only apply the firmware update if it passes verification.
Enjoy!
Paul