OTAA doesn't work with lmic library and Heltec esp32 lora node

(Gonza Cas) #1

Hi all,
As I said in the title, OTAA doesn’t work. My node send the message to the gateway. The gateway receive the join request and send the join accept message, but I believe that the node never receive this message.
How can I check whether the gateway is sending the join accept to the node or not?

(Quentin Place) #2

are you using "onEvent " function ?
cause it can show you in the serial monitor if you join or not

(Gonza Cas) #3

Yes, I’m using onEvent. I can see the following lines in the monitor.

Packet queued

it remains there, sothe node never achieve to send a message.

(Arjan) #4


(Eric VdB) #5

use https://github.com/ngraziano/lmicesp32 it’s modified to work with the esp32 and works perfectly (even with deepsleep)

(Gonza Cas) #6

Hi arjanvanb,
i added the line “LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);” and now the monitor shows:
Packet queued
534058: EV_TXSTART
1768133: EV_TXSTART
2276229: EV_TXSTART
2850782: EV_TXSTART
3327535: EV_TXSTART
4088931: EV_TXSTART
4607957: EV_TXSTART
5350247: EV_TXSTART
5860852: EV_TXSTART
6406344: EV_TXSTART
6908931: EV_TXSTART
8256967: EV_TXSTART
8792015: EV_TXSTART
10167636: EV_TXSTART
10695536: EV_TXSTART
11079309: EV_JOIN_FAILED
11951339: EV_TXSTART
12485471: EV_TXSTART
13478774: EV_TXSTART
13962837: EV_TXSTART

In every EV_TXSTART the node send an activation message and the gateway respond with the join accept, but the node doesn’t start sending messages.