7246G TTN location?

Issue:Hello! Can 7246G automaticly update TTN location? If not, what is to idea behind the GPS?
Setup:

Server:

Details:

RAK7246G includes a GPS module, which can periodically report its own latitude and longitude information.

Can it automaticly update ttn gateway location?

Yes, the gateway sends a stat message to ttn about every 30 seconds.

ah, that’s great! :slight_smile: I seem to have a problem with this. I can see valid GPS information in /var/log/syslog. My gateway is online and I can see traffic on TTN gateway traffic page. However my gateway location on ttn is still lat: 0.00000 lng: 0.00000. For Antenna Placement I have choosen Outdoor, if this matters.
gateway-version: RAKWireless gateway RAK7246 version 4.1.1R
What have I missed?

Check the file /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/global_conf.json, can you send me the contents of the file?

Thanks for quick response!

{
“SX1301_conf”: {
“lorawan_public”: true,
“clksrc”: 1,
“antenna_gain”: 0,
“radio_0”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 867500000,
“rssi_offset”: -166.0,
“tx_enable”: true,
“tx_freq_min”: 863000000,
“tx_freq_max”: 870000000
},
“radio_1”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 868500000,
“rssi_offset”: -166.0,
“tx_enable”: false
},
“chan_multiSF_0”: {
“enable”: true,
“radio”: 1,
“if”: -400000
},
“chan_multiSF_1”: {
“enable”: true,
“radio”: 1,
“if”: -200000
},
“chan_multiSF_2”: {
“enable”: true,
“radio”: 1,
“if”: 0
},
“chan_multiSF_3”: {
“enable”: true,
“radio”: 0,
“if”: -400000
},
“chan_multiSF_4”: {
“enable”: true,
“radio”: 0,
“if”: -200000
},
“chan_multiSF_5”: {
“enable”: true,
“radio”: 0,
“if”: 0
},
“chan_multiSF_6”: {
“enable”: true,
“radio”: 0,
“if”: 200000
},
“chan_multiSF_7”: {
“enable”: true,
“radio”: 0,
“if”: 400000
},
“chan_Lora_std”: {
“enable”: true,
“radio”: 1,
“if”: -200000,
“bandwidth”: 250000,
“spread_factor”: 7
},
“chan_FSK”: {
“enable”: true,
“radio”: 1,
“if”: 300000,
“bandwidth”: 125000,
“datarate”: 50000
},
“tx_lut_0”: {
“pa_gain”: 0,
“mix_gain”: 8,
“rf_power”: -6,
“dig_gain”: 0
},
“tx_lut_1”: {
“pa_gain”: 0,
“mix_gain”: 10,
“rf_power”: -3,
“dig_gain”: 0
},
“tx_lut_2”: {
“pa_gain”: 0,
“mix_gain”: 12,
“rf_power”: 0,
“dig_gain”: 0
},
“tx_lut_3”: {
“pa_gain”: 1,
“mix_gain”: 8,
“rf_power”: 3,
“dig_gain”: 0
},
“tx_lut_4”: {
“pa_gain”: 1,
“mix_gain”: 10,
“rf_power”: 6,
“dig_gain”: 0
},
“tx_lut_5”: {
“pa_gain”: 1,
“mix_gain”: 12,
“rf_power”: 10,
“dig_gain”: 0
},
“tx_lut_6”: {
“pa_gain”: 1,
“mix_gain”: 13,
“rf_power”: 11,
“dig_gain”: 0
},
“tx_lut_7”: {
“pa_gain”: 2,
“mix_gain”: 9,
“rf_power”: 12,
“dig_gain”: 0
},
“tx_lut_8”: {
“pa_gain”: 1,
“mix_gain”: 15,
“rf_power”: 13,
“dig_gain”: 0
},
“tx_lut_9”: {
“pa_gain”: 2,
“mix_gain”: 10,
“rf_power”: 14,
“dig_gain”: 0
},
“tx_lut_10”: {
“pa_gain”: 2,
“mix_gain”: 11,
“rf_power”: 16,
“dig_gain”: 0
},
“tx_lut_11”: {
“pa_gain”: 3,
“mix_gain”: 9,
“rf_power”: 20,
“dig_gain”: 0
},
“tx_lut_12”: {
“desc”: “TX gain table, index 12”,
“pa_gain”: 3,
“mix_gain”: 10,
“rf_power”: 23,
“dig_gain”: 0
},
“tx_lut_13”: {
“desc”: “TX gain table, index 13”,
“pa_gain”: 3,
“mix_gain”: 11,
“rf_power”: 25,
“dig_gain”: 0
},
“tx_lut_14”: {
“desc”: “TX gain table, index 14”,
“pa_gain”: 3,
“mix_gain”: 12,
“rf_power”: 26,
“dig_gain”: 0
},
“tx_lut_15”: {
“desc”: “TX gain table, index 15”,
“pa_gain”: 3,
“mix_gain”: 14,
“rf_power”: 27,
“dig_gain”: 0
}
},
“gateway_conf”: {
“gateway_ID”: “0000000000000000”,
/* change with default server address/ports, or overwrite in local_conf.json /
“server_address”: “router.eu.thethings.network”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,
/
adjust the following parameters for your network /
“keepalive_interval”: 10,
“stat_interval”: 30,
“push_timeout_ms”: 100,
/
forward only valid packets /
“forward_crc_valid”: true,
“forward_crc_error”: false,
“forward_crc_disabled”: false,
/
gps enable */
“gps”: true,
“gps_tty_path”: “/dev/ttyAMA0”,
“fake_gps”: false,
“ref_latitude”: 10,
“ref_longitude”: 20,
“ref_altitude”: -1,
“autoquit_threshold”: 20
}
}

