RAK2245 Pi hat GPS

i assume i’m having the new version (ordered March 3rd), with GPS connected via UART. i’m using the raspbian based image.

i would like to get to the raw output or at least an NMEA-stream of the GPS, but doing
cat /dev/ttyAMA0
gives

$G0,31,20,21,26,,,4*0E

$GPGSV,3,17,02,340,10,16,73
$G5,297,20,38,155,26,67,229,32
7B27,28,288,12,29,0,20,40,23,133,32.31437,N,01617.0,A,D64
(|▒$GPRMC,131428,N,01617.99319,D
79
$GPV,0.300,K,D20
$4822.31428,N,016,E,2,07,1.74,2180
54
$G0,31,20,1.74,1.9,12,05,0,10,16,7F
$G5,297,26,068,33
$GPGSV8,11,29,0,19,40,PGLL,48299706,E,
(▒83954.0001617.99714,E,0.319,D
74
$GPV,0.221,N,0.409,KGPGGA,183954.00,07,N,01617.997141.74,218.9,M,42.050
$GPGSA,A,30,31,20,21,26,1.74,1.94
0E
$G,12,05,01,027,0,10,16,172,22,1,7F
$GPGSV,3,25,297,20,38,1556,068,33,26,67,2
$GPGSV,3,3,12,8,13,29,18,094,0,20,40,23,133,3PGLL,4822.31407,99714,E,183954.0
▒b ▒▒(P>$GPRMC,1,A,4822.31391,N,718,E,0.185,2507C
$GPVTG,T,M,0.342,K,D
2F
$3955.00,4822.31317.99718,E,2,07,.3,M,42.2,M,000PGSA,A,3,27,40,121,26,2.61,40E
$GPGSV,3,11,027,07,03,340172,22,15,02,088PGSV,3,2,12,16,50,38,155,32,21,7,26,67,229,33
79,3,3,12,27,28,2818,094,31,05,2123,133,3472
$G2.31391,N,01617.183955.00,A,D
65▒b ▒▒’ D.▒▒▒$GPRMC,183956.0031361,N,01617.99107,250319,DTG,T,M,0.107,N,D2F
$GPGGA,184822.31361,N,016,E,2,07,1.74,2202,M,000051
$G,27,40,10,31,20,2.61,1.74,1.9,12,05,01,027,0172,23,15,02,088,12,16,55,297,26,068,33,26,67,2,3,3,12,27,28,2831,05,210,17,40,PGLL,4822.31361,183956.00,A,D
61’ ▒/▒▒▒83957.00,A,4822.01617.99755,E,0.7C
$GPV,0.115,K,D27
$4822.31329,N,0161.74,221.2,M,42.PGSA,A,3,27,40,1,2.61,1.74,1.9,12,05,01,027,0172,23,15,02,088,12,16,55,297,26,068,33,26,67,2,3,3,12,18,094,31,05,214
7D
$GPGLL,48299755,E,183957.0▒b ▒▒’▒▒$GPRMC,131325,N,01617.99319,D73
$GPV,0.176,K,D
2A
$4822.31325,N,0161.74,221.3,M,42.PGSA,A,3,27,40,1,2.61,1.74,1.9,12,05,01,027,0172,23,15,02,088,12,16,55,297,26,068,33,26,67,2,3,3,12,27,28,2831,05,210,17,40,PGLL,4822.31325,183958.00,A,D6A( ▒2▒▒▒’▒,A,4822.31300,N,189,250319,D,0.189,N,0.350,K3959.00,4822.317.99766,E,2,07,2,M,000059
$G0,31,20,21,26,4
0E
$GPGSV,3,17,03,340,10,17,7F
$GPGSV,3,20,38,155,31,21,729,32
7B
$GPGSV8,15,29,18,094,23,133,347D
$GN,01617.99766,E,
▒b P$GPRMC,184000.0001617.99758,E,0.70
$GPVTG,T,M,D
26
$GPGGA,18.31289,N,0161.74,222.2,M,42.PGSA,A,3,27,40,1,2.61,1.74,1.9,12,05,01,027,0172,22,15,02,088,12,16,55,297,26,068,33,26,67,2,3,3,12,27,28,2831,05,210,17,40,PGLL,4822.31289,184000.00,A,D67( ▒5▒▒▒’▒▒,A,4822.31266,N,198,250319,D,0.198,N,0.367,K4001.00,4817.99770,E,2,07,2,M,00005C
$G0,31,20,21,26,4
0E
$GPGSV,3,17,03,340,10,17,7E
$GPGSV,3,20,38,155,32,21,729,33
79
$GPGSV8,15,29,18,094,23,133,347D
$GN,01617.99770,E,
▒b $GPRMC,184002.0001617.99777,E,0.78
$GPVTG,T,M,D
21
$GPGGA,1843,N,01617.99777.6,M,42.2,M,000,27,40,10,31,20,1.74,1.940E
$G1,027,07,03,3405,02,088,7E
$G5,297,20,38,155,26,67,229,33
7927,28,288,14,29,0,17,40,23,133,32.31243,N,01617.0,A,D
6E
'▒$GPRMC,131223,N,01617.99319,D7C
$GPV,0.311,K,D
2A
$0,4822.312,E,2,07,1.74,2240*51

console output on ttyAMA0 is disabled.

any hints on how to get a clean NMEA stream?

thanks,
markus.

Hi @nograin.
This is the raw output. It have some noise in it , but it is.
Here is example in database variant https://www.researchgate.net/figure/Example-of-AIS-and-GPS-data-stream-recorded-appended-with-local-timestamps_fig2_322988234
Do you have problems with GPS data on RAK2245?

yes, i’m not getting a clean NMEA-stream :wink:

i know that what i get is partly looking like what it should be, but can’t tell where the “noise” is coming from and how to avoid it or get rid of it.

maybe @fomi knows more?

Do U kill the lora process?
sudo systemctl stop ttn-gateway.service

indeed, this makes it better. but still there is something else coming in before every eighth sentence.

as far as i understand the lora-chip is tied to the gps directly, so the gateway doesn’t rely on this output, right? so theoretically it should be possible to put the nmea-output to a different /dev without loosing functinonality…:thinking:

The lora process needs to read the latitude and longitude, time and other information of gps.

What do you mean by “it should be possible to put the nmea-output to a different /dev without loosing functinonality”?

(misinterpreted the ‘direct connection’ mentioned, this is the 1pps-signal only…)

but does it read this from /dev/ttyAMA0 (or it’s alias /dev/serial0)? if so - this would mean it knows how to read that data from this obviously mixed up output, but probably it just takes lat/lon which might be easy enough to get.

but the question still stands - how can i get a clean and complete nmea-stream while the gateway is running?

The lora program does read GPS information from /dev/ttyAMA0.

In fact, lora gets two format streams from GPS. One is NMEA and the other is UBX.

When the lora process is running, you can’t get the a clean and complete nmea-stream.

When you finish the lora process, use the command “cat /dev/ttyAMA0”, you get the data stream in two formats.