btleplug icon indicating copy to clipboard operation
btleplug copied to clipboard

Add clear_peripherals method to adapter

Open danielstuart14 opened this issue 1 year ago • 1 comments

Add clear_peripherals method to adapter, so that the peripheral list can be cleared after being used. Without this, the list would keep growing until the whole adapter object is dropped.

The method returns a result so that later if a platform/functionality needs to be fallible the API won't need to be changed.

AFAIK, Linux doesn't support this as the peripheral list comes from bluez directly.

Solves https://github.com/deviceplug/btleplug/issues/206

danielstuart14 avatar May 08 '24 02:05 danielstuart14

Any updates on this? Any help needed? We are currently using https://github.com/MnlPhlp/tauri-plugin-blec package which uses btleplug and we really need this feature to clear peripherals. if any testing or help needed, I am here!

arashi-dev avatar May 15 '25 12:05 arashi-dev