!
Response:
OK
ESP32 Client:
•
AT+BLEINIT=1 // client role
Response:
OK
2. Establish BLE connection:
ESP32 Server:
•
- Query the BLE address. For example, if the address is "24:0a:c4:03:f4:d6".
AT+BLEADDR? // get server's BLE address
Response:
+BLEADDR:24:0a:c4:03:f4:d6
OK
- Configure parameters of advertisements. This is optional, though. If you do not
configure the parameters of advertisements, default parameters will be applied.
AT+BLEADVPARAM=32,64,0,0,7
Response:
OK
- Configure advertisement data:
AT+BLEADVDATA="0201060B09457370726573736966030302A0"
/* The adv data is
* 02 01 06 //<length>,<type>,<data>
* 0A 09 457370726573736966 //<length>,<type>,<data>
* 03 03 02A0 //<length>,<type>,<data>
*/
Response:
OK
If you do not configure the advertisement data, then the payload will be empty when
scanned.
You can also configure the response data of the scanning (ScanRspData):
AT+BLESCANRSPDATA="0201060B09457370726573736966030302A0"
OK
The ScanRspData can be discovered in an active scan.
- Start advertising.
Espressif
79 97
!
/!
9. AT Commands Examples
2019.06
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers