summaryrefslogtreecommitdiff
path: root/supervisor/shared
diff options
context:
space:
mode:
authorSean Cross <sean@xobs.io>2020-05-17 22:06:21 +0800
committerSean Cross <sean@xobs.io>2020-05-19 15:01:18 +0800
commitcfe65742a376652be0b44ff93d47f407a9db8bf9 (patch)
tree5ee478da2f69b566afb7d630aa1dce710b47c69b /supervisor/shared
parent2c2b53303d17e07daa8f7a61740835d30f671a18 (diff)
_bleio: support anonymous advertising
Add a new parameter to the `start_advertising()` function to enable anonymous advertising. This forces a call to `sd_ble_gap_privacy_set()` with `privacy_mode` set to `BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY` and `private_addr_type` set to `BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE`. With this, addresses will cycle at a predefined rate (currently once every 15 minutes). Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'supervisor/shared')
-rw-r--r--supervisor/shared/bluetooth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/supervisor/shared/bluetooth.c b/supervisor/shared/bluetooth.c
index b463160cf..6b1c03fc0 100644
--- a/supervisor/shared/bluetooth.c
+++ b/supervisor/shared/bluetooth.c
@@ -74,6 +74,7 @@ void supervisor_bluetooth_start_advertising(void) {
// TODO: switch to Adafruit short UUID for the advertisement and add manufacturing data to distinguish ourselves from arduino.
_common_hal_bleio_adapter_start_advertising(&common_hal_bleio_adapter_obj,
true,
+ false,
1.0,
circuitpython_advertising_data,
sizeof(circuitpython_advertising_data),