RAK831: GPS sync is disabled


#1

Hi Guys,

For some reason, whan I start the semtech packet forwarder " Beacon Packet Forwarder for Lora Gateway version 4.0.1" on the RAK831 gateway.

The logs shows that the GPS sync is disabled, I have no idea why?

##### 2018-11-16 02:12:50 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 0
# CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
# RF packets forwarded: 0 (0 bytes)
# PUSH_DATA datagrams sent: 0 (0 bytes)
# PUSH_DATA acknowledged: 0.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (100.00% acknowledged)
# PULL_RESP(onse) datagrams received: 0 (0 bytes)
# RF packets sent to concentrator: 0 (0 bytes)
# TX errors: 0
# BEACON queued: 0
# BEACON sent so far: 0
# BEACON rejected: 0
### [JIT] ###
# SX1301 time (PPS): 2434917
src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled
##### END #####

Could anyone please help?

Thanks


#2

Hi,

Can you double check that the GPS PPS output signal is conencted to the RAK831 Board ?

Nop Microwave


#3

Hi @Nop_Micro_Wave

The GPS_PPS output signal on the RAK831 is connected to the GPSPPS on the converter board.

I have just replaced the global_conf.json with both, first with “global_conf.json.PCB_E286.EU868.beacon” and then with “global_conf.json.PCB_E336.EU868.beacon” and in both cases I got the following warning repeatedly:

WARNING: [gps] read() returned value 0

I thought this might give some kind of a clue?

Many thanks


#4

Hi @brocaar
would really appreciate if you could help in this, as I know you have experiance with the RAK831.

Cheers
Noman


#5

Did you disable serial login shell and enable hardware serial? What do you see if you try to read from the gps, e.g. cat /dev/ttyUSB0 (change it to the proper one)? Is it correctly set at your packet forwarder?


#6

Thanks @iegomez for your response,

I did follow the instructions in the link below, if that what you mean?

Also, please see below the reading from the GPS:

pi@gateway:~ $ cat /dev/ttyAMA0
$GPRMC,V,N*53

$GPVTG,N*30

$GPGGA,0,00,99.99,*48

$GPGSA,A,1,99.99,99.99,99.99*30

$GPGSV,1,1,01,31,28*70

$GPGLL,V,N*64

$GPTXT,01,01,01,NMEA unknown msg*58

$GPTXT,01,01,01,NMEA unknown msg*58

$GPTXT,01,01,01,NMEA unknown msg*58

$GPTXT,01,01,01,NMEA unknown msg*58

$GPTXT,01,01,01,NMEA unknown msg*58

Regards,
Noman


#7

That looks like the GPS is correctly connected but hasn’t made fix yet.


#8

Any adeas on how to fix this?

Cheers


#9

According to this quick google search and others there doesn’t seem to be anything wrong with the gps itself. Could you share you packet forwarder settings (global_conf.json or local_conf.json depending on where you are setting the gps parameters)? The radio settings are not necessary.


#10

global_conf.json ( global_conf.json.PCB_E286.EU868.beacon)

“gateway_conf”: {
“gateway_ID”: “AA555A0000000000”,
/* change with default server address/ports, or overwrite in local_conf.json /
“server_address”: “localhost”,
“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 configuration /
“gps_tty_path”: “/dev/ttyAMA0”,
/
GPS reference coordinates /
“ref_latitude”: 0.0,
“ref_longitude”: 0.0,
“ref_altitude”: 0,
/
Beaconing parameters */
“beacon_period”: 128,
“beacon_freq_hz”: 869525000,
“beacon_datarate”: 9,
“beacon_bw_hz”: 125000,
“beacon_power”: 14,
“beacon_infodesc”: 0
}

Now I’m geting a new message:

