Open ztroop opened 1 year ago
"Unreachable" comes from the Windows Bluetooth stack, so Bluetooth packet capture would be the best way to investigate that.
There are many issues that mention this error that might provide more insight as well: https://github.com/search?q=repo%3Ahbldh%2Fbleak+Unreachable&type=issues
I found an old issue #60 that suggests that a retry may help with this particular error. Can you add a retry to your code and see if it helps? If it does, we can look at adding an automatic retry in Bleak.
I'll recommend that action once the user responds. As of this moment, I'm still waiting for a packet capture.
I was able to connect to the BLE device once and after that it gives me this error "bleak.exc.BleakError: Could not get GATT services: Unreachable". I tried every possible solution but still the error is there.
Try one of the silicon vendor BLE App's to confirm you can connect with the BLE device.
The connection with one of these App should be able to identify the services and characteristics.... you might have a digit wrong in your service or characteristic.
On Wed, 11 Sept 2024 at 20:04, anikseng @.***> wrote:
I was able to connect to the BLE device once and after that it gives me this error "bleak.exc.BleakError: Could not get GATT services: Unreachable". I tried every possible solution but still the error is there.
— Reply to this email directly, view it on GitHub https://github.com/hbldh/bleak/issues/1217#issuecomment-2343199976, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD37L4DCP6I4V2K6N54V55LZWAIRVAVCNFSM6AAAAABOATDVZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBTGE4TSOJXGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Joey +61 412 750 765
IIRC, the "Unreachable" error usually happens because the Windows Bluetooth stack is waiting for a response for something that never comes from the device. The only way to find the source of the problem is to log Bluetooth packets as described in the troubleshooting page of the Bleak docs.
Description
I maintain a library that uses
bleak
as a dependency and I have a Windows user that is experiencing failures with connectivity. After spending time examiningbleak
code, I don't see any smoking guns.5
minutes.DeviceNotFound
OR it connects, hangs, and then errors out with:Any thoughts/suggestions/comments would be appreciated!