This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to query connected state of a peripheral?



What API can be used to query the state (connected/unconnected) of a peripheral? I see the state change callback where i could keep track of it with a global variable, but was wondering if there is an API in BLE stack where this could be queried from different tasks. 

Thanks.