Merge branch 'bugfix/btdm_disable_some_secrity_mask_v3.1' into 'release/v3.1'
components/bt: Disable some unsupported security mask See merge request espressif/esp-idf!6728
This commit is contained in:
commit
0c4ca580d2
2 changed files with 13 additions and 5 deletions
|
@ -95,6 +95,10 @@ esp_err_t esp_spp_connect(esp_spp_sec_t sec_mask,
|
|||
btc_spp_args_t arg;
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
if (sec_mask != ESP_SPP_SEC_AUTHORIZE) {
|
||||
LOG_WARN("Only ESP_SPP_SEC_AUTHORIZE is supported!\n");
|
||||
}
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_SPP;
|
||||
msg.act = BTC_SPP_ACT_CONNECT;
|
||||
|
@ -133,6 +137,10 @@ esp_err_t esp_spp_start_srv(esp_spp_sec_t sec_mask,
|
|||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (sec_mask != ESP_SPP_SEC_AUTHORIZE) {
|
||||
LOG_WARN("Only ESP_SPP_SEC_AUTHORIZE is supported!\n");
|
||||
}
|
||||
|
||||
msg.sig = BTC_SIG_API_CALL;
|
||||
msg.pid = BTC_PID_SPP;
|
||||
msg.act = BTC_SPP_ACT_START_SRV;
|
||||
|
|
|
@ -30,7 +30,7 @@ typedef enum {
|
|||
ESP_SPP_NO_RESOURCE /*!< No more set pm control block */
|
||||
} esp_spp_status_t;
|
||||
|
||||
/* Security Setting Mask */
|
||||
/* Security Setting Mask, Only support ESP_SPP_SEC_AUTHORIZE.*/
|
||||
#define ESP_SPP_SEC_NONE 0x0000 /*!< No security. relate to BTA_SEC_NONE in bta/bta_api.h */
|
||||
#define ESP_SPP_SEC_AUTHORIZE 0x0001 /*!< Authorization required (only needed for out going connection ) relate to BTA_SEC_AUTHORIZE in bta/bta_api.h*/
|
||||
#define ESP_SPP_SEC_AUTHENTICATE 0x0012 /*!< Authentication required. relate to BTA_SEC_AUTHENTICATE in bta/bta_api.h*/
|
||||
|
@ -229,8 +229,8 @@ esp_err_t esp_spp_start_discovery(esp_bd_addr_t bd_addr);
|
|||
* When the connection is established or failed,
|
||||
* the callback is called with ESP_SPP_OPEN_EVT.
|
||||
*
|
||||
* @param[in] sec_mask: Security Setting Mask .
|
||||
* @param[in] role: Msater or slave.
|
||||
* @param[in] sec_mask: Security Setting Mask. Only support ESP_SPP_SEC_AUTHORIZE.
|
||||
* @param[in] role: Master or slave.
|
||||
* @param[in] remote_scn: Remote device bluetooth device SCN.
|
||||
* @param[in] peer_bd_addr: Remote device bluetooth device address.
|
||||
*
|
||||
|
@ -260,8 +260,8 @@ esp_err_t esp_spp_disconnect(uint32_t handle);
|
|||
* When the connection is established, the callback is called
|
||||
* with ESP_SPP_SRV_OPEN_EVT.
|
||||
*
|
||||
* @param[in] sec_mask: Security Setting Mask .
|
||||
* @param[in] role: Msater or slave.
|
||||
* @param[in] sec_mask: Security Setting Mask. Only support ESP_SPP_SEC_AUTHORIZE.
|
||||
* @param[in] role: Master or slave.
|
||||
* @param[in] local_scn: The specific channel you want to get.
|
||||
* If channel is 0, means get any channel.
|
||||
* @param[in] name: Server's name.
|
||||
|
|
Loading…
Reference in a new issue