You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On main.ino, select the end device activation mode by commenting/uncommenting the option.
#define USE_OTAA
//#define USE_ABP
Copy and paste the end device keys on the reserverd variables (lines 13-15 to ABP or lines 22-26 to OTAA) important: In case of OTAA configuration the keys AppEUI and DevEUI must be in lsb format.
You can copy alredy formatted directly by the end device page on TTN. <>Toggle array formatting, <- -> Switch byte order
On arduino-lmic/project_config/lmic_project_config.h comment the line #define CFG_us915 1 and uncomment the line //#define CFG_au915 1
This file should be:
After that step, is necessary add the board. On Tools > Board > Board Manager search for Heltec ESP32 and install.
At last, on Tools > Board > ESP32 Arduino select Heltec Wifi LoRa 32(V2).
Other issues
hal/hal.h hal_init()
In my tests, using Visual Code PlatformIO, I had some issues with the function hal_init() on /arduino-lmic/src/hal/hal.cpp because duplicity with another function alredy setted on Heltec Lora v2 board to PlatformIO. So I just change the name of this function and everythings worked fine.
Credits
This guide is based on ERRC 2021 repository developed by
Francisco Pastório, A., Pedro Cardoso Amâncio de Sá, J., Tavares de Camargo, E., Alexandre Spanhol, F., Antonio Rodrigues, L., & Rossato, J. (2021). Fundamentos de LoRaWAN - Teoria e Prática [Computer software]. https://github.com/afpastorio/ERRC-2021