1.Add dtoverlay=disable-bt to the file /boot/config.txt.
2.Use the command sudo raspi-config, disable serial login, enable serial.
3.Reboot gw.



2020-06-01 17-40-28
2020-06-01 17-40-38

I did the changes but still no lat lng info at ttn end.

I changed in the ~/rak7246_for_rpi/lora/rak7246/library.cfg
from
DEBUG_GPS= 0
to
DEBUG_GPS= 1

Now I’m getting this messages in /var/log/syslog

Jun 1 12:41:38 rak-gateway ttn-gateway[428]: Note: ignored NMEA sentence
Jun 1 12:41:38 rak-gateway ttn-gateway[428]: Note: ignored NMEA sentence
Jun 1 12:41:38 rak-gateway ttn-gateway[428]: Note: ignored NMEA sentence
Jun 1 12:41:38 rak-gateway ttn-gateway[428]: Note: ignored NMEA sentence
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Note: ignored NMEA sentence
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: ERROR: TOO SHORT TO BE A VALID UBX MESSAGE
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Note: parsing UBX frame> b5 62 01 20 10 00 88 03 a9 07
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: ERROR: UBX message incomplete
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Note: parsing UBX frame> b5 62 01 20 10 00 88 03 a9 07 c2 e0 f8 ff 3c 08 12 07
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: ERROR: UBX message incomplete
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Note: parsing UBX frame> b5 62 01 20 10 00 88 03 a9 07 c2 e0 f8 ff 3c 08 12 07 37 00 00 00 99 bc 24 47
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Note: Valid RMC sentence, GPS locked, date: 2020-06-01T11:41:39.000Z
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Warning: localization error processing not implemented yet
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Note: ignored NMEA sentence
Jun 1 12:41:39 rak-gateway ttn-gateway[428]: Note: Valid GGA sentence, 4 sat, lat 60deg 01.833min N, lon 011deg04.140min E, alt 265

Is this correct?

cat /dev/ttyAMA0 is showing something like this:

,3.13,1.91,2.4,11,04,09,303,02,337,16,35,295,11,18,53,167,24,08,135,32,26,65SV,3,3,11,27,04,0,31,27,215,1343010,N,01104.170,A6B
µb Ðñ© ¾ùÿ$GPRMC,114240.0001104.17049,E,0.70
$GPVTG,T,M,A25
$GPGGA,1105,N,01104.17049.3,M,37.8,M,5926,05,29,25,1.91,2.4800
$G,11,04,09,303,0,31,09,12,337,1,70
$GPGSV,3,23,167,24,21,42,1,08,135,31,26,657F
$GPGSV,3,3,1260,29,50,085,2215,13
47
$GPGL3005,N,01104.170240.00,A,A
6D
µb ¸õ’$GPRMC,1,A,6001.83001,N,082,E,0.496,01078
$GPVTG,T,M,0.918,K,A28
$4241.00,6001.83004.17082,E,1,05,.5,M,37.8,M,5D,A,3,18,26,05,29,3.13,1.91,2.4PGSV,3,1,11,04,0,30,09,12,337,1PGSV,3,2,11,18,590,09,25,08,135,7F
$GPGSV,3,3,150,085,29,31,27,L,6001.83001,N,0241.00,A,A
6F
µb ù’¤PRMC,182992,N,01104.17620,A
70
$GPV,1.208,K,A*29
$4242.00,6001.82904.17191,E,1,05,.8,M,37.8,M,52,A,3,18,26,05,291.91,2.4800
$G9,303,05,25,0512,337,16,35,295PGSV,3,2,11,18,590,09,25,08,135,78
$GPGSV,3,3,149,085,29,31,27,L,6001.82992,N,0242.00,A^C

Can you compress /var/log/syslog and send it to me?
[email protected]

Hi @marz did the RAKwireless Staff manage to resolve your GPS issue in the end?
I know this is an old thread, but I came across it while awaiting the delivery of a RAK7246G with the assumption that at accurate GPS location will be forwarded in the messages (rather than GPS just being used for PPS timing).
I’m hoping the decode of /dev/ttyAMA0 now works correctly :crossed_fingers: