Get any error code on connect failure due to max connections limit reached on Android BLE

480 Views Asked by At

I am connecting to a BLE device and want a specific error code that could help me determine the reason of connection failure.

Scenario i want to cover is for maximum connections limit being reached.

I want any specific error code or method to identify that connecting to a BLE device failed due to maximum no. of devices being already connected.

I have referred to the set of status codes that android documentation provides for gatt connection -> https://developer.android.com/reference/android/bluetooth/BluetoothGatt#summary but none corresponds to any such scenario.

I could see that there exists some set of hidden error codes that exists on BLE connection. For example i get status code 19 (Bluetooth LE: undocumented error code 19) which is not listed in the official documentation nor exists in BluetoothGatt. Another such example is of error code 133 (https://devzone.nordicsemi.com/f/nordic-q-a/45969/gatt-client-leaks-in-android-ble).

The limit also varies for different devices so taking an assumption of 7 devices getting connected at max seems a bit inappropriate as this value could be lower in some while higher in different android devices.

Can anyone help me on the same providing me a way out to identify max connection limit reached on my device?

0

There are 0 best solutions below