Using the example code with serial output enabled (MAX_SAVE commented out), I see the following serial output:
09:09:17.533 -> ===================================== 09:09:17.533 -> RAK4631 LoRaWan Deep Sleep Test 09:09:17.533 -> ===================================== 09:09:17.566 -> <BRD> SyncWord = 2414 09:09:17.566 -> <BRD> LoRa Task started 09:09:17.566 -> <LMH> OTAA 09:09:17.566 -> DevEui=<REDACTED> 09:09:17.566 -> DevAdd=00000000 09:09:17.566 -> AppEui=<REDACTED> 09:09:17.566 -> AppKey=<REDACTED> 09:09:17.666 -> <LMH> Selected subband 1 09:09:17.666 -> <LMH> Selected subband 1 09:09:17.666 -> Starting LoRaWan task 09:09:17.666 -> Start network join request 09:10:22.592 -> LoRaWan init success
We can see that it took a full minute to go from
Start network join request to
LoRaWan init success. But even after init success it still hangs as it has not joined.
Looking at the gateway traffic on the TTNv3 console, I see a join request at 9:10:22, and no retries yet (5 minutes) after that.
On the device side I can see the JoinRequest was received, and a JoinAccept was sent at 9:10:24.
In the above feed we need to ignore the duplicate JoinRequests that were received by other gateways. Only the first one is processed.
What likely happens here is that the JoinAccept was either late, or the Wisblock did not receive it.
What I want to see:
- The JoinRequest should be sent immediately, not a full minute after startup. As currently we have the board not sleeping for a full minute.
- The Join should be retried if it failed.
Currently it’s 15 minutes later and the Wisblock still didn’t retry the join, and the serial output is still the same as above.
As a comparison I loaded the LoRaWAN_OTAA_ABP example, using the same keys and OTAA. It joins immediately and successfully directly after startup. This makes me think there is an issue with the DeepSleep example.
RAK4631 is running latest bootloader, and updated BSP and sx126x library (2.0.0).
LoRaWAN_OTAA_ABP output, in which we can see the immediate successful join:
09:25:51.731 -> ===================================== 09:25:51.731 -> Welcome to RAK4630 LoRaWan!!! 09:25:51.731 -> Type: OTAA 09:25:51.731 -> Region: EU868 09:25:51.731 -> ===================================== 09:25:51.731 -> <LMH> OTAA 09:25:51.731 -> DevEui=<REDACTED> 09:25:51.731 -> DevAdd=00000000 09:25:51.731 -> AppEui=<REDACTED> 09:25:51.731 -> AppKey=<REDACTED> 09:25:51.798 -> <LMH> Selected subband 1 09:25:51.864 -> <LM> OnRadioTxDone 09:25:51.897 -> <LM> OnRadioTxDone => RX Windows #1 4989 #2 5995 09:25:51.897 -> <LM> OnRadioTxDone => TX was Join Request 09:25:56.942 -> <LM> OnRadioRxDone 09:26:17.949 -> <LM> OnRadioRxDone => FRAME_TYPE_JOIN_ACCEPT 09:26:17.949 -> OTAA Mode, Network Sending frame now... 09:26:17.982 -> lmh_send ok count 1 09:26:19.279 -> <LM> OnRadioTxDone 09:26:19.279 -> <LM> OnRadioTxDone => RX Windows #1 5030 #2 5995 09:26:25.484 -> <LM> OnRadioRxDone 09:26:25.484 -> <LM> OnRadioRxDone => FRAME_TYPE_DATA_(UN)CONFIRMED_DOWN 09:26:25.484 -> <LM> Calling MacMcpsIndication