> *** Beacon Packet Forwarder for Lora Gateway ***
> Version: 4.0.1
> *** Lora concentrator HAL library version info ***
> Version: 5.0.1;
> ***
> INFO: Little endian host
> INFO: found global configuration file global_conf.json, parsing it
> INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
> INFO: lorawan_public 1, clksrc 1
> INFO: no configuration for LBT
> INFO: antenna_gain 0 dBi
> INFO: no configuration for tx gain lut 12
> INFO: no configuration for tx gain lut 13
> INFO: no configuration for tx gain lut 14
> INFO: no configuration for tx gain lut 15
> INFO: Configuring TX LUT with 12 indexes
> INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 0
> INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
> INFO: Lora multi-SF channel 0>  radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora multi-SF channel 1>  radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora multi-SF channel 2>  radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora multi-SF channel 3>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora multi-SF channel 4>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora multi-SF channel 5>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora multi-SF channel 6>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora multi-SF channel 7>  radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
> INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
> INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
> INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
> INFO: gateway MAC address is configured to AA555A0000000000
> INFO: server hostname or IP address is configured to "192.168.200.4"
> INFO: upstream port is configured to "1700"
> INFO: downstream port is configured to "1700"
> INFO: downstream keep-alive interval is configured to 10 seconds
> INFO: statistics display interval is configured to 30 seconds
> INFO: upstream PUSH_DATA time-out is configured to 100 ms
> INFO: packets received with a valid CRC will be forwarded
> INFO: packets received with a CRC error will NOT be forwarded
> INFO: packets received with no CRC will NOT be forwarded
> INFO: GPS serial port path is configured to "/dev/ttyAMA0"
> INFO: Reference latitude is configured to 0.000000 deg
> INFO: Reference longitude is configured to 0.000000 deg
> INFO: Reference altitude is configured to 0 meters
> INFO: Beaconing period is configured to 128 seconds
> INFO: Beaconing signal will be emitted at 869525000 Hz
> INFO: Beaconing datarate is set to SF9
> INFO: Beaconing modulation bandwidth is set to 125000Hz
> INFO: Beaconing TX power is set to 14dBm
> INFO: Beaconing information descriptor is set to 0
> INFO: found local configuration file local_conf.json, parsing it
> INFO: redefined parameters will overwrite global parameters
> INFO: local_conf.json does not contain a JSON object named SX1301_conf
> INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
> INFO: gateway MAC address is configured to AA555A0000000101
> INFO: packets received with a valid CRC will be forwarded
> INFO: packets received with a CRC error will NOT be forwarded
> INFO: packets received with no CRC will NOT be forwarded
> INFO: [main] TTY port /dev/ttyAMA0 open for GPS synchronization
> INFO: [main] concentrator started, packet can now be received
> 
> INFO: Disabling GPS mode for concentrator's counter...
> WARNING: [gps] could not get GPS time from GPS
> INFO: host/sx1301 time offset=(1542549633s:162051µs) - drift=-756098237µs
> INFO: Enabling GPS mode for concentrator's counter.
> 
> INFO: [down] PULL_ACK received in 0 ms
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> INFO: [down] PULL_ACK received in 0 ms
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> INFO: [down] PULL_ACK received in 0 ms
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> WARNING: [gps] could not get GPS time from GPS
> 
> ##### 2018-11-18 14:01:05 GMT #####
> ### [UPSTREAM] ###
> # RF packets received by concentrator: 0
> # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
> # RF packets forwarded: 0 (0 bytes)
> # PUSH_DATA datagrams sent: 0 (0 bytes)
> # PUSH_DATA acknowledged: 0.00%
> ### [DOWNSTREAM] ###
> # PULL_DATA sent: 3 (100.00% acknowledged)
> # PULL_RESP(onse) datagrams received: 0 (0 bytes)
> # RF packets sent to concentrator: 0 (0 bytes)
> # TX errors: 0
> # BEACON queued: 0
> # BEACON sent so far: 0
> # BEACON rejected: 0
> ### [JIT] ###
> # SX1301 time (PPS): 2428252
> src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
> ### [GPS] ###
> # Invalid time reference (age: 1542549665 sec)
> # no valid GPS coordinates available yet
> ##### END #####

#11

I thought you could be missing "fake_gps":false and "gps":true, but it seems it is trying to use the gps anyway. I’d say check directly with cat to see you get a fix, which should give you something like this (notice how it’s normal to have a lot of “faulty” lines):

$GPRMC,123004.00,A,3326.00650,S,07037.16455,W,0.407,,030419,,,A*70
$GPGSA,A,3,26,29,20,10,21,,,,,,,,4.41,2.56,3.59*02
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPRMC,123006.00,A,3326.00677,S,07037.16380,W,0.410,,030419,,,A*7E
$GPVTG,,T,,M,0.410,N,0.759,K,A*2D
$GPGSA,A,3,26,29,20,10,21,,,,,,,,4.41,2.56,3.59*02

If you do get that, eventually you should see something like this at your packet forwarder:

Apr 03 09:29:48 MNGW0000 ttn-gateway[317]: ### [GPS] ###
Apr 03 09:29:48 MNGW0000 ttn-gateway[317]: # Valid gps time reference (age: 0 sec)
Apr 03 09:29:48 MNGW0000 ttn-gateway[317]: # System GPS coordinates: latitude -33.43346, longitude -70.61944, altitude 587 m

If you get the fix and still the packet forwarder doesn’t work, then I’d say there may be an specific issue with the beacon packet forwarder regarding gps (I have never used it, sorry). If, instead, you never get a gps fix, then you’ll have to double check it.

Sorry if that doesn’t seem very helpful, I’m no gps nor packet forwarder expert.


#12

An other idea: could it be that the GPS module on your RAK831 is not an uBlox?

I remember that RAK initially shipped the RAK831 with a GPS module from a different vendor.


#13

Thank you all guys, for the help.

I think the issue is that the GPS was not getting a fix.
I have found out that the GPS antenna connecter was loose and almost disconnected from the cable.
So after using a new GPS antenna and placing the gateway in a better location, I got the fix and everything is up and running.

Really appreciate the support.
Noman