# Simplest low-cost forever-persistent storage method for sensor data

**URL:** <https://www.thethingsnetwork.org/forum/t/simplest-low-cost-forever-persistent-storage-method-for-sensor-data/37202>\
**Category:** Uncategorized\
**Created:** [May 20, 2020, 6:03pm UTC](https://www.thethingsnetwork.org/forum/t/simplest-low-cost-forever-persistent-storage-method-for-sensor-data/37202 "2020-05-20T18:03:20Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [May 23, 2020, 9:21pm UTC](https://www.thethingsnetwork.org/forum/t/simplest-low-cost-forever-persistent-storage-method-for-sensor-data/37202/17 "2020-05-23T21:21:18Z")

</div>

> [@arjanvanb](#):
>
> you will also have to validate the MIC to know for sure which device has sent the data, [as a DevAddr is not unique](https://www.thethingsnetwork.org/forum/t/how-does-a-network-know-a-received-packet-is-for-them/2735/2).

…which also needs you to keep track of the full uplink counter, as the LoRaWAN packet only includes 16 bits of that counter, but the MIC is calculated [using the full counter](https://www.thethingsnetwork.org/forum/t/after-resetting-frame-counters-payload-is-shown-on-gateway-traffic-but-not-in-application/19331/12), which might be 32 bits. You’ll [need the full uplink counter](https://lora-alliance.org/sites/default/files/2018-05/lorawan1_0_2-20161012_1398_1.pdf#page=20) for decryption of the application payload as well.

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/simplest-low-cost-forever-persistent-storage-method-for-sensor-data/37202)._
