sparkfun / SparkFun_RTK_Firmware

Centimeter precision GPS/GNSS using L1/L2 signals broadcast over Bluetooth SPP (using the ESP32) in an easy to use enclosure.
https://docs.sparkfun.com/SparkFun_RTK_Firmware/
Other
82 stars 47 forks source link

Firmware 1.10 update Facet failure #79

Closed rrodas64 closed 2 years ago

rrodas64 commented 2 years ago

I have updated the Face RTK firmware to version 1.10 from the RTK_Surveyor_Firmware_v1_10.bin file. When I turn on the unit it shows the welcome screen, as shown in the first photo, but then it shows the message GNSS Failed, as shown in the second photo. I have tried to connect Facet to my laptop through the USB port. The ch340 port shows up for a few seconds and then Facet shuts down and the port disappears. Can you help me please? I was scheduled to use Facet at work the following week and now it's a brick

IMG_20220218_194743 IMG_20220218_194749

nseidle commented 2 years ago

Thanks for reporting. I'm sorry something went wrong. If you need to downgrade a unit and you are unable to access the firmware menu, rename the firmware file to 'RTK_Surveyor_Firmware_Force.bin' on the SD card. For example, rename RTK_Surveyor_Firmware_v19.bin to RTK_Surveyor_Firmware_Force.bin, re-insert the SD card into the unit and power cycle the unit. You should see 'Forced Update'. Upon completion the unit will also factory reset, and delete the RTK_Surveyor_Firmware_Force.bin file from the card.

rrodas64 commented 2 years ago

Thank you for your quick response. Could you please provide link to download RTK_Surveyor_Firmware_v19.bin?

nseidle commented 2 years ago

No problem. Binaries are listed here. v1.9 is here.

rrodas64 commented 2 years ago

I did the procedure and it does not show 'Forced Update' Still welcome screen fallowed by 'GNSS Failed'

nseidle commented 2 years ago

Using this process I was able to load an Express from v1.9 to v1.10 and v1.8 to v1.9. I think it should be working. Be sure the file name is 'RTK_Surveyor_Firmware_Force.bin'. Unfortunately I won't have a Facet until Tuesday but the hardware is nearly identical.

image

rrodas64 commented 2 years ago

I don't know if it matters, but before installing version 1.10 Facet had the version 1.10 DEV that you provided me with, and it worked fine. Could this be an issue? If you provide me with version 1.10 DEV I could try downgrading with it.

nseidle commented 2 years ago

before installing version 1.10 Facet had the version 1.10 DEV that you provided me with, and it worked fine.

Good to know. We moved the settings RAM array quite a bit. Your unit has corrupt settings.

Things to try:

rrodas64 commented 2 years ago

Ohhh. I delete all the files in the SD, and just leave the firmware file. Do you have any setting file that I can use?

nseidle commented 2 years ago

No worries. Give this a try. SFE_Facet_Settings.txt

(Edit) Sorry, my mistake. Make sure the file name is 'SFE_Facet_Settings.txt' so that the unit identifies it correctly.

rrodas64 commented 2 years ago

