OVMS3-idf/examples/bluetooth/gatt_security_client
Jiang Jiang Jian d6bc6fad8b Merge branch 'bugfix/btdm_add_ESP_BLE_SM_ONLY_ACCEPT_SPECIFIED_SEC_AUTH_in_set_security_param_API' into 'master'
Component/bt: add only accept sepecified authentication function for SMP

See merge request idf/esp-idf!3385
2018-09-30 14:18:23 +08:00
..
main Merge branch 'bugfix/btdm_add_ESP_BLE_SM_ONLY_ACCEPT_SPECIFIED_SEC_AUTH_in_set_security_param_API' into 'master' 2018-09-30 14:18:23 +08:00
tutorial component/bt: Update BLE examples tutorials and ReadMe files 2018-01-25 16:59:40 +08:00
CMakeLists.txt cmake: make main a component again 2018-09-11 09:44:12 +08:00
Makefile Component/bt: add gatt_security_client demo 2017-08-04 16:26:17 +08:00
README.md component/bt: Update BLE examples tutorials and ReadMe files 2018-01-25 16:59:40 +08:00
sdkconfig.defaults component/bt : decrease memory consumption by conn number 2018-08-14 02:29:17 +00:00

ESP-IDF Gatt Security Client Demo

This is the demo for users to use ESP BLE security APIs to connect to and encrypt with peer devices.

To test this demo, you can run the gatt_security_server_demo, which starts advertising and can be connected to this demo automatically.

There are some important points for this demo:
1.esp_ble_gap_set_security_param should be used to set the security parameters in the initial stage;
2.esp_ble_set_encryption should be used to start encryption with peer device. If the peer device initiates the encryption, esp_ble_gap_security_rsp should be used to send security response to the peer device when ESP_GAP_BLE_SEC_REQ_EVT is received.
3.The gatt_security_client_demo will receive a ESP_GAP_BLE_AUTH_CMPL_EVT once the encryption procedure has completed.

Please check the tutorial for more information about this example.