Hello ZhuQI, many thanks indeed for your response
I got to say that maybe you haven’t check my logs because if so, you would have notice that no “time” label is displayed, which means that a hidden problem is ocurring and I just notice it by examining this issue very deeply.
- I have check physical GPS antena connection to the RAK and it is Ok (actually on my 03 Raks)
- I have check the global and local config files on all RAKs to be sure that they are all pointing to /dev/ttyAMA0 logic port. They all are.
- I have check that /dev/ttyAMA0 has the correct permissions (write and, specially, read permissions are enable on that logic port as you can see below):
pi@rak-gateway:~ $ ls -lh /dev/ttyAMA0
crw-rw---- 1 root dialout 204, 64 Aug 15 23:16 /dev/ttyAMA0
I have numbered these items because, when I reset the lora packet forwarder, at some point the output presents the following line:
Aug 15 23:46:10 rak-gateway ttn-gateway[2087]: WARNING: [main] impossible to open /dev/ttyAMA0 for GPS sync (check permissions)
This is why I never received the timestamp, permissions.
I am using the “RAK7243 with LTE OS” downloaded from RAKwireless repository and I always thought that GPS was working fine but I have realized that it has NOT. I also have run the following test which tells me that GPS is fine but, due to the reasons explained before, it is not feeding the SX1301 concentrators timestamps.
pi@rak-gateway:/opt/ttn-gateway/lora_gateway/libloragw $ ./test_loragw_gps
Beginning of test for loragw_gps.c
*** Library version information ***
Version: 5.0.1;
~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
Synchronization error.
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
WARNING: [gps] could not get a valid message from GPS (no time)
~~ UBX NAV-TIMEGPS sentence, triggering synchronization attempt ~~
* Synchronization successful *
UTC reference time: 1565911952.000000000
GPS reference time: 1249947176.000263865
Internal counter reference value: 12562500
Clock error: 1.000000000
* Test of timestamp counter <-> GPS value conversion *
Test value: 13062500
Conversion to GPS: 1249947176.500263865
Converted back: 13062500 ==> 0µs
* Test of timestamp counter <-> UTC value conversion *
Test value: 13062500
Conversion to UTC: 1565911952.500000000
Converted back: 13062500 ==> 0µs
So the basic question is what is going on with the gps permissions …
The following belongs to the global_conf.json (the part that is regarding the gps, of course):
"gateway_conf": {
"gateway_ID": "0000000000000000",
/* change with default server address/ports, or overwrite in local_conf.json */
"server_address": "router.au.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": 6
}
The following belongs to the local_conf.json
“gateway_conf”: {
“gateway_ID”: “XXXXXXXXXXXXXX”,
“gps”: true,
“gps_tty_path”: “/dev/ttyAMA0”,
“fake_gps”: false
}
Thanks indeed