After realizing that my project couldn’t use the OTAA.ino template in the ESP32_LoRaWAN library for what I needed it to do, I found the TTN_esp32 library for my node and am trying to use the ttn-otaa.ino template from the TTN_esp32 library. I am having trouble, however getting it to join my gateway. I filled in the devEui, appEui, and appKey properly but still I am unable to join. Does anyone have experience using this library and can tell me what I’m doing wrong?
Firstly devices join the network not a gateway….the gate is just a transparent message conduit. Can you see the join request arrive at the gw? Do you see an outgoing join accept at the gw (you need console view open and live to see these as not stored and are transitory)? From local device serial port/logs do you see the join request go outs and does device receive the join accept if passed by the gw?
Sorry about the wrong terminology. And in the device console I can see that the node is attempting to join but not successful. And in the gateway console “Time sync rejected”
Sadly that’s not a thing either - if the join request is valid, the network server will generate a join accept for transmission by the gateway. If you see a join accept in the device console, then there is an issue with reception of it by the device, which forum search will reveal to be device too close to gateway - 5m + brick wall is the minimum recommendation.
Sorry for the late response. I figured it out. In the library’s project_config file, I had to edit the lmic_project_config file changing the region from this.
// project-specific definitions
#define CFG_eu868 1
//#define CFG_us915 1
//#define CFG_au921 1
//#define CFG_as923 1
// #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP /* for as923-JP */
//#define CFG_kr920 1
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
To this
// project-specific definitions
//#define CFG_eu868 1
#define CFG_us915 1
//#define CFG_au921 1
//#define CFG_as923 1
// #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP /* for as923-JP */
//#define CFG_kr920 1
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
Now everything is working fine.
If you had the incorrect frequencies in use, how did the join accept appear in the device console???
The join accept didn’t appear in the serial monitor window of the device, on the join attempts.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.