Seite 1 von 1

Unable to get GPS data via bluetooth

Verfasst: Do 7. Dez 2023, 15:20
von vgwit
Hello,

I'm trying to get GPS connector working and receive GPGGA packets via bluetooth but without success.
First I've checked it in simulation mode and it works. Then I've picked up a GPGGA string from simulation nmea log

$GPGGA,150834.00,4151.0000000,N,01230.0000000,E,4,16,0.6,516.042,M,45.729,M,1.0,1020*47

and sent it via file input. And it works again. But if I send exactly the same string via bluetooth it does not work. I've looked in debug log and found strings like:

[04.12.2023 22:20:25.330] [E] [TID:508651232432] [0220::NMEAString.cpp] [analyse()] ERR_NMEA_CHECKSUM: 0x47:GPGGA,150834.00,4151.0000000,N,01230.0000000,E,4,16,0.6,516.042,M,45.729,M,1.0,1020*00

I guess that 0x47 is checksum calculated by the app but 00 is checksum it sees in incoming packets. BUT terminal window shows *47 at the string end.
What is wrong? Why the app sees 00 at the end?

Thanks.
Volodymyr.

Re: Unable to get GPS data via bluetooth

Verfasst: Do 7. Dez 2023, 16:14
von Mazuch
Hi Volodymyr,
[04.12.2023 22:20:25.330] [E] [TID:508651232432] [0220::NMEAString.cpp] [analyse()] ERR_NMEA_CHECKSUM: 0x47:GPGGA,150834.00,4151.0000000,N,01230.0000000,E,4,16,0.6,516.042,M,45.729,M,1.0,1020*00
Yes - as you guessed 0x47 is the expected checksum, but the app sees "*00". (see message)
So - for whatever reason - zero is send via bluetooth.

Please check your send algorithm again ... and also very important.
You have to end the NMEA string by "\r\n" - but i guess you do.

Btw. you can also save the received NMEA data to a file, see terminal page in the app.
This should show the same problem - wrong checksum.

Best regards,
Markus

Re: Unable to get GPS data via bluetooth

Verfasst: Mo 11. Dez 2023, 22:35
von vgwit
Hi Markus,

thank you for your reply.
My mistake was I sent checksum as a hex code instead of two ascii codes.

BR,
Volodymyr