esp-idf/examples/bluetooth/bluedroid/ble/gatt_security_server
2022-03-11 10:48:21 +00:00
..
main Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
tutorial Bluetooth examples restructuring 2019-07-01 19:21:57 +08:00
CMakeLists.txt build_app: make multi target support readable 2020-04-09 16:40:57 +08:00
Makefile Bluetooth examples restructuring 2019-07-01 19:21:57 +08:00
README.md component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00
sdkconfig.defaults examples: fix sdkconfig warnings 2019-11-21 15:36:06 +01:00
sdkconfig.defaults.esp32 components/bt: Combine 3 Bluetooth controller menu 2022-03-11 10:48:21 +00:00
sdkconfig.defaults.esp32c3 components/bt: Combine 3 Bluetooth controller menu 2022-03-11 10:48:21 +00:00
sdkconfig.defaults.esp32s3 components/bt: Combine 3 Bluetooth controller menu 2022-03-11 10:48:21 +00:00

Supported Targets ESP32 ESP32-C3

ESP-IDF Gatt Security Server Demo

This is the demo of APIs to connect to and encrypt with peer devices.

To test this demo, you can run gatt_security_client_demo, which starts scanning, connects to and starts encryption with gatt_security_server_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.