python-dbusmock icon indicating copy to clipboard operation
python-dbusmock copied to clipboard

bluez5: Implement Advertising APIs

Open fkleon opened this issue 1 year ago • 2 comments

Basic implementation of the org.bluez.LEAdvertisingManager1 and org.bluez.AdvertisementMonitorManager1 interfaces on mock adapters.

Fixes #20

fkleon avatar Jun 21 '24 12:06 fkleon

The centos 9 failure needs some adjustment:

self.assertIn("SupportedCapabilities.MinTxPower: 0xffffffde (-34)", out)

But that older version prints that in two separate lines:

'SupportedCapabilities Key: MinTxPower', 'SupportedCapabilities Value: -34'

martinpitt avatar Jun 25 '24 10:06 martinpitt

The detailed unit tests are really nice, but can any of these new functions be tested with bluetoothctl? Does it have some "monitor" mode? I.e. I'd have more faith in this if we don't just test our own mock API, but convince the real client beyond just the simple capabilities check in bluetoothctl list.

Good point, and totally possible. Should be able to test both advertising and monitoring features via bluetoothctl, so will add those tests.

But that older version prints that in two separate lines:

Thanks, will have a look into this too.

fkleon avatar Jun 28 '24 11:06 fkleon

Amazing work, thank you! Do you want this in a release (I can do one after landing), or is it enough for you to be in main?

Thanks for the quick review! Happy to source this from main until the next release lands, not urgent at all.

fkleon avatar Jul 02 '24 11:07 fkleon