feat(ble/bluedroid): add LE UTP host support (Core 6.2)

(cherry picked from commit 3844e24207)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
Zhi Wei Jian
2026-06-26 20:37:44 +08:00
committed by BOT
parent 661e297e87
commit aed8603a42
18 changed files with 423 additions and 8 deletions
@@ -1007,6 +1007,11 @@ typedef void (tBTM_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_CMPL_CBACK) (tBTM_STATUS st
#define BTM_BLE_5_GAP_SET_DEFAULT_RATE_PARAMETERS_COMPLETE_EVT 86
#define BTM_BLE_5_GAP_READ_MIN_SUPP_CONN_INTERVAL_COMPLETE_EVT 87
#endif // #if (BLE_FEAT_SHORTER_CONN_INTERVALS == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
#define BTM_BLE_5_GAP_ENABLE_UTP_OTA_MODE_COMPLETE_EVT 83
#define BTM_BLE_5_GAP_UTP_SEND_COMPLETE_EVT 84
#define BTM_BLE_5_GAP_UTP_RECEIVE_EVT 85
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
#define BTM_BLE_5_GAP_UNKNOWN_EVT 91
typedef UINT8 tBTM_BLE_5_GAP_EVENT;
@@ -1320,6 +1325,12 @@ typedef struct {
} tBTM_BLE_READ_MIN_SUPP_CONN_INTERVAL;
#endif // #if (BLE_FEAT_SHORTER_CONN_INTERVALS == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
typedef struct {
UINT8 len;
UINT8 *data;
} tBTM_BLE_UTP_RECEIVE;
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
typedef struct {
UINT16 sync_handle;
@@ -2043,6 +2054,9 @@ typedef union {
tBTM_BLE_CONN_RATE_CHANGE conn_rate_change;
tBTM_BLE_READ_MIN_SUPP_CONN_INTERVAL read_min_supp_conn_interval;
#endif // #if (BLE_FEAT_SHORTER_CONN_INTERVALS == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
tBTM_BLE_UTP_RECEIVE utp_receive;
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
} tBTM_BLE_5_GAP_CB_PARAMS;
typedef struct {
@@ -3234,6 +3248,10 @@ void BTM_BleSetDefaultRateParameters(UINT16 conn_interval_min, UINT16 conn_inter
tBTM_STATUS BTM_BleReadMinSuppConnInterval(void);
#endif // #if (BLE_FEAT_SHORTER_CONN_INTERVALS == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
tBTM_STATUS BTM_BleEnableUtpOtaMode(UINT8 enable);
tBTM_STATUS BTM_BleUtpSend(UINT8 data_len, const UINT8 *p_data);
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
#if (BLE_50_DTM_TEST_EN == TRUE)
@@ -494,6 +494,10 @@
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
#define HCI_BLE_ENABLE_UTP_OTA_MODE (0x009F | HCI_GRP_BLE_CMDS)
#define HCI_BLE_UTP_SEND (0x00A0 | HCI_GRP_BLE_CMDS)
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
#if (BLE_FEAT_SHORTER_CONN_INTERVALS == TRUE)
#define HCI_BLE_CONNECTION_RATE_REQUEST (0x00A1 | HCI_GRP_BLE_CMDS)
@@ -1004,6 +1008,9 @@
#define HCI_BLE_FRAME_SPACE_UPDATE_COMPLETE_EVT 0x35
#endif // #if (BLE_FEAT_FRAME_SPACE_UPDATE == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
#define HCI_BLE_UTP_RECEIVE_EVT 0x36
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
#if (BLE_FEAT_SHORTER_CONN_INTERVALS == TRUE)
#define HCI_BLE_CONN_RATE_CHANGE_EVT 0x37
@@ -858,6 +858,15 @@ BOOLEAN btsnd_hcic_ble_read_all_local_supp_features(void);
UINT8 btsnd_hcic_ble_read_all_remote_features(UINT16 conn_handle, UINT8 page_requested);
#endif // #if (BLE_FEAT_LL_EXT_FEAT == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
#define HCIC_PARAM_SIZE_ENABLE_UTP_OTA_MODE 1
#define HCIC_PARAM_SIZE_UTP_SEND_HDR 1
#define HCIC_PARAM_SIZE_UTP_SEND_MAX 255
#define BLE_UTP_DATA_MAX_LEN 254
UINT8 btsnd_hcic_ble_enable_utp_ota_mode(UINT8 enable);
UINT8 btsnd_hcic_ble_utp_send(UINT8 data_len, const UINT8 *p_data);
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
#if (BLE_FEAT_SHORTER_CONN_INTERVALS == TRUE)
#define HCIC_PARAM_SIZE_CONNECTION_RATE_REQUEST 20