Still not working. :( Y rename de file to 'SFE_Facet_Settings.txt' and the content is: sizeOfSettings=-1 rtkIdentifier=25 rtkFirmwareVersion=v1.9-Dec 7 2021 zedFirmwareVersion=HPG 1.30

nseidle commented 2 years ago

Let's get some debug information. Please installed TeraTerm or the terminal of your choice.

Please see what COM port your unit comes online when powered by opening the 'Device Manager' in windows:

image

My unit is COM12. Your unit will likely be different. Once you have the port, please use TeraTerm to open that port.

image

With the Facet attached to your computer, and the unit powered, please open TeraTerm to that com port. It should connect and produce serial information. Power cycle the Facet. Please post the serial output.

rrodas64 commented 2 years ago

I already have installed TerraTern. As I mention before, when connect the usb cable to my laptop, serial port 20 is enabled momentarily, but immediately Facet shuts down and I can't query port 20 with TerraTern.

rrodas64 commented 2 years ago

OK. I use different Laptop and get to query port. Following the serial output (Facet without SD): ZED-F9P firmware: HPG 1.13 SparkFun RTK Facet v1.10-Feb 18 2022 SD init failed. Trying again 1 out of 1 SD init failed. Is card present? Formatted? Config file read failed: SD offline MAX17048 configuration complete Batt (91%): Voltage: 4.12V Charging: 1.25%/hr Green getMessageSetting failed: Class-0x45 ID-0x4D getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x4E ID-0x4F getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 Module failed initial config. Module failed to save. Failed to configure module. Trying again. getMessageSetting failed: Class-0x45 ID-0x4D getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x4E ID-0x4F getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 Module failed initial config. Module failed to save. Failed to configure module. Hard stop.

rrodas64 commented 2 years ago

Por output with SD Installed in Facet

ZED-F9P firmware: HPG 1.13 SparkFun RTK Facet v1.10-Feb 18 2022 SD init failed. Trying again 1 out of 1 SD init failed. Is card present? Formatted? Config file read failed: SD offline MAX17048 configuration complete Batt (91%): Voltage: 4.13V Charging: 0.83%/hr Green getMessageSetting failed: Class-0x45 ID-0x4D getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x4E ID-0x4F getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 Module failed initial config. Module failed to save. Failed to configure module. Trying again. getMessageSetting failed: Class-0x45 ID-0x4D getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x56 ID-0x41 getMessageSetting failed: Class-0x4E ID-0x4F getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x4D ID-0x49 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 getMessageSetting failed: Class-0x43 ID-0x54 Module failed initial config. Module failed to save. Failed to configure module. Hard stop.

nseidle commented 2 years ago
Por output with SD Installed in Facet

ZED-F9P firmware: HPG 1.13
SparkFun RTK Facet v1.10-Feb 18 2022
SD init failed. Trying again 1 out of 1
SD init failed. Is card present? Formatted?
Config file read failed: SD offline
MAX17048 configuration complete

It seems the SD card is not being opened. Please format your card using SD Formatter and try loading the settings file with the -1 again. Try a different SD card. We need the unit to be able to read a card.

rrodas64 commented 2 years ago

Hi: Thank you for your continued support, even on the weekend. I have tried 4 SD of different brands, being 3 of them new, I have formatted them using SD Formatter, and I have not been successful with SD reading and resetting Facet. The above makes me assume that there is a hardware issue. I would prefer to send the unit to Sparkfun for inspection and repairs. Could you tell me what is the procedure to do it?

nseidle commented 2 years ago

For sure! Again, sorry the unit is giving you problems.

I am happy to have you return the unit at any time. If you are willing, I have a few more things we could try.

You have serial access, so we can skip the SD card entirely. There are directions here. You will need all the files in that directory and the /bin/ sub folder. Basically, make sure the unit is on, USB cable attached, you should know your COM port by now, and run this at a command prompt from the /Binaries/ folder:

esptool.exe --chip esp32 --port COM12 --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.ino.partitions.bin 0xe000 ./bin/boot_app0.bin 0x10000 ./RTK_Surveyor_Firmware_v18.bin

Where COM12 is whatever COM port you have, and RTK_Surveyor_Firmware_v18.bin is whatever firmware you'd like to go to. For now, I think v18 or v19 is fine. Eventually, I'll get you to v1.10.

nseidle commented 2 years ago

Ok, I think I know the problem. There is a setting that controls the SPI frequency. We moved the location of this setting. Normally, when a unit has new settings (ie, new firmware) the unit will automatically erase itself and apply the new settings. Your unit for reasons I have not entirely understood, is not clearing the settings, and instead applying a very wrong SPI frequency setting. It may be exceedingly large, 0, 1, or some other fairly illegal value. This causes SPI to break and SD to fail to mount. The solution is to clear settings any time a new firmware is applied.

Please continue with recovery via serial to v1.8 or v1.9. I'll get an updated v1.10 posted soon.

nseidle commented 2 years ago

The plot thickens. This line has the following code:

//Check that the rtkIdentifier is correct
//(It is possible for two different versions of the code to have the same sizeOfSettings - which causes problems!)
int tempIdentifier = 0;
EEPROM.get(sizeof(int), tempIdentifier); //Load the identifier from the EEPROM location after sizeOfSettings (int)
if (tempIdentifier != RTK_IDENTIFIER)
{
  Serial.printf("Settings are not valid for this variant of RTK %s. Default settings applied.\n\r", platformPrefix);
  recordSystemSettings(); //Record default settings to EEPROM and config file. At power on, settings are in default state
}

This code is meant to safeguard against new versions being incompatible with old settings. The old settings are cleared and set to the new settings. You just happened to be unfortunate enough to have had v1.10-DEV installed. The unit thought it was fine, and did not clear its settings. The settings were in fact wildly different between v1.10-DEV and v1.10 (release). I'm sorry you got caught in the middle.

I suspect you will be able to load v1.8 and then start the unit just fine. Then, if you trust me ;), update to v1.10 using the same serial port method. Then start the unit. All settings should clear and you should be good. I have just done this with my hardware and upon starting v1.10 the unit correctly detects the flawed settings, does a factory reset, then correctly starts.

rrodas64 commented 2 years ago

I did procedure advised, following the comand prompt prints:

