From 4d8db9543f788da95d5159929f2e2ba82d74ca25 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Tue, 4 Mar 2025 13:11:48 +0100 Subject: [PATCH] feat(ble): signal full bond memory when advertising [no changelog] --- nordic/trezor/trezor-ble/src/ble/advertising.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nordic/trezor/trezor-ble/src/ble/advertising.c b/nordic/trezor/trezor-ble/src/ble/advertising.c index f5f0ca6d71..b7501812dd 100644 --- a/nordic/trezor/trezor-ble/src/ble/advertising.c +++ b/nordic/trezor/trezor-ble/src/ble/advertising.c @@ -74,6 +74,8 @@ void advertising_start(bool wl, uint8_t color, uint32_t device_code, name_len = DEVICE_NAME_LEN; } + int bonds_count = bonds_get_count(); + manufacturer_data[3] = color; manufacturer_data[4] = (device_code >> 24) & 0xff; manufacturer_data[5] = (device_code >> 16) & 0xff; @@ -115,7 +117,11 @@ void advertising_start(bool wl, uint8_t color, uint32_t device_code, } else { LOG_INF("Advertising no whitelist"); - manufacturer_data[2] = 0x01; + if (CONFIG_BT_MAX_PAIRED == bonds_count) { + manufacturer_data[2] = 0x02; + } else { + manufacturer_data[2] = 0x01; + } uint32_t options = BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_SCANNABLE; if (static_addr) {