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.main.py is:
from network import LoRa
import socket
lora = LoRa(mode=LoRa.LORAWAN)
lora.nvram_restore()
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
s.setsockopt(socket.SOL_LORA, socket.SO_DR, 3)
s.setblocking(False)
s.send('LoRa Continues')The second packet is not received.
I've also tried lora = LoRa(). Also no success.
Any idea what I'm missing?
-
Update.
comment out lora.nvram_restore() and the second message is received.
Do I need more code or is the restore messing up?
-
-
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login