RAK7243 GPS errors

My brand-new RAK7243 steadfastly refuses to connect to TTN due to timing errors that are cause, it seems, by bad data from the GPS unit.

Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: ### [GPS] ###
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: # Valid time reference (age: 0 sec)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: # GPS coordinates: latitude 35.69396, longitude -78.77933, altitude 125 m
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: ##### END #####
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: JSON up: {"stat":{"time":"2019-09-27 11:54:17 GMT","lati":35.69396,"long":-78.77933,"alti":125,"rxnb":0,"rxok":0,"rxfw":0,"ackr":0.0,"dwnb":58,"txnb":0}}
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: INFO: [down] PULL_RESP received  - token[92:1] :)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: JSON down: {"txpk":{"imme":false,"tmst":1010264051,"freq":925.1,"rfch":0,"powe":20,"modu":"LORA","datr":"SF7BW500","codr":"4/5","ipol":true,"size":22,"ncrc":true,"data":"YHAsASaqSTgDQAIAcQM6AP8B62sM0g=="}}
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: src/jitqueue.c:251:jit_enqueue(): ERROR: Packet REJECTED, timestamp seems wrong, too much in advance (current=1549205252, packet=1010264051, type=0)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: ERROR: Packet REJECTED (jit error=2)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: INFO: [down] PULL_RESP received  - token[85:48] :)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: JSON down: {"txpk":{"imme":false,"tmst":2685062603,"freq":925.1,"rfch":0,"powe":20,"modu":"LORA","datr":"SF7BW500","codr":"4/5","ipol":true,"size":22,"ncrc":true,"data":"YJggAiaqfosDQAIAcQM6AP8BypGASw=="}}
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: src/jitqueue.c:251:jit_enqueue(): ERROR: Packet REJECTED, timestamp seems wrong, too much in advance (current=1549773883, packet=2685062603, type=0)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: ERROR: Packet REJECTED (jit error=2)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: INFO: [down] PULL_RESP received  - token[177:135] :)
Sep 27 12:54:20 rak-gateway ttn-gateway[21655]: JSON down: {"txpk":{"imme":false,"tmst":2394627404,"freq":926.9,"rfch":0,"powe":20,"modu":"LORA","datr":"SF7BW500","codr":"4/5","ipol":true,"size":22,"ncrc":true,"data":"YMIvAiaqi6EDQAIAcQM6AP8BdQ7QwA=="}}

Which makes it look like the GPS is getting good data, but if I look at the actual GPS data,

