Node loops in join accept

Hi there,

I’ve been trying to make my node work for the past week and I still can’t manage to make it work.

I am in Canada using a BSFrance v1.3 32u4ii (clone of adafruit feather) and I setup a Rak gateway (Rak2245 pi hat) that I’ve configured accordingly.

The sketch I am using is the example LMIC ttn-otaa-feather-us915-dht from MCCI V3.10. This is the results I am getting:

From the device in Serial:


Starting
Temperature: nan *C
%RH nan
314613: EV_JOINING
315193: EV_TXSTART
719901: Unknown event: 20
721247: EV_TXSTART
1104576: Unknown event: 20
1310937: EV_TXSTART
1715651: Unknown event: 20
...

From the device in TTN:
image

From the gateway in TTN:
image

Sample Activation from Device Console:
image

Sample Join Request from Gateway Console:
image

Sample Join Accept from Gateway Console:
image

It seems I am stuck in a Join Request/Accept loop and I don’t know why.

So far I’ve been looking at a bunch of forum posts to try and figure out what is going on so this what I’ve tried :

  • Double check Device EUI (lsb), App EUI(lsb), App Key(msb)
  • Make sure my Gateway is configured for US915
  • Make sure my project_config contains US915, Lora version 1.0.2
  • Make sure my lmic pinout is correct
  • Make sure my gateway is far enough from my node (over 10m)
  • Added LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);
  • Tried different MCCI librairy version

I don’t know what to try next and I’m losing hope. Hopefully I gave enough valuable informations to get some help.

Thank you

On the TTN side, the Join Request is accepted, so the keys and all should be okay. But somehow either the gateway is not transmitting the Join Accept though it has been told to do so (see the gateway’s logs; any chance there’s a lot of network latency?), or the device is not receiving or not handling it.

So, look in the gateway’s logs. Also, I’d focus on the following:

The nans seem to indicate the sensor did not return any reading. That doesn’t look good and could very well be related to wiring or pin mapping, or to using a wrong library for your sensor. Both might also affect the working of the LoRa chip.

Assuming you meant 3.1.0, then as per the 3.1.0 code:

…the index 20 is EV_JOIN_TXCOMPLETE. So, that should be handled just fine by the example code you’re using:

I’d guess you’re using a different library than you think you are. (Or are not using the 3.1.0 example. Next time, please link to the code you’re using.)

Given that join accepts are being generated by the network, it’s likely that the node is either not activating the receiver at the precisely correct time, or not activating them at all.

Receive window timing has historically been very hard to get right in LMiC particularly when trying to make it portable, and less common platforms like the ATmega32u4 are going to make it trickier still. The main development platforms for that repo are the Feather M0 and their custom BSP for their STM32L073 board, those are most likely to work right.