Nothing else writes to .bootrst, so I'd just make your app put it in there direct. No point messing around especially when if things go wrong it's a real disaster.
Maybe add a NRF.on('connect',()=>Bluetooth.print("password:"); or something that the app loader can then detect when it connects?
Bear in mind you'll have to manually eval(Storage.read(".bootcde")) as well as when .bootrst exists bootcde is not run.
I'd say be very careful! I'm pretty sure the file is run all the time and can't be circumvented, so the only way to recover would be to boot back to the bootloader and upload a custom firmware that didn't load it! The app that sets the password should come with similar warnings too :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Nothing else writes to
.bootrst
, so I'd just make your app put it in there direct. No point messing around especially when if things go wrong it's a real disaster.Maybe add a
NRF.on('connect',()=>Bluetooth.print("password:");
or something that the app loader can then detect when it connects?Bear in mind you'll have to manually
eval(Storage.read(".bootcde"))
as well as when.bootrst
exists bootcde is not run.I'd say be very careful! I'm pretty sure the file is run all the time and can't be circumvented, so the only way to recover would be to boot back to the bootloader and upload a custom firmware that didn't load it! The app that sets the password should come with similar warnings too :)