Raspberry Pi 3 + IC880a + GPS


(Kalon33) #41

@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…


(Kalon33) #42

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.


#43

@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.


(Kalon33) #44

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


(Kalon33) #45

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

An idea?


(Kalon33) #46

May it be linked to the fact that I concurrently have both NMEA and UBX messages flowing?


(Bsiege) #47

Maybe it is a misinterpretation of GST and it takes the time from here:


#48

It might well be receiving a time, however the packet forwarder requires RMC messages and those I don’t see.

Please try to disable the binary format messages and make sure the NMEA output contains lines with RMC output. For testing it would be best if you can use something simple that just shows the output of the GPS without trying to interpret it. Something as simple as ‘cat < /dev/ttyACM0’ sometimes works (depends on default speed when opening the port).


(Kalon33) #49

OK I will try that. I have RMC (see gpsmon output below), but data is “blinking” (sometimes is displayed, sometimes not, multiple times per second); maybe due to binary format messages.


(Kalon33) #50

OK, I just disabled binary format message, have made sure there is RMC output, but still,

16.01.18 20:21:28 (+0100) ### [GPS] ###
16.01.18 20:21:28 (+0100) # Invalid gps time reference (age: 1516130488 sec)
16.01.18 20:21:28 (+0100) # System GPS coordinates: latitude 48.69466, longitude 2.29817, altitude 52 m

That happens only using USB. When using UART or UART to USB converter… that works. Why??

BTW, do you know how to enable beaconing via resin.io (using an environment variable maybe)?

Thanks for your help :slight_smile:


#51

Sorry, I don’t understand what you are saying. Are you saying GPS with time works OK when the GPS module is connected using UART?

You will not be able to enable beacons without working GPS time. Also you need to connect PPS from GPS to the iC880a board before it can work. If that is in place we can enhance the resin.io setup to enable beacons. Current script does not support it as far as I know.


(Kalon33) #52

I just tested interfacing UART GPS interface with my RPi3 using a UART to USB module, and this time GPS with time works

16.01.18 22:42:45 (+0100) ### [GPS] ###
16.01.18 22:42:45 (+0100) # Valid gps time reference (age: 1 sec)
16.01.18 22:42:45 (+0100) # System GPS coordinates: latitude 48.69464, longitude 2.29831, altitude 51 m

Still, it doesn’t work using USB interface from GPS to USB interface of RPi3 (only position, not valid time)

Is that easy to do now that I have working time?


#53

Do you have PPS connected as required?

No, not simple. Will have to wait for the weekend before I got time to look into it. Sorry…


(Will3509111) #55

I think you need to enable UBX over USB using U-center, and make sure you can save the config.


(Kalon33) #56

Dear @kersing, did you had some time to have a look at it?


#57

Sorry, had to fix more urgent (affect more users) issues first.


(Duineuk) #58

Evening all. This is a simple question which I can’t seem to find the answer to.

I want to bring the Raspi activity LED to the front panel on my gateway. Is there any way to install the ‘act_led_gpio’ overlay in my docker container?

Alternately, I think I can map the GPIOs to a file… is there a script which can map activity to a file?


(Amedee) #59

Not sure what you mean with

in particular in docker…

AFAIK act_led_gpio is an overlay parameter, not an overlay by itself.

And why don’t you just set it in config.txt?

(If it is for a resin.io deployment, you can set the dt parameters in your device config in resin…)


(Duineuk) #60

Aha! I see it:

“i2c_arm=on”,“spi=on”,“audio=on”

I’m about 2 minutes from screwing the case together and taking the beauty shots. Maybe I’ll do it another time! :slight_smile:
Thanks


(Duineuk) #61

I’ve added a GPS module to my dev gateway, bringing it to the same h/w spec as production. It is working (console sees it and it’s routing traffic), but it’s a constantly flagging an error and the machine is running very hot:

16.03.18 08:32:49 (+0000) main 08:32:46 WARNING: [gps] read() returned value 0
16.03.18 08:32:49 (+0000) main 08:32:46 WARNING: [gps] read() returned value 0
16.03.18 08:32:49 (+0000) main 08:32:46 WARNING: [gps] read() returned value 0
16.03.18 08:32:49 (+0000) main 08:32:46 WARNING: [gps] read() returned value 0
16.03.18 08:32:49 (+0000) main 08:32:46 WARNING: [gps] read() returned value 0
16.03.18 08:32:49 (+0000) main 08:32:46 WARNING: [gps] read() returned value 0
16.03.18 08:32:49 (+0000) main 08:32:46 WARNING: [gps] read() returned value 0

Any suggestions? Exact same spec and modules as the other one, and same resin.io build.

This is actually the issue I couldn’t fix on the manual build which made me try resin.

?