A question about /tmp/thread /userdata/thread #66
-
|
I'm setting up one gateway to use it for thread (mind me, I have no thread devices but I have an Ikea nearby 😉) and I see that the otbr-agent works with the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Mmh, why didn't I read the comment in the init script? 🙄 but if that's the only thing changing and OpenThread recovers, it shouldn't be necessary to copy |
Beta Was this translation helpful? Give feedback.
-
|
Both issues are fixed in v2.1.0. The 60-second problem: you're right, the old script only synced once ~60s after boot. If you configured the Thread network later, the dataset was never persisted. v2.1.0 replaces this with a persistent sync daemon that polls What changes and when: the active dataset (network key, channel, PAN ID, etc.) only changes when you form or reconfigure the network — not during normal operation. Frame counters (anti-replay nonces) update on every transmission (~480 times/day), but these are ephemeral and stored in RAM only. On power loss: OpenThread recovers automatically by jumping the frame counter ahead on next boot. The persistent data that matters (network credentials, dataset) is synced to flash by the daemon. So the only thing lost on power loss is a few seconds of frame counter advancement — no network rejoin needed. On clean shutdown: S70otbr traps SIGTERM and does a final sync, plus the new |
Beta Was this translation helpful? Give feedback.
-
|
nitpicking here, but
as I said, it's just nitpicking |
Beta Was this translation helpful? Give feedback.
@olivluca Your "nitpicking" is always spot-on — please never stop! Both fixed in v2.1.1.
First poll: the daemon now seeds
last_datasetfrom the REST API (/node/dataset/active) before entering the loop. Tested: the dataset is already available ~5s after otbr-agent starts (even while still in "detached" state), so the seed captures the existing dataset and the first poll sees no change — no redundant write.Clean stop: removed the unconditional
cpfrom both the trap and thestop)handler. The daemon already syncs to flash whenever the dataset changes — no need for a final copy. Frame counters are ephemeral (OpenThread recovers by jumping ahead on next boot).