mirror of
https://github.com/google/bumble.git
synced 2026-05-10 04:18:03 +00:00
don't set a random address when it is 00:00:00:00:00:00
This commit is contained in:
@@ -1113,8 +1113,11 @@ class Device(CompositeEventEmitter):
|
|||||||
|
|
||||||
if self.le_enabled:
|
if self.le_enabled:
|
||||||
# Set the controller address
|
# Set the controller address
|
||||||
|
if self.random_address != Address.ANY_RANDOM:
|
||||||
await self.send_command(
|
await self.send_command(
|
||||||
HCI_LE_Set_Random_Address_Command(random_address=self.random_address),
|
HCI_LE_Set_Random_Address_Command(
|
||||||
|
random_address=self.random_address
|
||||||
|
),
|
||||||
check_result=True,
|
check_result=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1807,6 +1807,7 @@ class Address:
|
|||||||
# Predefined address values
|
# Predefined address values
|
||||||
Address.NIL = Address(b"\xff\xff\xff\xff\xff\xff", Address.PUBLIC_DEVICE_ADDRESS)
|
Address.NIL = Address(b"\xff\xff\xff\xff\xff\xff", Address.PUBLIC_DEVICE_ADDRESS)
|
||||||
Address.ANY = Address(b"\x00\x00\x00\x00\x00\x00", Address.PUBLIC_DEVICE_ADDRESS)
|
Address.ANY = Address(b"\x00\x00\x00\x00\x00\x00", Address.PUBLIC_DEVICE_ADDRESS)
|
||||||
|
Address.ANY_RANDOM = Address(b"\x00\x00\x00\x00\x00\x00", Address.RANDOM_DEVICE_ADDRESS)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
class OwnAddressType:
|
class OwnAddressType:
|
||||||
|
|||||||
Reference in New Issue
Block a user