Closed geeksville closed 4 years ago
Reopening, because the cause I suspect was not the cause based on a new report from @sensorsiot. This bug was introduced in 0.6.6ish? And when it occurs the corrupted nodenumber (nodenums should never be zero) gets stored in our saved preferences.
I'll push out a quick build today with this fix.
Fix #153 - details below
Somehow nodenum was getting reset to zero (and saved to flash - which is bad because it makes the failure permanent). So I've changed nodenum selection to occur after we load the saved preferences (and we try to keep nodenum stable in that case).
I'm puzzled as to how it ever got set to zero (unless there shudder is some errant pointer that clobbered it). But next week I'm turning 4 byte nodenums back on, which will make this moot - because they will always be based on macaddr and the current process where nodes haggle with the mesh to pick a unique one-byte nodenum will be gone.