MetawearRG reconnection/connection TimeOut Issue
I m using MetawearRG for live data streaming. I am configuring Accelerometer and Gyrometer in range of 16G and 2000 deg/sec respectively, and using packedAcceleration and and PackedAngularVelocity for high data streaming. And using both at the same time.
I am disconnecting the board using board.disconnectAsync() function.
I am facing the problem when I try to reconnect the board after disconnecting it manually.
Issue: On selecting the board from the scanned list it stays on connecting state, and never complete.
On thorough debugging I found that, when ever the connection fail it goes for reconnection automatically, and the same procedure is carried on and on which lead to a infinite loop.
On further debugging I found that the value of task.isFaulted() in connectAsync() s always true whenever this condition arises, and the reason is that it throws an unhandled TimeOut Exception
everytime for this condition.
If I kill the app and try connecting again, it connect without ant hassle in 1st attempt, and the problem start occurring from 2nd attempt to connect
Please Help me out on handling this TimeOut Exception