ABP works, OTAA not


(Makerns) #1

Hi,

I have RN2483 device, and Arduino library is used. I have problem with device OTAA joining. Everything works fine with ABP (joining TTN, sending data…). Join with OTAA always fail…


#2

Are you using the correct AppEUI and AppKey for the registered device?
Is the device in TTN setup for OTAA?

Andrew


(Gry Kyo) #4

I have tripped up on MSB/LSB before, there are comments on the LMIC example which are correct in this respect.

HTH?
Garry


(Makerns) #5

I think yes, for both questions.

First step is changing device settings in TTN console : ABP => OTAA
Next, changing code in example

const char *appEui = “…”;
const char *appKey = “…”;

join_result = myLora.initOTAA(appEui, appKey);

At TTN console

image

From Arduino serial console, I copy-paste Device EUI. App EUI and App Key are copy-paste in Arduino code

After uploading, power cycling… I get this messages in TTN Console, Device data


(Arjan) #6

As the device data is showing the OTAA Join, all works at the TTN side, and the keys are fine and have been accepted.

Next, TTN will have instructed one of the gateways to send the Join Accept response. Apparently the selected gateway is not transmitting that (not likely), or your node is not receiving it.

If TTN has selected your own gateway, then in TTN Console you should see the downlink for the Join Accept in the traffic page of the gateway. (Which still does not tell you your gateway is actually transmitting it, nor if the node is receiving it.)


#7

@makerns
After the ABP join, try sending a downlink message. If it fails, then something is wrong with the downlink path because that is used by both OTAA and the downlink messages as well. I experienced the same issue when a gateway was connected via 3G (because of latency issues).


(Hylke Visser) #8

High latency gateways - with 3G or satellite backhaul - often have issues with downlink. We’re going to do our best to improve support for those in our v3 backend, so be patient :slight_smile:


(Makerns) #9

I am not using 3G or… Gateway is connected to LAN network

Here is my gateway traffic for downlink message while ABP is used


(Arjan) #10

So, again all fine at the TTN side. But are downlinks received by the node when testing with ABP?

(You’ll see downlinks for OTAA Join Accept as well, if TTN instructed your own gateway to send those.)


(Makerns) #11

I am going to make an OTAA node, and will answer if dowlink would be received


(Ho Tho) #12

Hi makerns,
did you solve your issue of failing downlink?
If so, I’d love to learn what you did, since I believe to have the same problem. My environment is based on the P-NUCLEO-LRWAN1 by STM and the EndNode-Example (based on lmic 1.1.1 or 1.1.2, no substantial difference) coming with the board.
However, ABP allows me to upload data the entire way via TTN to Cayenne, but downlink data do no arrive at the node. At least none of my debug statements in the Rx path gets triggered.
I further observed that the frame counter, which is transmitted with the uplink data remains on value 0 and no increment is shown on TTN. It’s still unclear to me, where the cause for my problems exactly is located.
Any ideas would be welcome.
Thomas


(Makerns) #13

No, unfortunately without progress. Soon two LoRa node based on Atmel 32u4 and SX1276 will arrived. One reason for issues with downlink and OTAA could be RN2483 (maybe old firmware). One thing I tested is changing MCU device. No success either with Arduino nor ESP-32 … OTAA joining fails. Downlink message never been received on LoRa Node …

Opposite for this, I have answer for frame counter. Value for frame counter is not calculated on server side. LoRa Endnode sends the value of frame counter. Try to find details about this in TTN documentaion. For ABP you must relax frame counter control, or all payloads with lower frame count will be discarded … or (I don’t know how) store in EEPROM the last value of frame counter and somehow tell LoRa modem to start with that value …