Reliable gatt connection

Hi Eric,

I've been testing my app for the last few weeks and everything works as expected. However sometimes when the signal is not strong enough the reconnect process could result in a false positive making the connected device stale and not responding to any signal and forcing me to restart the service.

I'll try to explain:

During the reconnect process, if the signal is strong enough, the connected callback is triggered and everything proceed as expected (the app reconnect) otherwise, with intermittent signal, the connected callback is still triggered even if connection process has not completed correctly due to weak signal resulting in a corrupted state (every request sent to the board afterward is ignored).

I was wondering if there's any way to start the connection process or trigger the connected callback only if the signal is strong enough to be completed.

Hope that what I explained make sense.

Thanks for your help.



  • As far as I can tell, the only way to get the RSSI value of a bt device when it's disconnected is by doing a BT scan.  I suppose you could initiate a scan, pull the RSSI value out and then connect if it's within a reasonable range.
  • Good point, I'll have a try!.. and let you know :)

    Thanks a lot.
This discussion has been closed.