Default Passcode

Posted on
  • I entered

    E.setBootCode('NRF.setAdvertising({},{na­me: "<name>"});',true);
    

    To change the devise name, which it did but wiped everything else.

    Now when I try and pair to bluetooth (to restore settings) it's asking for a passcode I never set.

    Done all resets I could find. Name remains changed and default passcodes not working.

    Is there an Esprunio default passcode?

  • Did you try a factory reset, in Settings/ Utility.

  • @HughB nothing works apart from holding button 3 reset, holding buttton 1 and 2 reset and holding button 1 and 2 and then realsing button 2 reboot. No menus, no apps.

  • E.setBootCode

    Where did you find that code? E.setBootCode(..., true) isn't something I ever really recommend (especially with untested code) as it does always run regardless of what you do.

    What did you use as the name? It would be handy to see if the issue can be reproduced here.

    Is it possible you named it to the same name as another device, and you're actually trying to connect to the other device which does use a passcode?

    holding buttton 1 and 2 reset and holding button 1 and 2 and then realsing button 2 reboot. No menus, no apps.

    When you do that (booting with BTN1 held down) can you then connect without a passcode?

    Because it's possible that somehow a passcode did get set (maybe via code that was uploaded that uses NRF.setSecurity) and was then executed at boot. Assuming you really did run the code above then hopefully booting with BTN1 held down would stop all other code apart from that one line being executed.

    Also did you try connecting with another device like a phone? It's possible your PC got confused by the name change...

  • @Gordon the post was here

    http://forum.espruino.com/conversations/­372207/#comment16365858

    It seems like there is only a passcode when i try and access it on the PC, tryed the phone like you said and I can get into it.

    All my old files are still there but like I said no menu and no access to apps.

    Im accessing the IDE through my phone and im in, what can i type to factory reset?

  • IDE through my phone and im in, what can i type to factory reset?

    Bangle.factoryReset();
    
  • Thanks! I've just edited that post to add some big warnings.

    As @HughB says, that should fix it. If you can connect with your phone you can always just open the App Loader and click 'install default apps' and that'll fix it too

  • Hey thanks for the help,

    Bangle.factoryReset();
    

    is not working, it says the function does not exist. I can only connect to the IDE on the phone not the app downloader.

    I downloaded both of the boot files from storage on the IDE and seen that "bootrst.txt" only has one line of code...

    NRF.setAdvertising({},{name: "newName"});
    

    Im sure there is meant to be more text.
    Can someone send me the plain boot files manually so i can apply them manually. I think that may work.

  • Bangle.factoryReset(); is not working,

    Ahh sorry, you're on Bangle.js 1 - so that function doesn't exist (there's not enough memory to permanently store a copy of the factory default JS).

    I can only connect to the IDE on the phone not the app downloader.

    What issues do you see when trying to connect with the App Loader? The method of communication should be identical between the two so if one works the other really should.

    What I'd suggest then is that you run require("Storage").eraseAll() in the Web IDE and then restart the Bangle. That will remove everything so the next time the Bangle starts it'll be totally connectable with the default name, and then you should be able to connect exactly as you did before you uploaded the code in the first place.

  • (off topic)

    If you can connect with your phone you can always just open the App Loader and click 'install default apps' and that'll fix it too.

    I've wondered myself where to find 'install default apps' in the App Loader until I've found it in the "About" tab...
    Maybe the tab should be renamed to "Help", because there's also a link to the Bangle.js Troubleshooting page.

  • Yes, About isn't the correct name, but I'm not sure if Help is much better. I'm open to ideas :)

  • Yes, About isn't the correct name, but I'm not sure if Help is much better. I'm open to ideas :)

    "More.."
    or the "Settings-Burger" (3 bars)?

  • « More » was in my mind too

  • More sounds good to me :) Just filed an issue https://github.com/espruino/BangleApps/i­ssues/1363

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

Default Passcode

Posted by Avatar for user139578 @user139578

Actions