lorawan nanogateway pytrack gps
-
Hello everyone,
I have a fipy connected to a pytrack board, I am using the setup as a lorawan nano gateway. The programming is such that it picks GPS location and builds the payload adding the location as part of the udp packetdef _make_node_packet(self, rx_data, rx_time, tmst, sf, bw, rssi, snr): lat, long = getloc() RX_PK["rxpk"][0]["time"] = "%d-%02d-%02dT%02d:%02d:%02d.%dZ" % (rx_time[0], rx_time[1], rx_time[2], rx_time[3], rx_time[4], rx_time[5], rx_time[6]) RX_PK["rxpk"][0]["tmst"] = tmst RX_PK["rxpk"][0]["freq"] = self._freq_to_float(self.frequency) RX_PK["rxpk"][0]["datr"] = self._sf_bw_to_dr(sf, bw) RX_PK["rxpk"][0]["rssi"] = rssi RX_PK["rxpk"][0]["lsnr"] = snr RX_PK["rxpk"][0]["lat"] = lat RX_PK["rxpk"][0]["long"] = long RX_PK["rxpk"][0]["data"] = ubinascii.b2a_base64(rx_data)[:-1] RX_PK["rxpk"][0]["size"] = len(rx_data) return ujson.dumps(RX_PK)this is the sample packet sent to the server
[ 597.437] Received packet: {"rxpk": [{"rfch": 0, "freq": 868.1, "long": 36.77718, "data": "QA0AABcARwcBD+JLPezpX6pRMFTl0A2O4d12u6SftNVgOEE/uRKh7rUm", "lsnr": 6.0, "codr": "4/5", "datr": "SF12BW125", "time": "2018-12-05T06:25:59.808526Z", "modu": "LORA", "size": 42, "lat": -1.29687, "tmst": 994609182, "stat": 1, "chan": 0, "rssi": -48}]}It works but occassionally I get this output on the console:
Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Register dump: PC : 0x400fd268 PS : 0x00060e30 A0 : 0x800ddda4 A1 : 0x3ffdbc90 A2 : 0x00000001 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x00000001 A6 : 0x00000000 A7 : 0x00060023 A8 : 0x800fc05a A9 : 0x3ffe70f0 A10 : 0x00000001 A11 : 0x00000001 A12 : 0x3f94fe00 A13 : 0x3f94fe00 A14 : 0x3ffe7260 A15 : 0x3ffe71c0 SAR : 0x00000020 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000001 LBEG : 0x4009b414 LEND : 0x4009b41f LCOUNT : 0x00000000 Backtrace: 0x400fd268:0x3ffdbc90 0x400ddda1:0x3ffdbcb0 0x400dde0b:0x3ffdbcd0 0x400de2d1:0x3ffdbd00 0x40108a7e:0x3ffdbd20 0x400f4fbe:0x3ffdbd50 0x400f1945:0x3ffdbd80 0x400fcd33:0x3ffdbda0 0x400f5048:0x3ffdbe40 0x400f1945:0x3ffdbe80 0x400fcd33:0x3ffdbea0 0x400f5048:0x3ffdbf40 0x400f1945:0x3ffdbfc0 0x400f1972:0x3ffdbfe0 0x400de363:0x3ffdc000 0x400de634:0x3ffdc0a0 0x400dd345:0x3ffdc0c0i also get this log
[ 597.870] Downlink timestamp error!, t_us: 4292846312plus some very long core dump. What could be causing this issue?
-
Try using :
import gc ... gc.collect()the last line in some parts of the nanogateway code. Maybe is out of memory issue creating that error.
-
@rcolistete thank you for the pointer I have tried and no problems so far I'll give it a couple of days before sending it to the wild :)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login