]> granicus.if.org Git - esp-idf/commitdiff
component/bt: correct the security demo pair status code.
authorYulong <huangyulong@espressif.com>
Fri, 9 Jun 2017 06:37:28 +0000 (02:37 -0400)
committerYulong <huangyulong@espressif.com>
Fri, 9 Jun 2017 06:37:28 +0000 (02:37 -0400)
components/bt/bluedroid/api/include/esp_gap_ble_api.h
examples/bluetooth/gatt_security_server/main/example_ble_sec_gatts_demo.c

index 515df990606466e3df878811333ef7ccf95f3c5c..a17ac6b625fdd2c9df105aec5fa47a1a8f912c15 100644 (file)
@@ -183,7 +183,7 @@ typedef enum {
     ESP_BLE_SM_AUTHEN_REQ_MODE,
     ESP_BLE_SM_IOCAP_MODE,
     ESP_BLE_SM_SET_INIT_KEY,
-    ESP_BLE_SM_SET_RSP_KEK,
+    ESP_BLE_SM_SET_RSP_KEY,
     ESP_BLE_SM_MAX_KEY_SIZE,
 } esp_ble_sm_param_t;
 
index 415ea73842d6678195a051ac7ac9eb4d46cd3e9f..b1f26154f5b930980e343243a3346f8bbfc0a71a 100644 (file)
@@ -258,7 +258,7 @@ static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param
                 (bd_addr[0] << 24) + (bd_addr[1] << 16) + (bd_addr[2] << 8) + bd_addr[3],
                 (bd_addr[4] << 8) + bd_addr[5]);
         ESP_LOGI(GATTS_TABLE_TAG, "address type = %d", param->ble_security.auth_cmpl.addr_type);
-        ESP_LOGI(GATTS_TABLE_TAG, "pair status = %s",param->ble_security.auth_cmpl.success ? "fail" : "success");
+        ESP_LOGI(GATTS_TABLE_TAG, "pair status = %s",param->ble_security.auth_cmpl.success ? "success" : "fail");
         break;
     }
     default:
@@ -404,7 +404,7 @@ void app_main()
     esp_ble_gap_set_security_param(ESP_BLE_SM_IOCAP_MODE, &iocap, sizeof(uint8_t));
     esp_ble_gap_set_security_param(ESP_BLE_SM_MAX_KEY_SIZE, &key_size, sizeof(uint8_t));
     esp_ble_gap_set_security_param(ESP_BLE_SM_SET_INIT_KEY, &init_key, sizeof(uint8_t));
-    esp_ble_gap_set_security_param(ESP_BLE_SM_SET_RSP_KEK, &rsp_key, sizeof(uint8_t));
+    esp_ble_gap_set_security_param(ESP_BLE_SM_SET_RSP_KEY, &rsp_key, sizeof(uint8_t));
     
 }