-
Notifications
You must be signed in to change notification settings - Fork 582
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
Investigate auto-scanning on RxBleDevice.establishConnection()
#318
Comments
Hello @Esperanz0 I see a |
@dariuszseweryn Hi. When I will kill app and run it again its working so I thought it is something with library. So if it is no library problem do You have idea how to check where is problem / what failing after bt off/on. |
Try scanning the device after adapter off/on |
Actually this question should go to the stackoverflow as this is a general usage question or rather an Android BLE stack quirk. Not an issue with the library |
RxBleDevice.establishConnection()
after adapter on
RxBleDevice.establishConnection()
after adapter onRxBleDevice.establishConnection()
Hi @uKL, I saw you added this issue into the |
I was investigating the issue more deeply recently but unfortunately there is no good solution for the current state of the OS. I will probably create a blog post about the issue |
(Android stack flaw description by @dariuszseweryn)
Android uses 48 bits to "uniquely" identify a device. If the device is obtained solely on providing the "unique" mac address or it was scanned before the
BluetoothAdapter
was turned on the last time the stack does not know if the address ispublic
or not until the device is scanned again.Library version
1.4.2
Steps to reproduce actual result
1. Connect with BLE device.
2. Turn off bluetooth on the phone
3. Turn on bluetooth
4. Try to connect again with the same BLE device
Minimum code snippet reproducing the issue
Logs from the application running with setting
Actual result
Expected result
RxAndroidBle will connect to the device after bluetooth off/on.
The text was updated successfully, but these errors were encountered: