btleplug icon indicating copy to clipboard operation
btleplug copied to clipboard

Retrieve connected devices

Open challiwill opened this issue 7 months ago • 3 comments

https://github.com/deviceplug/btleplug/issues/259

challiwill avatar May 30 '25 20:05 challiwill

@challiwill It appears this PR doesn’t have a reviewer yet

pyang2045 avatar Jun 27 '25 01:06 pyang2045

@pyang2045 That's correct. I was hoping to get feedback from @qdot following the conversation in issue https://github.com/deviceplug/btleplug/issues/259, but I figure we've all been busy with other commitments.

challiwill avatar Jul 07 '25 17:07 challiwill

im not sure if retrieved connected peripherals should be treated as discovered.

i've played around this for a little bit and from my experience on macos if device is connected to another app you cant really use it, like for example disconnect it and im pretty sure i had some issues with writing or reading from it. i guess this is the reason why corebluetooth is hiding it from the scan results.

with your changes it would act as it is discovered, connected and ready to go.

similar case is with retrieving peripherals by identifiers if device is known (paired) but it is not advertising it will also not be visible in scan results.

instead i'm proposing less platform-specific approach and create Adapter.retrieve_peripherals() with options (by services, by identifiers, ...by other_future_params)

what dou you think? @qdot? @qwandor?

szymonlesisz avatar Oct 23 '25 09:10 szymonlesisz