How to Maintain Name after Firmware Update

This may have already been covered elsewhere, but is there a way to maintain the device name after a firmware update?

We are using a custom/ serialized device name and everytime we do a firmware update it reverts back to Metawear. We want the end users to be able to do firmware updates on their own if necessary, but the name needs to remain what we set it to at the factory.

Thank you!

Comments

  • Unfortunately no.  Doing a firmware update clears the flash memory which will remove any data stored there (i.e logs or macros).
  • My app is built around the new Android API and example. The device list references BLEScannerFragment.class. What's the best approach for displaying a standard/ static name instead of the actual device name?

    I'm creating apps in Android and IOS - both built around the newest API's and examples.
    Thank you!
  • Just have your app set the device name back to what you want after the firmware update succeeds.
  • I tried this and it works until the device is reset the first time (after the firmware reset) then it goes back to "Metawear".
  • Are you wrapping the settings commands in a Macro code block?  

  • edited March 2016
    Not exactly - I was using the HomeFragment code from the sample app and added the command to the reconnected override:

    To set the device name:
    @Override
    public void reconnected() {
    setupFragment(getView());
    settingsModule.configure().setDeviceName(dn).commit();
    }


    Don't know if this matters, but here is code used before the above to get the device name (dn):

    private String dn;

    @Override
    public void onViewCreated(final View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    if (isReady) {
    settingsModule.readAdConfig().onComplete(readConfigHandler);
    }
    //Other code from HomeFRagment
    }

    readConfigHandler= new AsyncOperation.CompletionHandler<Settings.AdvertisementConfig>() {
    @Override
    public void success(Settings.AdvertisementConfig result) {

    dn = result.deviceName();

    }
    };
  • You'll need to use the Macro class to make the changes stick through resets.  Check out the SettingsFragment for an example.
  • ok thanks
  • edited April 2016
    Seems to work - thank you.
This discussion has been closed.