Open jkandasa opened 6 years ago
This might be a good idea for systems that don't use encryption. Currently all encryption solutions rely on EEPROM for key storage. Distributing a reset command to a node would then effectively exclude that node from future communications. So if this is implemented, care must be taken for users that rely on encryption.
@jkandasa
MYSController has an option debug->!! clear EEPROM !!
and option MYSCBootloader CMDs-> Clear EEPROM
these commands with original bootloader in serial monitor looks like:
17716 TSF:MSG:READ,0-0-5,s=0,c=3,t=28,pt=0,l=1,sg=0:E
17774 TSF:MSG:SEND,5-5-0-0,s=255,c=3,t=28,pt=0,l=2,sg=0,ft=0,st=OK:OK
and
93721 TSF:MSG:READ,0-0-5,s=0,c=3,t=13,pt=0,l=1,sg=0:0
respectively (you can parse them)
FYI i've just tested:
with original arduino bootloader both doesn't clear data, stored with function saveState()
(don't know about MySensors eeprom data)
but with bootloader MYSBootloaderV13pre.hex - it erases that data too! with both menu commands
So at the moment in case of MYSBootloader you can FOTA empty sketh to node and then do eeprom erase... - i think you will get what you want?
@nekitoss Thank you! Yes, I want to clear EEPROM in all cases. Not only with MYSBootloader.
This might be a good idea for systems that don't use encryption. Currently all encryption solutions rely on EEPROM for key storage. Distributing a reset command to a node would then effectively exclude that node from future communications. So if this is implemented, care must be taken for users that rely on encryption.
You could also say that users who have unsecured networks are just as much at risk, since it becomes very easy for a neighbor or war-driver to reset the nodes.
Indeed. Just another reason for people to secure their networks :)
At this moment I do not see any option to do a factory reset(erase EEPROM completely) via default library.
It may be a good idea to implement
I_FACTORY_RESET
to perform complete EEPROM erase. This will help us to perform a factory reset from our favorite controller(without toucing the hardware).As MySensors library supports more than one hardware(ATMEGA328P, ESP8266, etc.,) this feature should be implemented for each platform. End user simply trigger
I_FACTORY_RESET
, when there is a need.