Normally DFU is started by holding D0 high while resetting or powering up the Device. Is there a software 'hook' by which an Espruino device can restart into the DFU?
This would make firmware update a lot easier and not require physical access to the board - what OTA is all about...
I looked at the DFU code and see that there isn't a programmable hook into it. So this begs the question, does anybody else want this?
You mean for Bluetooth devices? There isn't, no.
It was actually a conscious decision not to have it.
OTA works fine as long as you have a signed firmware and a private key, so you can be sure that nobody is uploading malicious firmwares behind your back. However in Espruino's case I share the private key since it's all open source, so anyone can make a firmware.
By requiring physical access to the device to update firmware I at least stop people uploading malicious/backdoored firmwares behind your back. Sure, you can upload JS if it hasn't been secured, but reset(1) should sort that out.
The Chrome team considered it serious enough to actually block the Web Bluetooth implementation from using the older non-signed version of the Nordic DFU tools, so I didn't want to give them an excuse to block Espruino as well.
I suspected you had decided not to do it as it's pretty trivial to add. Thanks for the info. I won't be putting in a PR for this ;-)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem