Cannot subscribe to streaming after disconnecting and connecting to MetaWearR again

Here's what I did,

  1. Connect to MetaWearR
  2. Subscribe to accelerometer streaming at 50 Hz
  3. Wait for about 30s
  4. Unsubscribe and disconnect
  5. Wait for about 5s
  6. 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,

  1. Wait for some time and subscribe again during the same second connection. Not working.
  2. Disconnect and wait for some time and reconnect and subscribe. Higher chance for working, yet not reliable.

Questions,

  1. Is it a bug?
  2. What would be the workaround?
  3. 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?

Sign In or Register to comment.