Hi Folks,
I’ve been working on writing some documentation for connecting a device using OTAA with the Arduino LMIC libraries, however during my debugging it’s become apparent that I’m missing a connection in the setup somewhere.
The full history of what I’m up to is at https://github.com/brocaar/lora-app-server/issues/259, however the following is what I see in the loraserver logs when a device tries to join:
Aug 22 19:32:21 mbc-loranode1 loraserver[4761]: time="2018-08-22T19:32:21Z" level=info msg="backend/gateway: rx packet received"
Aug 22 19:32:21 mbc-loranode1 loraserver[4761]: time="2018-08-22T19:32:21Z" level=info msg="packet(s) collected" dev_eui=00415ee3b9a02d4a gw_count=1 gw_macs=<GWMAC> mtype=JoinRequest
Aug 22 19:32:21 mbc-loranode1 lora-app-server[4747]: time="2018-08-22T19:32:21Z" level=info msg="js: request received" message_type=JoinReq receiver_id=0000000000000000 sender_id=010203 transaction_id=3455401306
Aug 22 19:32:21 mbc-loranode1 lora-app-server[4747]: time="2018-08-22T19:32:21Z" level=info msg="device-keys updated" dev_eui=00415ee3b9a02d4a
Aug 22 19:32:21 mbc-loranode1 lora-app-server[4747]: time="2018-08-22T19:32:21Z" level=info msg="js: sending response" message_type=JoinAns receiver_id=010203 result_code=Success sender_id=0000000000000000 transaction_id=3455401306
Aug 22 19:32:21 mbc-loranode1 loraserver[4761]: time="2018-08-22T19:32:21Z" level=info msg="device-queue flushed" dev_eui=00415ee3b9a02d4a
Aug 22 19:32:21 mbc-loranode1 loraserver[4761]: time="2018-08-22T19:32:21Z" level=info msg="device-session saved" dev_addr=07ab7b1f dev_eui=00415ee3b9a02d4a
Aug 22 19:32:21 mbc-loranode1 loraserver[4761]: time="2018-08-22T19:32:21Z" level=info msg="device-activation created" dev_eui=00415ee3b9a02d4a id=16
Aug 22 19:32:21 mbc-loranode1 loraserver[4761]: time="2018-08-22T19:32:21Z" level=info msg="backend/gateway: publishing tx packet" qos=0 topic=gateway/<MAC>
In the UI under “Device -> Live LoRaWAN Frames” I see the join request/accept:
but the device doesn’t join, and is never activated.
One thing I have noticed is that the message queue is suspiciously quiet - I see the gateway traffic going in, along with the messages from the device, but I don’t see anything being sent that might constitute a “join” message:
{"mac":"c0ee40ffff2943ba","time":"2018-08-23T06:26:15Z","rxPacketsReceived":2,"rxPacketsReceivedOK":2,"txPacketsReceived":0,"txPacketsEmitted":0,"customData":null}
{"rxInfo":{"mac":"c0ee40ffff2943ba","time":"0001-01-01T00:00:00Z","timestamp":1776993643,"frequency":868500000,"channel":2,"rfChain":1,"crcStatus":1,"codeRate":"4/5","rssi":-52,"loRaSNR":7,"size":24,"dataRate":{"modulation":"LORA","spreadFactor":7,"bandwidth":125}},"phyPayload":"QAQpASaAgDMBh3jtzXbc1BDOwRp4yj4A"}
I’m sure I’m missing something obvious, hopefully someone here can point out what it is!