Hanging on "async with BleakClient..."
See original GitHub issue- bleak version: 0.5.0-develop
- Operating System: macOS 10.14.6 (on early 2015 Macbook Air)
Description
In running the examples on MacOS, everything hangs after/within async with BleakClient(address, loop=loop) as client:
(within run
) i.e. the subsequent typical example x = await client.is_connected
or any other calls do not appear to run. Despite this, the OS does indicate that the BLE device is connected indefinitely until the script is stopped. Everything appears to be working fine on Windows.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:22 (6 by maintainers)
Top Results From Across the Web
Hangling of bleakClient.connect in continous ... - Stack Overflow
I want to run an infinite loop where I can continuously connect and disconnect to the BLE devices. I have a code which...
Read more >bleak 0.11.0 - PyPI
Bleak is a GATT client software, capable of connecting to BLE devices acting as GATT servers. It is designed to provide a asynchronous,...
Read more >How to Send Data between PC and Arduino using Bluetooth ...
The Connection class's primary job is to manage BleakClient 's connection with the remote device. The manager function is one of the async...
Read more >Bluetooth Weather Station - Arduino Project Hub
Any client that hangs on too long is blocking others from reading. ... async def run(address): async with BleakClient(address) as client: ...
Read more >A look at the AN9002 Bluetooth Multi-meter protocol
... async def run(address): client = BleakClient(address) async with BleakClient(address) as ... First I went for the low hanging fruit.
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
Hello, I can confirm that the issue is still present for me with v0.7.0 on macOS 10.14.6. I updated to bleak 0.7.0 and was still having this problem. I added this line as a workaround and it seems to have solved the issue for me:
if not self.connected_peripheral_delegate:
Here is the context:
I have merged #227 into develop and will make a version 0.7.0 release later today with those changes as well as a lot of others. If the “fire twice” problem is still left after release of version 0.7.0, I will include the changes in #213 in a version 0.7.X release as soon as someone confirms that it is still present.