How to accomplish lora.nvram_restore() ?
I'm trying to understand saving & restoring lora nvram.
In boot.py I connect to TTN, send a packet, and do "lora.nvram_save()".
the packet is received.
from network import LoRa
lora = LoRa(mode=LoRa.LORAWAN)
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
s.setsockopt(socket.SOL_LORA, socket.SO_DR, 3)
The second packet is not received.
I've also tried lora = LoRa(). Also no success.
Any idea what I'm missing?
Yes, thank you. I know I only need save/restore for deepsleep. But was testing it without deepsleep. Shouldn't it still work?
Still looking for any posted example of use of save / restore.
Yes, splitting code irrelevant if deepsleep.
jcaron last edited by
@jalperin you only need to use
nvram_restoreif you use deep sleep.
comment out lora.nvram_restore() and the second message is received.
Do I need more code or is the restore messing up?