Metawear C Pro Disconnect/Reconnect

If a connection to a CPro board is working and the software is terminated unexpectedly, what does the CPro do when it realises the connection has been lost and how long does it take to return to a state where it begins advertising and will accept initialization?


  • The firmware restarts advertisement when a disconnect event is received.
  • Can you elaborate on what triggers this "disconnect event"?

    I ask as if I terminate a running application, it will be destroyed immediately and not have a chance to use the API to send the appropriate commands to disconnect. This I assume would be similar to the Metawear device going out of range of the bluetooth LE receiver, it wouldn't be able to receive the appropriate commands to disconnect.

    So how does a CPro behave under these circumstances. I ask as my software connects and disconnects perfectly, over and over, but if the software is terminated without being able to disconnect properly, is restarted and an attempt made to connect; while the device is visible, the intialization won't kick off. It's not until I close and reopen my software a second time that the device will accept initialization.
  • Disconnect events are broadcasted from the soft device and the firmware simply registers a handler for it.  From the firmware's perspective, it is irrelevant as to what triggered the disconnect event.  Maybe whatever platform you are using doesn't properly clean up the Bluetooth stack when an application is force closed.

    I would like to know:
    • Which platform are you running this code on?  
    • Can another device connect and use the board without issue?  
    • Please post the code + usage instructions that reliably reproduces this issue.
This discussion has been closed.