D:\Binaries>esptool.exe --chip esp32 --port COM7 --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.ino.partitions.bin 0xe000 ./bin/boot_app0.bin 0x10000 ./RTK_Surveyor_Firmware_v18.bin esptool.py v3.1 Serial port COM7 Connecting..... Chip is ESP32-D0WD-V3 (revision 3) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 40:f5:20:57:9e:74 Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed. Configuring flash size... Auto-detected Flash size: 16MB Flash will be erased from 0x00001000 to 0x00005fff... Flash will be erased from 0x00008000 to 0x00008fff... Flash will be erased from 0x0000e000 to 0x0000ffff... Flash will be erased from 0x00010000 to 0x001cefff... Flash params set to 0x024f Compressed 17984 bytes to 12318... Wrote 17984 bytes (12318 compressed) at 0x00001000 in 0.4 seconds (effective 354.1 kbit/s)... Hash of data verified. Compressed 3072 bytes to 129... Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.0 seconds (effective 524.4 kbit/s)... Hash of data verified. Compressed 8192 bytes to 47... Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 699.1 kbit/s)... Hash of data verified. Compressed 1830384 bytes to 1175192... Wrote 1830384 bytes (1175192 compressed) at 0x00010000 in 18.6 seconds (effective 786.4 kbit/s)... Hash of data verified.

Leaving... Hard resetting via RTS pin...

D:\Binaries>

rrodas64 commented 2 years ago

Facet shuts down immediately and when I turn it on it displays 'Sparkfun RTK Facet 1.8' then Shows 'Rover Failed'

rrodas64 commented 2 years ago

This is the Terra Term Display when Power cycle: ZED-F9P firmware: HPG 1.13 SparkFun RTK Facet v1.8-Oct 7 2021 SD init failed. Trying again 1 out of 2 SD init failed. Trying again 2 out of 2 SD init failed. Is card present? Formatted? Settings are not valid for this variant of RTK Facet. Default settings applied. Config file read failed: SD offline MAX17048 configuration complete Batt (89%): Voltage: 4.11V Discharging: -2.08%/hr Green locateGNSSID failed: 78 locateGNSSID failed: 78 GNSS configuration complete Accelerometer configuration complete setDynamicModel failed Set Nav Rate failed Rover config failed Batt (89%): Voltage: 4.11V Discharging: -2.08%/hr Green FreeHeap: 179371 / HeapLowestPoint: 133020 / LargestBlock: 65524 setDynamicModel failed Set Nav Rate failed Rover config failed FreeHeap: 179371 / HeapLowestPoint: 133020 / LargestBlock: 65524 setDynamicModel failed Set Nav Rate failed Rover config failed Batt (89%): Voltage: 4.11V Discharging: -2.08%/hr Green FreeHeap: 179371 / HeapLowestPoint: 133020 / LargestBlock: 65524 setDynamicModel failed Set Nav Rate failed Rover config failed FreeHeap: 179371 / HeapLowestPoint: 133020 / LargestBlock: 65524 setDynamicModel failed Set Nav Rate failed Rover config failed Batt (89%): Voltage: 4.11V Discharging: -2.08%/hr Green FreeHeap: 179371 / HeapLowestPoint: 133020 / LargestBlock: 65524 setDynamicModel failed

nseidle commented 2 years ago

Ok this is turning into an interesting challenge. Again, feel free to stop anytime; we can fix it if you send it back to us.

Let's erase the entire ESP32. This will remove any settings, as well as the firmware.

esptool --port com8 erase_flash

This command takes ~51 seconds to complete. Once finished, reload the firmware (I copied from your input above)

esptool.exe --chip esp32 --port COM7 --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.ino.partitions.bin 0xe000 ./bin/boot_app0.bin 0x10000 ./RTK_Surveyor_Firmware_v18.bin

If that doesn't work, we will get u-center and factory reset the ZED-F9P.

rrodas64 commented 2 years ago

It works!!!! And I also succesfull update to firmware 1.10. Thank You a Lot for your Support

rrodas64 commented 2 years ago

Oh oh. Now the power/setup botton does not work I can't shutdown the unit

nseidle commented 2 years ago

Well, I guess that's progress :)

When the unit turns on is it correctly saying 'RTK Facet' during the splash screen?

Holding the power button for 10+ seconds should hard shut off the power.

rrodas64 commented 2 years ago

That''s right, it was show 'RTK Facet V1.10'. right now is in rover mode and pressing power button for 10+ seconds do nothing. Still in rover mode. and can't change mark/rover/base/config,

nseidle commented 2 years ago

The power button is not connected to software and should not be affected by firmware. Unfortunately it sounds like something has broken. Please let me know your order number and we'll start a replacement.

rrodas64 commented 2 years ago

OK, my order number is 6740243

nseidle commented 2 years ago

@rrodas64 Was able to fix it himself! Nice work!

I remembered that when I was doing the firmware update the SD memory accidentally went inside the unit and I had to open it to take it out. I have reopened the unit to check if something had gone wrong when I reassembled it, I noticed that the power button ribbon had been pressed and that it did not make good contact. I have placed the ribbon in a better position and now the button works properly. Thanks for the RMA, but I won't need it.