Cannot subscribe to streaming after disconnecting and connecting to MetaWearR again
Here's what I did,
- Connect to MetaWearR
- Subscribe to accelerometer streaming at 50 Hz
- Wait for about 30s
- Unsubscribe and disconnect
- Wait for about 5s
- Go to step 1 (but this time, after calling subscribe method, the callback handler has a chance not to be fired, no new threads are started).
Tried,
- Wait for some time and subscribe again during the same second connection. Not working.
- Disconnect and wait for some time and reconnect and subscribe. Higher chance for working, yet not reliable.
Questions,
- Is it a bug?
- What would be the workaround?
- What would be the recommended procedure to disconnect and reconnect to the device?
I'm using Python 3.6.5 on Windows 10.
Comments
Resolved. It seems I need to wait for a split of seconds between unsubscribe and disconnect, otherwise the disconnect may not be successful.
What was the code you were running that created this issue?