TheThingsNetwork / arduino-device-lib

Arduino Library for TTN Devices
MIT License
208 stars 96 forks source link

Should the examples be updated to deal with expired sessions #273

Open gonzalocasas opened 3 years ago

gonzalocasas commented 3 years ago

As far I can see, the example code only tries to join on setup() but if the session expires (i.e. as in the case of the V2->V3 migration), the node would not be able to realize and would keep sending messages that don't arrive anywhere.

jpmeijers commented 3 years ago

Yes we indeed have a problem here. I was hoping that the RN2483 had LinkCheck enabled by default, but apparently not: image

In other stacks like LMiC the examples also disabled LinkCheck, and it was up to the user to enable ADR and LinkCheck: https://github.com/matthijskooijman/arduino-lmic/blob/master/examples/ttn-otaa/ttn-otaa.ino#L93

This is therefore a wider topic than just the arduino device lib.

Personally I have many devices out in the field using LMiC, but I believe I enabled LinkCheck and ADR on them. And hopefully that will cause a re-join.