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

add return_adv argument to BleakScanner.find_device_by... methods #1277

Open
dlech opened this issue Apr 12, 2023 · 1 comment
Open

add return_adv argument to BleakScanner.find_device_by... methods #1277

dlech opened this issue Apr 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@dlech
Copy link
Collaborator

dlech commented Apr 12, 2023

Similar to BleakScanner.discover() we also need a return_adv= argument added to the BleakScanner.find_device_by...() methods so we can get advertising data without using the deprecated BLEDevice.metadata.

https://bleak.readthedocs.io/en/latest/api/scanner.html#bleak.BleakScanner.discover

@dlech dlech added the enhancement New feature or request label Apr 12, 2023
@siwyd
Copy link

siwyd commented Mar 4, 2024

This would be pretty handy for a specific use case I have. I'm using Bleak to fetch the Bluetooth address and RSSI of devices that we only know the name of. If I find two broadcasting at the same time, I want to give an error to the operator and if there are none broadcasting I want to discover it ASAP without having to wait. So my ideal flow would to do discover with 1s timeout and then do a longer find_device_by_name with a longer timeout. But I'm missing the advertisement data indeed to roll it out this simple. Thanks for the library though, super useful for my use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants