esp32 例程 蓝牙_esp32蓝牙例程的学习记录

4、交换密匙(exchanging keys)

在gatt_security_client的日志里:

在gatt_security_server的日志里:

明显clientserver的密匙交换分4步:

这四部的交互过程是怎么样的??

在esp32例程的讲解中是这么解释的:

https://github.com/espressif/esp-idf/blob/v3.3/examples/bluetooth/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md

当客户端连接到一个远程设备并且配对成功完成后,会交换the initiator and responder keys,对于每个key交换信息,会产生

一个ESP_GAP_BLE_KEY_EVT事件,这个事件用来打印接收到的key的类型(type):

case ESP_GAP_BLE_KEY_EVT:

//shows the ble key info share with peer device to the user.

ESP_LOGI(GATTS_TABLE_TAG, "key type = %s", esp_key_type_to_str(param->ble_security.ble_key.key_type));

break;

4、交换密匙(exchanging keys) 在gatt_security_client的日志里: 在gatt_security_server的日志里: 明显clientserver的密匙交换分4步: 这四部的交互过程是怎么样的?? 在esp32例程的讲解中是这么解释的: https://github.com/espressif/esp-idf/blob/v3.3/examples/bluetooth/gatt_security_client/tutorial/Gatt_Security_Client_Example_Walkthrough.md 当客户端连接到一个远程设备并且配对成功完成后,会交换the initiator and responder keys,对于每个key交换信息,会产生 一个ESP_GAP_BLE_KEY_EVT事件,这个事件用来打印接收到的key的类型(type): case ESP_GAP_BLE_KEY_EVT: //shows the ble key info share with peer device to the user. ESP_LOGI(GATTS_TABLE_TAG, "key type = %s", esp_key_type_to_str(param->ble_security.ble_key.key_type)); break;
经验分享 程序员 微信小程序 职场和发展