cat /dev/ttyAMA0
8
4,16,2964,144,46,39,223,41.63301,120507.00,A,D*,A,3541.500,W,0.6E340,32,4,28*76
$GPV,0.053,K0508.00,3541.633,W,2,11,.3,M,,003,12,22,6,19,17,66*03
3,3,12,2,30,28,544,42,51GPGLL,35.76500,W8,340,32,4,28*76
�b X�$GPRMC,163305,N,046,,270TG,,T,,M,D*2A
$3541.63305,N,0781.12,13600*6C
$51,03,0228,,2.00GPGSV,3,02,23,240,42,03,251,39*73
4,16,296,29,28,544,42,51,39,223,41.63305,N,0784600,A,D*78
�b @�$GPRMC,120510.0007846.76501,W,0.66
$GPVTG,,T,,M,D*23
$GPGGA,1209,N,07846.76501.9,M,-34.3,M,,003,12,22,51,03,026,19,17,66*03
$02,049,,0,42,03,0,06,65,2
3,3,12,24,144,4644,42,5147*7C
$41.63309.76501,WD
�b (���,A,3541.63314,N,027,,270919,,,D*TG,,T,,M,0.027,NGPGGA,120511.00,14,N,0781.12,13700*6F
$51,03,0228,,2.00,1.12,1.1,12,01,02,049,,31,059,3251,40*722,15,04
$GPGSV,4,16,2964,144,4744,42,51X'20512.0007846.76919,,,D*,0.043,NGPGGA,1220,N,0781.12,137.3,M,,0000*6B
$3,12,22,,06,24,428,,2.0066*03
$02,049,,0,43,03,1,06,65,V,3,2,12,63,024,22,15,04
$GPGSV,4,16,296,28,28,5,46,23,2,39,223,GPGLL,35.76502,W7
�b �
�20513.0007846.76919,,,D*,0.033,NGPGGA,1224,N,078,W,2,11,.0,M,-34GPGSA,A,,06,24,428,,1.8349*00
3,3,12,2,27,28,5,46,23,2,39,223,GPGLL,35.76497,W00,A,D*7�
X�20514.0007846.76919,,,D*TG,,T,,M,D*2E
^C514.00,46.7649351,03,0228,,1.83GPGSV,3,02,049,,0,43,03,31,059,3251,40*7V,3,2,12,63,024,,340,33,4,27*77

You can see that the data is filled with errors. What could be the problem? Any ideas on a fix?

dg

Hi @davidgs
Which firmware you use?
For correct GPS NMEA stream , you have to stop the ttn service first.

Even with lora-gateway and ttn services stoped:

[email protected]:/usr/share/zoneinfo# cat /dev/ttyAMA0
�b p,���
��$GPRMC,130316.00,A,3541.63520,N,07846.76607,W,0.038,,270919,,,D*62
$GPVTG,,T,,M,0.038,N,0.070,K,D*2A
$GPGGA,130316.00,3541.63520,N,07846.76607,W,2,10,1.21,135.7,M,-34.3,M,,0000*6D
$GPGSA,A,3,12,51,03,02,06,24,46,19,17,28,,,2.35,1.21,2.02*04
$GPGSV,4,1,13,02,42,263,34,03,14,040,31,05,04,201,43,06,72,337,36*7E
$GPGSV,4,2,13,09,07,109,18,12,30,316,31,17,54,073,32,19,64,042,29*71
$GPGSV,4,3,13,23,07,077,,24,11,271,31,28,27,157,37,46,23,244,45*72
$GPGSV,4,4,13,51,39,223,47*45
$GPGLL,3541.63520,N,07846.76607,W,130316.00,A,D*74
�b X0�����
Q�$GPRMC,130317.00,A,3541.63516,N,07846.76613,W,0.020,,270919,,,D*6A
$GPVTG,,T,,M,0.020,N,0.037,K,D*20
$GPGGA,130317.00,3541.63516,N,07846.76613,W,2,10,1.17,136.0,M,-34.3,M,,0000*6D
$GPGSA,A,3,12,51,03,02,06,24,46,19,17,28,,,2.32,1.17,2.00*04
$GPGSV,4,1,13,02,42,263,33,03,14,040,31,05,04,201,43,06,72,337,35*7A
$GPGSV,4,2,13,09,07,109,19,12,30,316,30,17,54,073,35,19,64,042,29*76
$GPGSV,4,3,13,23,07,077,,24,11,271,33,28,27,157,38,46,23,244,45*7F
$GPGSV,4,4,13,51,39,223,47*45
$GPGLL,3541.63516,N,07846.76613,W,130317.00,A,D*75
�b @4�����
�$GPRMC,130318.00,A,3541.63513,N,07846.76621,W,0.033,,270919,,,D*63
$GPVTG,,T,,M,0.033,N,0.061,K,D*21
$GPGGA,130318.00,3541.63513,N,07846.76621,W,2,10,1.39,136.2,M,-34.3,M,,0000*68
$GPGSA,A,3,12,51,03,02,06,24,46,19,17,28,,,2.60,1.39,2.19*07
$GPGSV,4,1,13,02,42,263,32,03,14,040,28,05,04,201,43,06,72,337,36*70
$GPGSV,4,2,13,09,07,109,21,12,30,316,29,17,54,073,36,19,64,043,30*7F
$GPGSV,4,3,13,23,07,077,,24,11,271,34,28,27,157,38,46,23,244,44*79
$GPGSV,4,4,13,51,39,223,47*45
$GPGLL,3541.63513,N,07846.76621,W,130318.00,A,D*7E
�b (8�Y���

I downloaded what I thought was the latest version of the RAK image …

dg

1.What is the full name of your firmware?
2.What is the model number of your gateway?
3.If it is rak7243, is the gateway with lte or not with lte?