Skip to content
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

Bleak uses a hard coded 5s timeout for reads on MacOS #111

Closed
bdraco opened this issue Jul 16, 2022 · 2 comments · Fixed by hbldh/bleak#891
Closed

Bleak uses a hard coded 5s timeout for reads on MacOS #111

bdraco opened this issue Jul 16, 2022 · 2 comments · Fixed by hbldh/bleak#891

Comments

@bdraco
Copy link
Collaborator

bdraco commented Jul 16, 2022

Pairings with slow devices fails on Mac but works on Linux.

Raising the timeout from 5 to 10 allows these devices to pair

@bdraco bdraco changed the title Bleak uses a hard coded 5s timeout for reads Bleak uses a hard coded 5s timeout for reads on MacOS Jul 16, 2022
bdraco added a commit to bdraco/bleak that referenced this issue Jul 18, 2022
5s would result in quite a few random failures with
HomeKit BLE devices because the device would have to
process a large dump of fragments which make it slow
to respond

Fixes Jc2k/aiohomekit#111

Example of code that slows down the device with many
encrypted writes before waiting for a read
https://github.com/Jc2k/aiohomekit/blob/0e22b4e0a16d6b01da2e65bfce99fb01b4c1c7f3/aiohomekit/controller/ble/client.py#L117
bdraco added a commit to bdraco/bleak that referenced this issue Jul 18, 2022
5s would result in quite a few random failures with
HomeKit BLE devices because the device would have to
process a large dump of fragments which make it slow
to respond

Fixes Jc2k/aiohomekit#111

Example of code that slows down the device with many
encrypted writes before waiting for a read
https://github.com/Jc2k/aiohomekit/blob/0e22b4e0a16d6b01da2e65bfce99fb01b4c1c7f3/aiohomekit/controller/ble/client.py#L117
bdraco added a commit to bdraco/bleak that referenced this issue Jul 18, 2022
5s would result in quite a few random failures with
HomeKit BLE devices because the device would have to
process a large dump of fragments which make it slow
to respond

Fixes Jc2k/aiohomekit#111

Example of code that slows down the device with many
encrypted writes before waiting for a read
https://github.com/Jc2k/aiohomekit/blob/0e22b4e0a16d6b01da2e65bfce99fb01b4c1c7f3/aiohomekit/controller/ble/client.py#L117
@bdraco
Copy link
Collaborator Author

bdraco commented Jul 18, 2022

Fixed via hbldh/bleak#891 in the next bleak version

@bdraco
Copy link
Collaborator Author

bdraco commented Aug 3, 2022

Fixed in bleak 0.15

@bdraco bdraco closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant