My Heltec Cubecell AB01 boards work fine on TTN V2 ABP.
Now I want to test one on V3 but the information on the Heltec site is outdated, the instructions describe TTN V2. I also wonder if the example sketch ‘LoRaWan’ is still usable, ABP data is (also) defined and I want to use OTAA as recommended for TTN.
Does anyone have a sample sketch - or link - for the AB01 with TTN V3 and OTAA?
Heltec LoRaWan sketch: https://github.com/HelTecAutomation/CubeCell-Arduino/tree/master/libraries/LoRa/examples/LoRaWAN/LoRaWan
Your device code is the same - other than using credentials from V3 console.
For OTAA, yes.
ABP implementations have to have their downlink windows explicitly adjusted.
If I’m not mistaken, the demo sketch I mentioned always uses ABP and a first step would be to change that to OTAA.
In the sketch I find this:
// OTAA or ABP //
bool overTheAirActivation = LORAWAN_NETMODE;
That will have to do with that, but I found no further information about that.
Your right, plus you change the TTN credentials that you get from your device in V3 console.
For OTAA you will need to set appEui, devEui, and appKey - there is lots of info on the forum re this, plus lots of help on the Heltec one too.
LORAWAN_NETMODE is defined normally in platformio.ini (for vscode) or it pulled via the Arduino IDE settings.
Just change to >> bool overTheAirActivation = OTAA;
That should override everything anyway,
If you are using the Arduino coding app then the drop down config menu they use will have an ABP/OTAA option somewhere.
If only everything were so easy Thanks!
I am having a great deal of difficulty getting devices, Heltec CubeCell HTCC AB01 for example, connected to TTN.
My Gateway (LPS8) is registered and shows activity:
and the CubeCell device I have registered under an Application is attempting to Join as far as I can tell. However, the device is reporting that the Join is failing and the led on the device goes through the sequence Blue, Green, then Red. At no time to I get the device joined.
I am using the repo https://github.com/HelTecAutomation/Heltec_ESP32 and followed the instructions for both the Boards Manager and manual install of the libraries in a Windows environment here - https://github.com/HelTecAutomation/CubeCell-Arduino/blob/master/InstallGuide/windows.md
Device Live Data is:
Not sure why this is being so difficult.
It’s not, LoRaWAN isn’t easy. Most of LoRaWAN is non-trivial so best reset you expectations of what is easy and what isn’t - dealing with teenagers isn’t easy - LoRaWAN is by comparison - but negotiating with gravity is very easy - you don’t.
- You clearly aren’t on ABP as you and the logs talk about joining - so you are on actually using OTAA - a critical difference. Best you learn LoRaWAN basics before you lose days of your life: https://www.thethingsnetwork.org/docs/lorawan/
- Most LoRaWAN implementations aren’t able to cope with the recommended all zeros’ JoinEUI for OTAA for reasons we can’t solve right now - generate a App/JoinEUI here: https://descartes.co.uk/CreateEUIKey.html