Add status to BleDisconnectedException
See original GitHub issueSummary
The status param of onConnectionStateChange
provides useful information even when new state is disconnected, since it holds the reason for disconnection, if supplied by the remote peer.
From Bluetooth Core Specification v5.0, Vol 2, Part E:
7.1.6 Disconnect Command
Command Parameters:
Reason:
Size: 1 octet
Value:
0x05, 0x13-0x15, 0x1A, 0x29, 0x3B
Description:
Authentication Failure error code (0x05),
Other End Terminated Connection error codes (0x13-0x15),
Unsupported Remote Feature error code (0x1A),
Pairing with Unit Key Not Supported error code (0x29),
Unacceptable Connection Parameters error code (0x3B).
I believe it is also possible to get status 0x8 (Supervision Timeout)
, 0x3e (Connection Establish Timeout)
, and 0x16 (Connection Terminated By Local Host)
in a disconnect callback, when it is triggered by the local host stack.
Library version
1.4.0
Preconditions
Connection state change event indicating a disconnect with a non-zero status. Relevant code is at RxBleGattCallback.java#L76.
Actual result
BleDisconnectedException
without a status value.
Expected result
BleDisconnectedException
with a status value.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Add status to BleDisconnectedException · Issue #282 - GitHub
I would like to know if new BleDisconnectedException can return the status 0x81 (GATT internal error) and 0x85 (GATT error) after closing this ......
Read more >RxBLELibraries/RxAndroidBle - Gitter
BleDisconnectedException : Disconnected from FF:B3:F6:00:81:50 with status 8 ... the notify part must work in background, so I've made a custom Service !...
Read more >BleDisconnectedException: Disconnected from MAC='XX:XX ...
I'm working on an application that uses your framework and I faced into the next issue after my phone connected with ble device...
Read more >com.polidea.rxandroidble2.exceptions ... - ProgramCreek.com
This page shows Java code examples of com.polidea.rxandroidble2.exceptions.BleDisconnectedException.
Read more >android.bluetooth.BluetoothGatt.getDevice java code examples
getDevice()); mBLEDatas.add(d); return d; } ... else { DebugLogger.e(TAG, "onMtuChanged error: " + status + ", mtu: " + mtu); onError(gatt.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think BleDisconnectedException with a status value is great.
Possibly irrelevant comment @ThunderThrash: I’m struggling right now with error 0x81, which is reportedly a “generic Bluetooth error”, i.e., seems to have no diagnostic value whatever. Enlightenment appreciated!