I have been working on a new device using MCCI LMIC library (latest version) and ESP32 TTGO T-Beam however I am having problems getting OTAA working with V3…
I tried it on V2 using separate app / dev EUI and it works just fine connecting to TTN V2 via my TTIG.
I tried it on Helium using another device registration and my Helium hotspot, it works fine.
I tried it on V3 with my V3 Pi based GW and it gets stuck in a join loop…
The above makes me think my code is ok and its something V3 specific.
Sure, I get that it works I have other devices working in V3 with OTAA, it was more I have exhausted troubleshooting with this LMIC based device, and it has worked fine in V2 and other networks so I am confused what the problem is with getting it running with V3. Are there any common gotchas I should checkout?
No luck I am afraid. It is very odd, I am only having problems with LMIC library, I have other devices which are on TTN V3 with OTAA working just fine, like I said it works fine with V2 and Helium, so I think the code is sufficient, maybe there is something with the timings on V3 which I am missing or some other problem?
BTW here is the raw output of the LMIC debug in the serial when the JOIN is attempted…
and the gateway and the node…
Don’t worry about exposing the keys its a temp test app / node.
I am guessing the “RX timeout” means it never got a packet back from the gateway, but it’s easily in range of 2 or 3 V3 gateways and a V2 gateway.
The gateway is using EU868 and is configured with the global_config.json file downloaded from the V3 console.
The LMIC project_config.h defines EU868 as the region and in the code it runs LMIC.dn2dr to set SF9 DR, however it is odd that in the serial output it seems to listen on SF12 for the downlink. I have tried using both EU868 SF9 and SF12 options in the device config in V3 console to no avail. It isn’t my code so maybe the dn2dr happens too late, I’ll move it to right after the LMIC.reset so we know it has happened prior to the join.
I think you should focus on RX1. The LMIC debug output suggests the receive window is opened a bit after 5 seconds, not at 5 seconds exactly. That might be late.
For joins RX2 should use SF12. Don’t adjust it. Only for ABP you need to adapt RX2 SF.
Ok I have done some adjustments with the LMIC_setClockError on this board and have it as near as I can get it to 5 seconds on the RX1 (SF7) and 6 seconds on the RX2 (SF12) after transmission…
So Join TX happens at 39:57.695 and RX1 window opens at 40:02.679 aka just under 5 seconds later. Is it really that picky over ~20ms?