Raspberry Pi 3 + IC880a + GPS

OK - sounds good. I’ll try it now.

A small fix to run.py will be as well required, line 308 now reads:

My run.py only goes up to 305 and there is no code which resembles if(os.getenv(‘GW_GPS’, False)==True):

I’m running this build of the gateway - https://github.com/jpmeijers/ttn-resin-gateway-rpi

I’ll let you know how it goes soon.

Line number is 169 in your file. Without that fix the software will not attempt to access your GPS.

Sorry - yes it is - found it. Its 1 o 'clock in the morning - need some kip :sleeping: :sleeping: :sleeping:

YEP!! - Excellent! - works a treat!

11.06.17 00:09:07 (+0000) ##### 2017-06-11 00:09:07 GMT #####
11.06.17 00:09:07 (+0000) ### [UPSTREAM] ###
11.06.17 00:09:07 (+0000) # RF packets received by concentrator: 0
11.06.17 00:09:07 (+0000) # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
11.06.17 00:09:07 (+0000) # RF packets forwarded: 0 (0 bytes)
11.06.17 00:09:07 (+0000) # PUSH_DATA datagrams sent: 0 (0 bytes)
11.06.17 00:09:07 (+0000) # PUSH_DATA acknowledged: 0.00%
11.06.17 00:09:07 (+0000) ### [DOWNSTREAM] ###
11.06.17 00:09:07 (+0000) # PULL_DATA sent: 0 (0.00% acknowledged)
11.06.17 00:09:07 (+0000) # PULL_RESP(onse) datagrams received: 0 (0 bytes)
11.06.17 00:09:07 (+0000) # RF packets sent to concentrator: 0 (0 bytes)
11.06.17 00:09:07 (+0000) # TX errors: 0
11.06.17 00:09:07 (+0000) ### BEACON IS DISABLED!
11.06.17 00:09:07 (+0000) ### [JIT] ###
11.06.17 00:09:07 (+0000) # INFO: JIT queue contains 0 packets.
11.06.17 00:09:07 (+0000) # INFO: JIT queue contains 0 beacons.
11.06.17 00:09:07 (+0000) ### [GPS] ###
11.06.17 00:09:07 (+0000) # Valid gps time reference (age: 0 sec)
11.06.17 00:09:07 (+0000) # System GPS coordinates: latitude 53.44995, longitude -2.27440, altitude 16 m
11.06.17 00:09:07 (+0000) ### [PERFORMANCE] ###
11.06.17 00:09:07 (+0000) # Upstream radio packet quality: 0.00%.
11.06.17 00:09:07 (+0000) # Semtech status report send.
11.06.17 00:09:07 (+0000) ##### END #####
11.06.17 00:09:07 (+0000) INFO: [status] TTN send status success

Thanks very much for all your help.
:joy: :ok_hand:

1 Like

Hi!

I’ve attached the PPS output from my Adafruit GPS module to pin 19 of the ic880a board but I’m still seeing that the Beacon is disabled, in the log. Do I need to connect the PPS output to a GPIO pin on the RPi3 to enable the beacon?

Thanks in advance.

No. I urged you to connect PPS as it provides better time stamping of received packets.

Beacons are for Class B devices. As

  1. TTN currently does not support Class B (or Class C)
  2. I haven’t found any Class B (or Class C) devices available yet,
    I did not invest time yet to refactor the required code out of the Semtech protocol stack. (Class B and C are on the roadmap so I will probably look at it in due time, commercial projects have priority right now, TTN has become a money sink over the last year and half so I would like to have a bit of the ‘LoRaWAN pie’ as well)

If you really want beacons at this moment you will need to connect the packet forwarder to a back-end using the Semtech protocol (the Semtech site is a candidate) and also enable beacons in the configuration.
Keep in mind enabling beacons means the gateway will be sending more often and the current generation of gateways do not listen while transmitting so you are more likely to miss transmissions from nodes.

Thanks for the explanation @kersing. I now understand.

So it looks like my first gateway is now fully operational :grin: . All I need to do now is put it in a box and release it into the wild for it to do it’s ‘thing’.

1 Like

@kersing

GPS needs to be set to 9600 bps, 8n1. For non ublox ver.7 modules do not connect the RX of the GPS to TX of RPi.

Is that what happen out of the box? I just soldered a ublox GPS module on my RisingHF board where it was planned to be, along with the proper SMA connector.

I’m wondering if I need to do this. And when you say “For non ublox ver. 7 modules” is that all non ublox ver. 7, or only ver. 7 and newer, or ver. 7 or older? I have a MAX-8Q there.

Thanks for your help.

Dear all,

For now I use a USB connected GPS, that is accessible as /dev/ttyACM0, until I can properly access my soldered GPS module from my RisingHF board (from the IOT discovery kit). Unfortunately, I got these kind of messages:

09.01.18 21:09:44 (+0100) ### [GPS] ###
09.01.18 21:09:44 (+0100) # Invalid gps time reference (age: 1515528584 sec)
09.01.18 21:09:44 (+0100) # System GPS coordinates: latitude 48.69460, longitude 2.29808, altitude 45 m

Why is the time reference invalid when I got proper System GPS coordinates (that got refreshed at each log update)?

Unix epoch. Your system boot with date 1.1.1970 and somehow you do not sync system time to gps time. 09
Source

How can I fix this? I use a resin.io container (from jpmeijers)

I just checked a date -R and correct time is returned…

No idea. sorry. Try to check from where the time reference comes. Since GPS have coordinates and hwclock is adjusted it must be another counter. (Epoch+Uptime)Proof

