Device Failing to Connect
See original GitHub issue- bleak version: 0.14.2
- Python version: 3.9
- Operating System: Windows 11 Build: 22000.613
- BlueZ version (
bluetoothctl -v
) in case of Linux:
Description
I am a first-time bleak user and want to talk to a GATT server with a known address. Connection can be established as shown within Windows Bluetooth settings however it seems like Bleak never recognizes that the device connects and is stuck waiting
What I Did
async with BleakClient(address) as client: print(‘connected’)
Force quitting this yields the following error:
----> 1 async with BleakClient(address) as client:
2 print('connected')
~\anaconda3\lib\site-packages\bleak\backends\client.py in __aenter__(self)
59
60 async def __aenter__(self):
---> 61 await self.connect()
62 return self
63
~\anaconda3\lib\site-packages\bleak\backends\winrt\client.py in connect(self, **kwargs)
273
274 # Obtain services, which also leads to connection being established.
--> 275 await self.get_services()
276
277 return True
~\anaconda3\lib\site-packages\bleak\backends\winrt\client.py in get_services(self, **kwargs)
444 logger.debug("Get Services...")
445 services: Sequence[GattDeviceService] = _ensure_success(
--> 446 await self._requester.get_gatt_services_async(
447 BluetoothCacheMode.UNCACHED
448 ),
CancelledError:
```
Issue Analytics
- State:
- Created a year ago
- Comments:10
Top Results From Across the Web
Device Failed to Connect - Microsoft Community
Device Failed to Connect. For some reason my camera has stopped showing up in Windows Explorer when I connect USB, and I am...
Read more >Device Can't Connect to Wi-Fi? Here's What to Do
Check these Wi-Fi network issues first · Check to see if your router is unplugged or if the power is cut off —...
Read more >Fix internet connection problems on Android devices
If you can't access the Internet on your Android device, either through an app or a ... Open your Settings app and tap...
Read more >Failed to connect devices or constantly lost connections?
If you meet a connection problem (for example, failed to connect devices, constantly lost connections), it may be due to the network of...
Read more >How to Fix Bluetooth Pairing Problems - Techlicious
1. Make sure Bluetooth is turned on · 2. Determine which pairing process your device employs · 3. Turn on discoverable mode ·...
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 updated to
bleak==0.15.1
and am able to connect now. I haven’t done an exhaustive test, but 5 attempts were successful in a row, which seems improved from before.The hold-up recording Wireshark for me is permission related (work laptop, no admin rights).
I am still unable to write to a CHRC, but perhaps that is some other problem. --> EDIT: can confirm this is a different issue. (needed
response=True
)There are instructions on how to do this at https://bleak.readthedocs.io/en/latest/troubleshooting.html#windows-10