From ca8f2848885e9158890a487fb3292ca20f60291d Mon Sep 17 00:00:00 2001 From: Abel Lucas Date: Mon, 24 Oct 2022 22:39:05 +0000 Subject: [PATCH] le: add `own_address_type` parameter to `Device.start_advertising` --- bumble/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bumble/device.py b/bumble/device.py index 047b053..6f8f8cb 100644 --- a/bumble/device.py +++ b/bumble/device.py @@ -887,6 +887,7 @@ class Device(CompositeEventEmitter): self, advertising_type=AdvertisingType.UNDIRECTED_CONNECTABLE_SCANNABLE, target=None, + own_address_type=Address.RANDOM_DEVICE_ADDRESS, auto_restart=False ): # If we're advertising, stop first @@ -921,7 +922,7 @@ class Device(CompositeEventEmitter): advertising_interval_min = self.advertising_interval_min, advertising_interval_max = self.advertising_interval_max, advertising_type = int(advertising_type), - own_address_type = Address.RANDOM_DEVICE_ADDRESS, # TODO: allow using the public address + own_address_type = own_address_type, peer_address_type = peer_address_type, peer_address = peer_address, advertising_channel_map = 7,