Azure / iotedge-lorawan-starterkit

Sample implementation of LoRaWAN components to connect LoRaWAN antenna gateway running IoT Edge directly with Azure IoT.
https://azure.github.io/iotedge-lorawan-starterkit/2.2.1
Other
184 stars 61 forks source link

Messages not sent to the cloud #269

Closed levalencia closed 3 years ago

levalencia commented 4 years ago

All the 4 modules are up and running and I can see the following with docker logs in the Forwarder

##### 2020-10-23 06:10:23 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 2
# CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
# RF packets forwarded: 0 (0 bytes)
# PUSH_DATA datagrams sent: 1 (113 bytes)
# PUSH_DATA acknowledged: 100.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): 379282393
src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled
##### END #####

JSON up: {"stat":{"time":"2020-10-23 06:10:23 GMT","rxnb":2,"rxok":0,"rxfw":0,"ackr":100.0,"dwnb":0,"txnb":0}}
INFO: [up] PUSH_ACK received in 0 ms
INFO: [down] PULL_ACK received in 0 ms
INFO: [down] PULL_ACK received in 0 ms
INFO: [down] PULL_ACK received in 0 ms

INFO: Received pkt from mote: BEACE100 (fcnt=1)

JSON up: {"rxpk":[{"tmst":432653204,"chan":4,"rfch":0,"freq":867.300000,"stat":1,"modu":"LORA","datr":"SF12BW125","codr":"4/5","lsnr":-1.2,"rssi":-108,"size":28,"data":"QADhrL4AAQABWSbyd2uv6M/AzxDz5sEQ/lIzFg=="}]}
INFO: [up] PUSH_ACK received in 0 ms

INFO: Disabling GPS mode for concentrator's counter...
INFO: host/sx1301 time offset=(1603433013s:457719µs) - drift=333µs
INFO: Enabling GPS mode for concentrator's counter.

So there are lots of messages, some are really simple like this: JSON up: {"stat":{"time":"2020-10-23 06:10:23 GMT","rxnb":2,"rxok":0,"rxfw":0,"ackr":100.0,"dwnb":0,"txnb":0}}

Which I am going to suppose that this is a Status message from the device to cloud.

and then I get this: [{"tmst":432653204,"chan":4,"rfch":0,"freq":867.300000,"stat":1,"modu":"LORA","datr":"SF12BW125","codr":"4/5","lsnr":-1.2,"rssi":-108,"size":28,"data":"QADhrL4AAQABWSbyd2uv6M/AzxDz5sEQ/lIzFg=="}]}

which I am going to suppose is the payload of my lorawan sensor message which I have to decode.

However, no messages are received in IoTHub. I tried to monitor via the endpoint using VScode and Visual Studio but I get this error which I dont know how to troubleshoot.

[IoTHubMonitor] Start monitoring message arrived in built-in endpoint for device [58a0cb00001087ed] ...
[IoTHubMonitor] Created partition receiver [0] for consumerGroup [$Default]
[IoTHubMonitor] Created partition receiver [1] for consumerGroup [$Default]
[IoTHubMonitor] At least one receiver for the endpoint is created with epoch of '325', and so non-epoch receiver is not allowed. Either reconnect with a higher epoch, or make sure all epoch receivers are closed or disconnected. TrackingId:7820ccc9-5616-45ec-9741-ca4249ccf48d_B40, SystemTracker:iothub-ns-belvaiotpo-4065561-9e6a99dc51:eventhub:belvaiotpochub~16383, Timestamp:2020-10-30T10:31:25 Reference:62ae0a05-4037-43ba-a31f-f43a414b09fc, TrackingId:8bfbfae5-27bb-4b92-bbbf-c7dbb965e40d_B40, SystemTracker:iothub-ns-belvaiotpo-4065561-9e6a99dc51:eventhub:belvaiotpochub~16383|$default, Timestamp:2020-10-30T10:31:25 TrackingId:f2b8e8de599f4f0888915b9c8fa5d93c_G28, SystemTracker:gateway5, Timestamp:2020-10-30T10:31:25
[IoTHubMonitor] Message monitoring stopped. Please try to start monitoring again or use a different consumer group to monitor.

I did a test using a .net core app to send messages to the cloud : https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-dotnet and this works perfectly fine.

Can you give me advice in how to troubleshoot?

levalencia commented 4 years ago

The server module 👍

pi@raspberrypi:~ $ sudo docker logs LoRaWanNetworkSrvModule 2020-10-19 16:23:49.796 Starting LoRaWAN Server... 2020-10-19 16:24:24.308 Facade function url: https://abc.azurewebsites.net/api/ 2020-10-19 16:24:24.527 Log Level: Error