LoRaWAN Sample App Fails to Join on nRF52840DK + SX1262

I am running the zephyr LoRaWAN sample app on the Nordic nRF52840DK with a SX1262 shield.  I am also using a Conduit gateway.  Both sides are using the US915 region profile.

I've confirmed the hardware with the simple Tx/Rx and PingPong point-to-point demos.  Also, the MBED LoRaWAN sample app from Semtech, built with Mbed Studio,  runs successfully on the same hardware.

With the zephyr LoRaWAN sample app, I see my Join Request at the gateway and the gateway sends back a successful Join Accept.  But the app does not receive  the response and then times out.

Per the LoRa spec, every Join Request is sent on a random uplink frequency, and the gateway sends back the Accept on a downlink frequency that is derived from the frequency of the Request.  This all appears from the logs to be working correctly.  Sometimes, the gateway sees the Join Request on a frequency that is not what the app sent it on.  Of course, when this happens, the gateway responds on the wrong downlink frequency and the device does not see the Accept response, because it is listening on the expected downlink frequency.  However, I also see this same behavior with the working MBED app, so it must be normal.  The MBED app sends out another Join Request and keeps trying until the gateway responds on the expected frequency.  Then the connection is successful.

But on the zephyr app, even when the gateway receives the Join Request on the correct frequency and sends back the Accept on the correct downlink frequency, where the app is listening, the app does not receive the message and then times out.  Occasionally (1 out of 30-40 attempts), the app gets an interrupt indicating a preamble was detected.  This should be followed by interrupts for valid header and complete RX packet.  But I don’t see that.  I modified the app to retry upon failed joins.

My build is from the Nordic SDK nRF Connect v2.1.0.  Some of the key components are located here:

  • Main app                                     zephyr\samples\subsys\lorawan
  • LoRaWAN subsystem             zephyr\subsys\lorawan
  • LoRaMac module                     modules\lib\loramac-node\src\mac
  • SX1262 driver                            zephyr\drivers\lora

I have added some debug logs to printout the Tx and Rx frequencies for the Join messages, so that I can correlate with messages on the gateway.

Parents Reply Children
No Data
Related