Closed BOBAH1248 closed 2 years ago
Eah, it turns out that I myself called the reset command (which will clean up all settings). And because it's dangerous command in my case, I will preserve the network settings, by fixing:
for(uint16_t i = EEPROM_DISTANCE_ADDRESS; i < EEPROM_SIZE; i++)
eeprom_update_byte((uint8_t *)i, EEPROM_ERASED_BYTE);
I use the latest pre-compiled hex from "compiled" folder with jkandasa MyController.org. First OTA update went well. But subsequent updates issue the BL_CMD_CLEAR_EEPROM command, which destroys NODE_ID and PARENT_NODE_ID.
https://github.com/mysensors/MySensorsBootloaderRF24/blob/335f9bd15ee78b9f2fa7109981433606a34a12dc/MySensorsBootloader.h#L252
As a result, the controller loses the device and cannot send firmware to it.
In my case, it's even worse, because I have 100 identical devices on the network with the same firmware, which I only distinguish by NODE_ID. That is, if I push firmware to all devices, my system/network will be destroyed, and it may take several days to restore it - I will have to manually restore NODE_ID on each device.
It's OK, if I change this like to
or I should erase
EEPROM_FIRMWARE_xxxxx
only?