stratux icon indicating copy to clipboard operation
stratux copied to clipboard

GPS invalid checksum

Open thomay86 opened this issue 8 months ago • 7 comments

Hi everyone,

I just updated my Stratux setup from version 1.6r1-eu028 (32d5e58) to 1.6r1-eu032 (ff1f01d). Besides an - I suppose unrelated - issue with the baro sensor ([https://github.com/stratux/stratux/issues/371]) I have troubles with the GPS (ublox M8N-0-10 chip on a GY-GPSV3-NEO board) now:

After booting, I receive an initial GPS fix for my actual location, then it drops out and goes to 'not communicating'/'disconnected' state on the status page. The log typically looks like this:

2024/08/25 18:43:13 GPS - device detected at serial port /dev/serial0, assuming this is an ublox device, configuring as generic ublox:
2024/08/25 18:43:13 GPS - chip: generic ublox, device: /dev/serial0, baudrate: 115200
2024/08/25 18:43:13 GPS - consider to configure this device manually in /boot/firmware/stratux.conf for optimal performance
2024/08/25 18:43:22 GPS - successfully opened serial port /dev/serial0 with baud 9600   (Valid NMEA msg received)
2024/08/25 18:44:58 GPS error. Invalid NMEA string: Checksum failed. Calculated 0X82; expected 0X63 [the hex values differ]
2024/08/25 18:45:00 GPS error. Invalid NMEA string: Invalid checksum

With manual configuration enabled in stratux.conf ("GpsManualConfig": true, "GpsManualDevice": "/dev/ttyS0", "GpsManualChip": "ublox", "GpsManualTargetBaud": 38400 [also tried 9600 and 115200]) the same issue of invalid checksum persists.

As I understand the GPS fix (more precise: the time information?) is needed for OGN to decode the FLARM protocol. Is this initial GPS fix sufficient or will OGN stop working some time after because of the missing GPS? I could live with the missing position data, since I use my tablet GPS for navigation but I want to make sure that OGN doesn't stop working silently in the background.

Thanks, Thomas

thomay86 avatar Apr 25 '25 14:04 thomay86

This is quite interesting. I have a Lilygo T-Beam v1.2 with a SX1262 module, that also has a M8N GPS chip. I'm currently running SoftRF on it (I haven't flashed OGN-Tracker yet). However, once the GPS acquires a fix, the OGN decode kicks off, but then my T-Beam dies - the red GPS light turns off and and GPS data is no longer sent to Stratux, at least that's how it seems in the web interface. I've also tried manually configuring the GPS in the stratux.conf file, but it makes no difference.

Electr0Fi avatar Jul 03 '25 14:07 Electr0Fi

@thomay86 : Which Raspberry Pi model are you using, and do you have any SDRs connected at the same time?

I'm asking because I just debugged my issue of the GPS dying after getting a fix - albeit on a Lilygo T-Beam. I'm running a Raspberry Pi Model 3B, and have two Nooelec Nano v3 SDRs connected. Once the GPS gets a fix, it kicks off the OGN decode, turning on the SDRs, however their combines power draw plus that of the T-Beam is too much for the Pi to handle and causes a brown-out - effectively turning off or freezing the T-Beam (GPS), causing it to register as "not communicating".

My solution, that I am yet to test, is to switch to a Pi Model 4 B, which has higher (USB) power delivery capabilities.

I did try a 3B+, but I encountered the same brown-out issue with that.

Electr0Fi avatar Jul 05 '25 16:07 Electr0Fi

@Electr0Fi : Hi, and thanks for replying to this issue. Interesting thought on the power consumption... I'm also on a Raspi 3B, also two NooElec Nano 3 SDR connected, the GPS module at question, and the baro. No further hardware. It's all attached to a powerbank capable of delivering 2 Amps.

I'm just wondering, if the GPS issue has always been there without me noticing, or if it just came up after the update. I've been flying very little recently, but I'll try to verify that OGN is still working properly - that's my only concern.

thomay86 avatar Jul 05 '25 20:07 thomay86

@thomay86 : No worries. Maybe try to boot your Straux with the two SDRs removed. If you get a proper GPS fix and the system continues to operate (and no failed checksum) then shutdown, replace the SDRs and try again. Then you'll know if it's a power issue or not.

In your/my case, it not that the power bank/supply isn't capable enough. It's more about the power delivery capability of the USB ports. The 3B can only deliver 600mA across all USB ports. The 3B+ can deliver up to 1.2A across all USB ports. The 4 can deliver 1.2A per USB port.

Edit: So switching to a Pi 4B didn't help the situation. I still have the brown outs on the T-Beam when I have two Nooelec v3 SRDs installed. When I only have one installed the GPS dies after the initialisation of one of the SDRs. Apparently the Pi 4B is also limited to 1.2A across all USB ports.

Edit: So it turns out that the power bank that I was powering my Startux from, was not able to deliver enough power to the Pi while both SDRs are connected and active. I bought and switched to an official Raspberry Pi power supply and the issue has resolved itself. I can now even used the 3B+.

Electr0Fi avatar Jul 06 '25 08:07 Electr0Fi

@Electr0Fi I finally managed to check today... Even with the SDRs removed I see the same issue: GPS down after initial fix. So I can confirm your finding that it's not power related. If I find the time I'll prepare a new image SD card with my previous version (eu028) and check if the issue persists.

thomay86 avatar Jul 14 '25 17:07 thomay86

No worries. Looks like we're having different issues then. Best of luck finding a solution!

Electr0Fi avatar Jul 14 '25 18:07 Electr0Fi

I finally took the time and went through the process of flashing the installations from eu028 to eu032 one after each other. I got the following results regarding the GPS:

  • eu028 - working as expected
  • eu029 - working as expected
  • eu030 - working as expected
  • eu031 - working as expected
  • eu032 - Drops out after intial fix, Log shows 'Invalid NMEA string: Checksum failed.'

It seems like an issue was introduced in version eu032. In the release notes, under 'bug fixes', changes to GPS serial communication are mentioned, I think something went wrong there. Would be happy if the devs could have a look at this. I'll stay with eu031 for now.

thomay86 avatar Jul 17 '25 10:07 thomay86