diff --git a/components/bt/controller/lib b/components/bt/controller/lib index 8ce6d27e09..26b2361bf7 160000 --- a/components/bt/controller/lib +++ b/components/bt/controller/lib @@ -1 +1 @@ -Subproject commit 8ce6d27e0981c09e1c5a982976f182d0a37662f6 +Subproject commit 26b2361bf7569eb46b68eebdf9f634ef4ed17660 diff --git a/components/bt/host/bluedroid/btc/profile/std/battery/battery_prf.c b/components/bt/host/bluedroid/btc/profile/std/battery/battery_prf.c index 5a03aab553..cca2faa95c 100644 --- a/components/bt/host/bluedroid/btc/profile/std/battery/battery_prf.c +++ b/components/bt/host/bluedroid/btc/profile/std/battery/battery_prf.c @@ -112,12 +112,13 @@ static void bas_gatts_callback(esp_gatts_evt_t event, tBTA_GATTS *p_data) p_data->add_result.char_uuid.uu.uuid16); UINT16 char_uuid = p_data->add_result.char_uuid.uu.uuid16; UINT16 service_id = p_data->add_result.service_id; - if (char_uuid == GATT_UUID_BATTERY_LEVEL) { - bas_AddCharDescr(service_id, p_data->add_result.attr_id); - } - if (char_uuid == GATT_UUID_SYSTEM_ID | GATT_UUID_MODEL_NUMBER_STR | GATT_UUID_PNP_ID | - GATT_UUID_SERIAL_NUMBER_STR | GATT_UUID_FW_VERSION_STR | GATT_UUID_HW_VERSION_STR | - GATT_UUID_SW_VERSION_STR | GATT_UUID_MANU_NAME | GATT_UUID_IEEE_DATA) { + UINT16 uuid_len = p_data->add_result.char_uuid.len; + + if (uuid_len == ESP_UUID_LEN_16) { + if (char_uuid == GATT_UUID_BATTERY_LEVEL) { + bas_AddCharDescr(service_id, p_data->add_result.attr_id); + } + switch (char_uuid) { case GATT_UUID_SYSTEM_ID: dis_cb.dis_attr[0].handle = service_id; break; @@ -138,6 +139,8 @@ static void bas_gatts_callback(esp_gatts_evt_t event, tBTA_GATTS *p_data) case GATT_UUID_PNP_ID: dis_cb.dis_attr[8].handle = service_id; break; } + default: + break; } } break; diff --git a/docs/en/api-guides/blufi.rst b/docs/en/api-guides/blufi.rst index 6ca7a3f4c6..71d1d73d45 100644 --- a/docs/en/api-guides/blufi.rst +++ b/docs/en/api-guides/blufi.rst @@ -59,8 +59,8 @@ The flow chart of BluFi Phone <- {IDF_TARGET_NAME} [label="Advertising"]; Phone -> {IDF_TARGET_NAME} [label="Create GATT connection"]; - Phone <- {IDF_TARGET_NAME} [label="Negotiate key procedure"]; Phone -> {IDF_TARGET_NAME} [label="Negotiate key procedure"]; + Phone <- {IDF_TARGET_NAME} [label="Negotiate key procedure"]; Phone -> {IDF_TARGET_NAME} [label="CTRL: Set {IDF_TARGET_NAME} to Phone Security mode"]; Phone -> {IDF_TARGET_NAME} [label="DATA: SSID"]; Phone -> {IDF_TARGET_NAME} [label="DATA: Password"];