components/bt: Disable some unsupported security mask

This commit is contained in:
baohongde
2019-11-17 13:42:09 +08:00
parent 9214c887f7
commit 8353ecdf36
2 changed files with 13 additions and 3 deletions

View File

@@ -95,6 +95,11 @@ 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_ERROR("Only ESP_SPP_SEC_AUTHORIZE is supported!\n");
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_SPP;
msg.act = BTC_SPP_ACT_CONNECT;
@@ -133,6 +138,11 @@ 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_ERROR("Only ESP_SPP_SEC_AUTHORIZE is supported!\n");
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_SPP;
msg.act = BTC_SPP_ACT_START_SRV;