mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-12 14:16:06 +00:00
feat(ble): signal full bond memory when advertising
[no changelog]
This commit is contained in:
parent
91c3fde7bb
commit
4d8db9543f
@ -74,6 +74,8 @@ void advertising_start(bool wl, uint8_t color, uint32_t device_code,
|
|||||||
name_len = DEVICE_NAME_LEN;
|
name_len = DEVICE_NAME_LEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int bonds_count = bonds_get_count();
|
||||||
|
|
||||||
manufacturer_data[3] = color;
|
manufacturer_data[3] = color;
|
||||||
manufacturer_data[4] = (device_code >> 24) & 0xff;
|
manufacturer_data[4] = (device_code >> 24) & 0xff;
|
||||||
manufacturer_data[5] = (device_code >> 16) & 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 {
|
} else {
|
||||||
LOG_INF("Advertising no whitelist");
|
LOG_INF("Advertising no whitelist");
|
||||||
|
|
||||||
|
if (CONFIG_BT_MAX_PAIRED == bonds_count) {
|
||||||
|
manufacturer_data[2] = 0x02;
|
||||||
|
} else {
|
||||||
manufacturer_data[2] = 0x01;
|
manufacturer_data[2] = 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t options = BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_SCANNABLE;
|
uint32_t options = BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_SCANNABLE;
|
||||||
if (static_addr) {
|
if (static_addr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user