I semi bricked the Bangle2

Posted on
  • Hi, I did something stupid, I have a .bootrst file that disables BT on startup, so the "hold the button" failsafe is not working, I am locked out.

    Is there a way to erase flash storage using dfu upload?

    solved I took the flash pages down to 20, flashed the image, it caused a storage erase due to corruption, victory :)

  • Is there a way to erase flash storage using dfu upload?

    not sure there is a way out of box but you could make custom build that ignores .bootrst file, then delete the file, then flash normal build, if you have linux it is not that hard to checkout Espruino from github and rebuild from source.

    You just change this line https://github.com/espruino/Espruino/blo­b/2e0502cbb721c72fcae6807ac85edd9900b60a­40/src/jsflash.c#L21 to something else.

    Maybe even binary patching the bin from existing zip would work if you recreate the zip via nrfutil again. The nrfutil line for building the package is

    nrfutil pkg generate espruino_2v15.5_banglejs2.zip --application espruino_2v15.5_banglejs2_app.hex --application-version 0xff --hw-version 52 --sd-req 0xa9,0xae,0xb6 --key-file targets/nrf5x_dfu/dfu_private_key.pem
    

    so you could unpack the bin, patch the string inside and replace the --application parameter with the bin

    Well, actually it was quicker to do it than to describe it, attached is the zip that searches for something else instead of .bootrst (replaced oo in name with zeroes)


    1 Attachment

  • Ah, OK, too late, nevermind :-)

  • thank you very much, really appreciate it, I was playing to find a nice way to have dualboot, and I messed it up.

    I did have the "C:.bootrst" as a fail safe, maybe the C: is ignored on the bangle?

  • maybe the C: is ignored on the bangle?

    If you see C: being part of filename in Storage.list() then the feature is disabled and : is just like any other ordinary character.

    And yes, looks like it was disabled in this commit https://github.com/espruino/Espruino/com­mit/919e3bcd72f2a2a2864069180f926702d0e8­ea93

  • thanks, the C: is not visible, the file is named ./bootrst as normal in storage, yet it seems disabled indeed, all go to external flash.

    (I did it again, using your image now :) )

  • Glad you got it sorted!

    Hi, I did something stupid, I have a .bootrst file that disables BT on startup, so the "hold the button" failsafe is not working, I am locked out.

    Argh - yes, while I make sure .bootX isn't loaded if the button is pressed, .bootrst is a bit of a scary one!

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

I semi bricked the Bangle2

Posted by Avatar for enaon @enaon

Actions