From 54205481df85c815525d97d061b8677ed95cca9c Mon Sep 17 00:00:00 2001 From: zhanghaipeng Date: Wed, 17 Apr 2024 20:06:08 +0800 Subject: [PATCH] fix(ble/bluedroid): Fixed set BLE appearance value --- components/bt/host/bluedroid/api/esp_gap_ble_api.c | 1 + components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h | 1 + components/bt/host/bluedroid/stack/btm/btm_ble_gap.c | 1 + components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h | 1 + 4 files changed, 4 insertions(+) diff --git a/components/bt/host/bluedroid/api/esp_gap_ble_api.c b/components/bt/host/bluedroid/api/esp_gap_ble_api.c index 25c6357924..8cb44a9fba 100644 --- a/components/bt/host/bluedroid/api/esp_gap_ble_api.c +++ b/components/bt/host/bluedroid/api/esp_gap_ble_api.c @@ -299,6 +299,7 @@ esp_err_t esp_ble_gap_config_local_icon (uint16_t icon) case ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV: case ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD: case ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD_AND_NAV: + case ESP_BLE_APPEARANCE_STANDALONE_SPEAKER: msg.sig = BTC_SIG_API_CALL; msg.pid = BTC_PID_GAP_BLE; msg.act = BTC_GAP_BLE_ACT_CONFIG_LOCAL_ICON; diff --git a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h index e61f3fe431..c66680cea6 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +++ b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h @@ -104,6 +104,7 @@ typedef uint8_t esp_ble_auth_req_t; /*!< combination of the above bit #define ESP_BLE_APPEARANCE_CYCLING_CADENCE 0x0483 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_CADENCE in stack/btm_ble_api.h */ #define ESP_BLE_APPEARANCE_CYCLING_POWER 0x0484 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_POWER in stack/btm_ble_api.h */ #define ESP_BLE_APPEARANCE_CYCLING_SPEED_CADENCE 0x0485 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_SPEED_CADENCE in stack/btm_ble_api.h */ +#define ESP_BLE_APPEARANCE_STANDALONE_SPEAKER 0x0841 /*!< relate to BTM_BLE_APPEARANCE_STANDALONE_SPEAKER in stack/btm_ble_api.h */ #define ESP_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 0x0C40 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER in stack/btm_ble_api.h */ #define ESP_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 0x0C41 /*!< relate to BTM_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP in stack/btm_ble_api.h */ #define ESP_BLE_APPEARANCE_PULSE_OXIMETER_WRIST 0x0C42 /*!< relate to BTM_BLE_APPEARANCE_PULSE_OXIMETER_WRIST in stack/btm_ble_api.h */ diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c index fb27ba0f69..7dad8217a2 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c @@ -3291,6 +3291,7 @@ static void btm_ble_appearance_to_cod(UINT16 appearance, UINT8 *dev_class) case BTM_BLE_APPEARANCE_CYCLING_CADENCE: case BTM_BLE_APPEARANCE_CYCLING_POWER: case BTM_BLE_APPEARANCE_CYCLING_SPEED_CADENCE: + case BTM_BLE_APPEARANCE_STANDALONE_SPEAKER: case BTM_BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS: case BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION: case BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV: diff --git a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h index f64500656b..d415d3390d 100644 --- a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h +++ b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h @@ -254,6 +254,7 @@ typedef UINT8 BLE_SIGNATURE[BTM_BLE_AUTH_SIGN_LEN]; /* Device address */ #define BTM_BLE_APPEARANCE_CYCLING_CADENCE 0x0483 #define BTM_BLE_APPEARANCE_CYCLING_POWER 0x0484 #define BTM_BLE_APPEARANCE_CYCLING_SPEED_CADENCE 0x0485 +#define BTM_BLE_APPEARANCE_STANDALONE_SPEAKER 0x0841 #define BTM_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 0x0C40 #define BTM_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 0x0C41 #define BTM_BLE_APPEARANCE_PULSE_OXIMETER_WRIST 0x0C42