Skip to content

Attempting to access BleakClient.mtu_size triggers warning about _acquire_mtu #1270

Answered by dlech
fixermark asked this question in Q&A
Discussion options

You must be logged in to vote

This is the documented behavior: https://bleak.readthedocs.io/en/latest/api/client.html#bleak.BleakClient.mtu_size

Please use BleakGATTCharacteristic.max_write_without_response_size instead as suggested or provide your own implementation as in https://github.com/hbldh/bleak/blob/develop/examples/mtu_size.py. You can hard-code 128 as the MTU instead of using _acquire_mtu if you are sure it will always be correct.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@fixermark
Comment options

@dlech
Comment options

Answer selected by fixermark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1269 on April 01, 2023 15:41.