Reset tutorial?

Does anybody have an simple Android app that resets a mwBoard and re-establishes the connection to the same device without user interaction?

I'm having trouble isolating what needs to be re-acquired after reset is called.  Based on sample app ...

0. Call mwBoard.getModule(Debug.class).resetDevice();
1. Once ConnectionHandler detects failure(), mwBoard.connect() is called.
2.  Once ConnectionHandler detects connect() again, ... getModule (ex. Accelerometer) again and reestablish routes.

I thought that would have been it, but subsequent request for streaming fails so something else must need to be reinitialized.  

Comments

  • edited September 2016
    The sequence works as long as ...

    onServiceConnected ...

    mwBoard and its state handler is initialized 
    mwBoard= ((MetaWearBleService.LocalBinder) service).getMetaWearBoard(btDevice);
    mwBoard.setConnectionStateHandler(stateHandler);

    and getModule(...) is called and routes are established.  This is in addition to reestablishing connections on connected() (#2 above). 

    Setting up routes only when connected() does not work, because on 1st, initial connect, the function is not called most of the time. 
This discussion has been closed.