Is there a programmable 'escape' to start DFU?

Posted on
  • 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 ;-)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Is there a programmable 'escape' to start DFU?

Posted by Avatar for TomWS @TomWS