• 4 Votes
    2 Posts
    95 Views
    robert-hhR
    @d-alvrzx I strongly support this request. I see, that restoring some of the data may cause trouble, if restore is executed multiple time w/o a save in between. Like the packet counters. But that is less cumbersome than loosing all data. See also my notes here to retrieve individual elements: https://forum.pycom.io/topic/5922/an-alternative-to-nvram_save-restore-using-the-sd-card/6?
  • deepsleep pulse counting

    GPy deepsleep gpy nvram amr
    2
    0 Votes
    2 Posts
    388 Views
    P
    Hi Drop an email to sales@pycom.io with the details :)
  • 1 Votes
    7 Posts
    2k Views
    T
    @jcaron Just to clarify something from our use case: In our experience using the same frame counter is not a problem with our private instance of a TTN server. How we do it now is that we restore from nvram and save it immediately after. This is so we don't need to think about it again. I understand ADR will not work for us here, but it is still a lot easier and spares us from some logic with exception handling and still keeping the session and avoiding a new join. We also do not need to receive responses. We are basically using it as a makeshift abp connection, as our setup and back-end does not support abp. Having a function that restores the session without erasing it would actually be quite nice for our case. This, as far as I understand it from TTN, does also work for the public TTN network, but I have not confirmed this. Is there some way of getting all connection details down in a file so we could save it to an SD card instead? This would actually allow us to quite efficiently create devises and manage the things for our system.
  • 0 Votes
    4 Posts
    1k Views
    G
    @jcaron Thanks. Just to note this method works also for both a software reset AND powercycle.
  • lora.nvram example needed

    LoPy nvram deepsleep lopy nvram lopy lorawan
    8
    0 Votes
    8 Posts
    3k Views
    G
    I know this is an old post but for me this is still an issue. Any may of learning more about the specifics would be very much appreciated e.g what does pycom.nvs_get(key) return? Should I see somthing in the REPL? Example: >>> lora.nvram_save() >>> l= pycom.nvs_get('lora') >>> print(l) None Am I going about this in completely the wrong way?
  • nvram_save() and nvram_restore() error codes?

    LoPy lopy nvram error
    1
    0 Votes
    1 Posts
    813 Views
    No one has replied
  • 1 Votes
    6 Posts
    3k Views
    J
    @dbrgn The library may also have a local cache, which would be used for reading, and could compare values against the cache before actually writing to flash. There could also be some way to write only a few bytes rather than full sectors like a filesystem would do, not sure if that's actually possible with the flash interface used.
  • Has anyone successfully used lora.nvram_save() and restore?

    LoPy lopy lora nvram
    17
    0 Votes
    17 Posts
    5k Views
    B
    @jcaron The issue has been worked out and it works quite well now! Thanks a lot!