OTAA and data works to TTN, but stopped after reboot #949
-
Hi! I'm not sure if this is related to Radiolib or not... But when I register new end device on The Things Network console everything works as expected. OTA activation works and Hello World payload get transmitted every minute to the Live Data view. After I restart device everything looks same, serial monitor show transmitted etc... However TTN Console does not show traffic anymore. In Gateway view it clearly indicates that gateway forwards packets to TTN cloud, but Applications -> End Devices does not show any signs of received data. If I manually delete End Device from console and recreate it using same EUIs and Keys it doesn't work. I must generate complete new keys and compile/upload new firmware to device and only after that it works again. However, after I updated to Radiolib 6.4.2 and uploaded new firmware to device, TTN cloud Live Data view started to view packets. But again after I restarted device everything stopped. Core: Raspberry Pi Pico/RP2040 by Earle F. Philhower III When things is not working there are two extra lines visible compared to working scenario:
Whole output (not working example):
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
Hi @jkarjanl thanks for reaching out and providing useful information in the very first post. Two questions:
Maybe enabling Verbose mode on TTN device console shows a bit more as well. |
Beta Was this translation helpful? Give feedback.
-
Not sure how when the OP is clearly breaching the FUP - surely that should put you in to a wait-ready state? I can cobble together a HAT for some of my dormant Pico's for you to test with, probs Thurs as running out of time today |
Beta Was this translation helpful? Give feedback.
Ahh, "there comes the monkey out of the sleeve" - we say in Dutch.
The main takeaway here is that RadioLib implements LoRaWAN v1.1 which requires persistent sessions, or at the very least a persistent DevNonce/JoinNonce counter. And since LoRaWAN is mostly battery-powered, it's best to save/restore the whole session anyway.
And (hopefully) I'm not completely stupid and know about the limited lifetime of flash storage (10k per spec, usually lasts fine up to 100k), so there is quite a bit of logic to make sure that flash lifetime is prolonged as much as possible under normal expected behaviour! E.g. there are 50 bytes available for the lowest byte of the FCntUp, meaning that instead of (>)1…