-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BleGattCharacteristicException while readCharacteristic #829
Comments
What is your device? |
@dariuszseweryn Hello, thanks for asking! I have all in my bug: Smartphone / tablet Device: OnePlus 6T I sync to a N64 Bluetooth dongle successfully, no error, I can write and read every other characteristic except for that one with this library. It does changes services.
|
Is this the peripheral you connect your phone to? I asked for logs, please share them but with below settings in your app — it will give more information on the internals of the library. Also timings may be important so please leave timestamps.
|
@dariuszseweryn Correct! I'm able to do all the operations on web with the same Android device to that dongle and with iOS. So far, only that characteristic is the one getting me an exception with this library. Full log of that event:
I'm making the Open Source version of Android of the site: https://blueretro.io and while I access that site with the same Android, that characteristic is able to show data on my device. |
If the peripheral has been paired/bonded it may be that something got off with the Android cache. Could you try reboot your phone and retry? |
@dariuszseweryn I tested both scenarios and same issue with the same characteristic and on Web with the same device I can always get a result. I tried rebooting both devices several times, I also added from 2 to 10 seconds delays with several retries (10 retries) and same error. I did the same right after and right before that characteristic with any other characteristic and I have no issues, I can read and write the other ones, no problem. I'm never losing the connection as I can keep using and doing stuffs with the peripheral, even ms after that attempt of read call. |
Could you try |
@dariuszseweryn I get the same error "Error 133 (0x85) GATT ERROR". The crazy thing is that I just tested with the Web interface using the same Android and it works. I also tested on iOS and it works: This is Web Android (same device): This is the error with nRF Connect (same device, other values are readable, as you can see): This is the value I'm getting on iOS/Web: [118, 49, 46, 56, 46, 51, 32, 104, 119, 49, 32, 110, 54, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
It looks like an Android BLE stack bug. Not sure what the web API uses. We could try to dig deeper by getting your phone's BT HCI logs with both app usage and web usage and analysing them — maybe some workaround will pop-up Edit: you could also try connecting with a different Android device if you have one |
@dariuszseweryn I just tested on a Xiaomi MI9T Android 11 and same issue. Will try to dig deeper and I'll talk with the creator of the dongle to see if a firmware update can make it readable for Android. |
Excuse me, is there any progress on this issue? |
I am also rarely getting the same sort of error:
|
Describe the bug
I have a BLE device with several (11) characteristics and almost of those working. One in particular is not, but I was able to read it using HTML5 Bluetooth library on Android itself (same phone) and on iOS connecting to the same device (the result on iOS has several trailing zeros).
The following exception is being thrown:
com.polidea.rxandroidble2.exceptions.BleGattCharacteristicException: GATT exception from MAC='XX:XX:XX:XX:XX:XX', status 133 (GATT_ERROR), type BleGattOperation{description='CHARACTERISTIC_READ'}. (Look up status 0x85 here https://cs.android.com/android/platform/superproject/+/master:packages/modules/Bluetooth/system/stack/include/gatt_api.h)
Every single other Characteristic works, no problem, still connected (so, it's not a connection issue) right before and right after that one, except for every time I'm reading that Characteristic.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
iOS and HTML5/Js native implementations, all of them return a List of int as expected being the following one:
[118, 49, 46, 56, 46, 50, 32, 104, 119, 49, 32, 110, 54, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Smartphone / tablet
Logs from the application when bug occurs (this will greatly help in quick understanding the problem)
To turn on logs use:
Additional context
I discarded being my device as I'm getting the data if I use a HTML5/Js library and the data gets as expected.
The text was updated successfully, but these errors were encountered: