At+Bleenc-Starts A Pairing Request - Espressif Systems ESP32 Instruction Set

At instruction set and examples
Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

!
Parameters
Note
Example
6.2.32. AT+BLEENC—Starts a Pairing Request
Commands
Response
Parameters
Example
Espressif
<auth_req>: authentication requirements
‣ 0: ESP_LE_AUTH_NO_BOND
‣ 1: ESP_LE_AUTH_BOND
‣ 2: ESP_LE_AUTH_REQ_MITM
‣ 4: ESP_LE_AUTH_REQ_SC_ONLY
‣ 5: ESP_LE_AUTH_REQ_SC_BOND
‣ 6: ESP_LE_AUTH_REQ_SC_MITM
‣ 7: ESP_LE_AUTH_REQ_SC_MITM_BOND
<iocap>: IO capabilities
‣ 0: ESP_IO_CAP_OUT    /*!< DisplayOnly */       
‣ 1: ESP_IO_CAP_IO    /*!< DisplayYesNo */       
‣ 2: ESP_IO_CAP_IN    /*!< KeyboardOnly */       
‣ 3: ESP_IO_CAP_NONE    /*!< NoInputNoOutput */  
‣ 4: ESP_IO_CAP_KBDISP    /*!< Keyboard display */ 
<key_size>: encryption key size, range : [7, 16]
<init_key>:
‣ if bit0 is 1, it means ESP_BLE_ENC_KEY_MASK    // exchange the encryption key
‣ if bit1 is 1, it means ESP_BLE_ID_KEY_MASK     // exchange the IRK key
‣ if bit2 is 1, it means ESP_BLE_CSR_KEY_MASK    // exchange the CSRK key
‣ if bit3 is 1, it means ESP_BLE_LINK_KEY_MASK   // exchange the link key(this key
is used only in the BLE & BR/EDR-coexist mode)
<rsp_key>: response key
‣ if bit0 is 1, it means ESP_BLE_ENC_KEY_MASK    // exchange the encryption key
‣ if bit1 is 1, it means ESP_BLE_ID_KEY_MASK     // exchange the IRK key
‣ if bit2 is 1, it means ESP_BLE_CSR_KEY_MASK    // exchange the CSRK key
‣ if bit3 is 1, it meansESP_BLE_LINK_KEY_MASK   // exchange the link key(this key
is used only in the BLE & BR/EDR-coexist mode)
This configuration should be set before the BLE connection is established.
AT+BLESECPARAM=1,4,16,3,3
Set Command:
AT+BLEENC=<conn_index>,<sec_act>
Function: to start a pairing request.
OK
<conn_index>: index of BLE connection; only 0 is supported for the single connection right
now, but multiple BLE connections will be supported in the future.
<sec_act>:
‣ 0: ESP_BLE_SEC_NONE         
‣ 1: ESP_BLE_SEC_ENCRYPT       
‣ 2: ESP_BLE_SEC_ENCRYPT_NO_MITM         
‣ 3: ESP_BLE_SEC_ENCRYPT_MITM
AT+BLESECPARAM=1,4,16,3,3
AT+BLEENC=0,3
62 97
!
/!
6. BLE-Related AT Commands
2019.06

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Table of Contents