You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I'm not quite sure I understand the question... If you do E.setBootCode('NRF.setAdvertising({},{na­­me: "<name>"});'/*,true*/); with true uncommented then the name change will persist through power cycling and calling reset().

    WARNING - THIS IS DANGEROUS if you run code with E.setBootCode(..., true) it is always called, which means if you do something that stops you connecting to your device it's non-connectable FOREVER. Always try without setting true first to check that what you want to do actually works!

    The only thing it won't persist through is reset(true) because that erases everything you wrote to the device.

    If you want it to persist through completely erasing the device's memory then you have 2 options:

    • Build your own firmware with the name changed
    • Replace reset so the user can't fully reset the device's memory:

      (function() {
      var r = reset;
      global.reset=function(){reset()};
      });
      
About

Avatar for Gordon @Gordon started