Quantcast
Channel: The Things Network - Latest posts
Viewing all articles
Browse latest Browse all 116818

New backend. How to connect?

$
0
0

if these sensors use OTAA, they could join again using OTAA, this resets the frame counter.

When using ABP, the frame counter should be stored somewhere in the device's non-volatile memory space (RAM, EEPROM).
Note that it is always possible there is a gap in the counter. If you write your own code for the sensors, just store a 1000 increment for the frame counter and start from there after a power surge.
So on initial start, you read the frame counter from EEPROM (0) add 1000 and store it again (1000). Then start your software using the frame counter read (0). After a power surge, you read the counter (1000), increment and store (2000) and start from frame counter 1000. As soon as you reach 2000, store the next 1000s (so now 3000) in EEPROM.
Don't worry about EEPROM wearing out or the fact that you run out of numbers - LoRaWAN will be replaced by something new long before your counters expire.

Resetting the counters using ttnctl is something you only want to do while developing code for your new sensors


Viewing all articles
Browse latest Browse all 116818

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>