Giter Club home page Giter Club logo

Comments (7)

FlorianLudwig avatar FlorianLudwig commented on May 20, 2024 2

To reduce write wearing only persist counters every n packages and when rejoining just add n to the counter. This way the join works and the network still accepts the packages and regard the counter difference as package loss.

n should depend on send interval.

from esp32-paxcounter.

cyberman54 avatar cyberman54 commented on May 20, 2024 1

Could be a way. Another, maybe more straight forward way, would be to create/open a separare, second partition in NVRAM and store it there.

from esp32-paxcounter.

stkdiretto avatar stkdiretto commented on May 20, 2024

I am currently looking into this since I could need this in another project also. Do you suggest storing the data in the configdata_t struct? I'd check for set parameters on reboot and using them if available.

from esp32-paxcounter.

stkdiretto avatar stkdiretto commented on May 20, 2024

I have to dig into the storing mechanism a bit more. Your suggestion sounds more feasible – from what I've interpreted so far, saving the data would always mean storing all the variables. Since seqnoDn and seqnoUp need to be saved on every package, that might wear out the nvram rather quickly.

from esp32-paxcounter.

cyberman54 avatar cyberman54 commented on May 20, 2024

This lib could / should be useful here:
https://github.com/espressif/arduino-esp32/blob/master/libraries/Preferences/src/Preferences.h

from esp32-paxcounter.

cyberman54 avatar cyberman54 commented on May 20, 2024

Example how to save keys in RTC RAM of ESP32 while deep sleep:

manuelbl/ttn-esp32#15

from esp32-paxcounter.

cyberman54 avatar cyberman54 commented on May 20, 2024

RTC RAM save keys is now implemented.

from esp32-paxcounter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.