@jpmeijers @kersing an idea about this problem?

github I think you still use fake gps…

@bsiege I don’t know how this is possible when my system coordinates are updated each time I have them in the logs (every 30s), indicating that GPS is providing them…

This is the kind of log messages I have, that loop:

10.01.18 21:03:57 (+0100) ##### 2018-01-10 20:03:57 GMT #####
10.01.18 21:03:57 (+0100) ### [UPSTREAM] ###
10.01.18 21:03:57 (+0100) # RF packets received by concentrator: 0
10.01.18 21:03:57 (+0100) # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
10.01.18 21:03:57 (+0100) # RF packets forwarded: 0 (0 bytes)
10.01.18 21:03:57 (+0100) # PUSH_DATA datagrams sent: 0 (0 bytes)
10.01.18 21:03:57 (+0100) # PUSH_DATA acknowledged: 0.00%
10.01.18 21:03:57 (+0100) ### [DOWNSTREAM] ###
10.01.18 21:03:57 (+0100) # PULL_DATA sent: 0 (0.00% acknowledged)
10.01.18 21:03:57 (+0100) # PULL_RESP(onse) datagrams received: 0 (0 bytes)
10.01.18 21:03:57 (+0100) # RF packets sent to concentrator: 0 (0 bytes)
10.01.18 21:03:57 (+0100) # TX errors: 0
10.01.18 21:03:57 (+0100) ### BEACON IS DISABLED!
10.01.18 21:03:57 (+0100) ### [JIT] ###
10.01.18 21:03:57 (+0100) # INFO: JIT queue contains 0 packets.
10.01.18 21:03:57 (+0100) # INFO: JIT queue contains 0 beacons.
10.01.18 21:03:57 (+0100) ### [GPS] ###
10.01.18 21:03:57 (+0100) # Invalid gps time reference (age: 1515614637 sec)
10.01.18 21:03:57 (+0100) # System GPS coordinates: latitude 48.69465, longitude 2.29798, altitude 30 m
10.01.18 21:03:57 (+0100) ### [PERFORMANCE] ###
10.01.18 21:03:57 (+0100) # Upstream radio packet quality: 0.00%.
10.01.18 21:03:57 (+0100) # Semtech status report send.
10.01.18 21:03:57 (+0100) ##### END #####
10.01.18 21:03:57 (+0100) 20:03:57 INFO: [TTN] bridge.eu.thethings.network RTT 22
10.01.18 21:03:57 (+0100) 20:03:57 INFO: [TTN] send status success for bridge.eu.thethings.network
10.01.18 21:04:27 (+0100)
10.01.18 21:04:27 (+0100) ##### 2018-01-10 20:04:27 GMT #####
10.01.18 21:04:27 (+0100) ### [UPSTREAM] ###
10.01.18 21:04:27 (+0100) # RF packets received by concentrator: 1
10.01.18 21:04:27 (+0100) # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
10.01.18 21:04:27 (+0100) # RF packets forwarded: 0 (0 bytes)
10.01.18 21:04:27 (+0100) # PUSH_DATA datagrams sent: 0 (0 bytes)
10.01.18 21:04:27 (+0100) # PUSH_DATA acknowledged: 0.00%
10.01.18 21:04:27 (+0100) ### [DOWNSTREAM] ###
10.01.18 21:04:27 (+0100) # PULL_DATA sent: 0 (0.00% acknowledged)
10.01.18 21:04:27 (+0100) # PULL_RESP(onse) datagrams received: 0 (0 bytes)
10.01.18 21:04:27 (+0100) # RF packets sent to concentrator: 0 (0 bytes)
10.01.18 21:04:27 (+0100) # TX errors: 0
10.01.18 21:04:27 (+0100) ### BEACON IS DISABLED!
10.01.18 21:04:27 (+0100) ### [JIT] ###
10.01.18 21:04:27 (+0100) # INFO: JIT queue contains 0 packets.
10.01.18 21:04:27 (+0100) # INFO: JIT queue contains 0 beacons.
10.01.18 21:04:27 (+0100) ### [GPS] ###
10.01.18 21:04:27 (+0100) # Invalid gps time reference (age: 1515614667 sec)
10.01.18 21:04:27 (+0100) # System GPS coordinates: latitude 48.69467, longitude 2.29796, altitude 25 m
10.01.18 21:04:27 (+0100) ### [PERFORMANCE] ###
10.01.18 21:04:27 (+0100) # Upstream radio packet quality: 0.00%.
10.01.18 21:04:27 (+0100) # Semtech status report send.
10.01.18 21:04:27 (+0100) ##### END #####
10.01.18 21:04:27 (+0100) 20:04:27 INFO: [TTN] bridge.eu.thethings.network RTT 22
10.01.18 21:04:27 (+0100) 20:04:27 INFO: [TTN] send status success for bridge.eu.thethings.network
10.01.18 21:04:44 (+0100) 20:04:44 INFO: Disabling GPS mode for concentrator’s counter…
10.01.18 21:04:44 (+0100) 20:04:44 INFO: host/sx1301 time offset=(1515613990s:761196µs) - drift=-9µs
10.01.18 21:04:44 (+0100) 20:04:44 INFO: Enabling GPS mode for concentrator’s counter.

@kalon33 what brand GPS are you using? Does it provide ascii format RMC messages? Those are used to get the time, position information is parsed from other (GGA) messages.

@kersing I’m using a Ublox LEA-M8S GPS, connected through USB. Testing it with cgps gives a proper output:
gps_fix

@kersing looking at this, it seems that cgps is retrieving a time, isn’t it?

An idea?