Proper way of resetting the device from code?

edited January 2016 in Android
What is the proper way of resetting the board from android code?

After debugModule.resetDevice();
The board is disconnected but at connect and setting it up again the following occurs:

java.lang.RuntimeException: Duplicate logging keys found: acceleratordata
at com.mbientlab.metawear.impl.DefaultMetaWearBoard$RouteBuilder$DataSignalImpl.log(
at com.mbientlab.metawear.impl.DefaultMetaWearBoard$RouteBuilder$DataSignalImpl.log(
at com.sonali.acceldata.MetaWearSensor$7.connected(
at com.mbientlab.metawear.MetaWearBleService$2$
at java.util.concurrent.Executors$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

It i possible to get it working by making a whole new instance of metawearboard but must be some other way?


  • You can remove the routes before readding them.  Once you've reset the board, then the board's state is no longer what the API thinks it is unless you've programmed the setup into the flash memory via the Macro module.
  • Thanks! 
    Worked great.

    For other it's MetaWearBoard.removeRoutes()
This discussion has been closed.