bleak icon indicating copy to clipboard operation
bleak copied to clipboard

BleakClient: add optional services argument

Open dlech opened this issue 4 years ago • 1 comments

This adds an optional services argument to BleakClient() to make use of OS API capabilities of only enumerating services that will be used. These APIs are available on Windows and Mac, but not BlueZ, so on the BlueZ backend, it is faked. Theoretically, this can save battery power on peripheral devices, but this is probably only relevant to super-low-powered devices.

dlech avatar Oct 06 '21 20:10 dlech

I originally did this as a possible solution for #599, but I'm not sure it is the best solution since it requires users to get an error, research the error and apply a workaround using this feature.

Still, this feature may be useful on its own accord. So give a 👍 or leave a comment if you have a different use case for this feature.

dlech avatar Oct 06 '21 20:10 dlech

Not just saves power, it can also be quite a bit faster!

karlp avatar Jan 06 '23 16:01 karlp