!
6.2. Commands
6.2.1.
AT+BLEINIT—BLE Initialization
Commands
Response
Parameter
Notes
Example
6.2.2.
AT+BLEADDR—Sets BLE Device's Address
Commands
Response
Parameter
Espressif
Query Command:
AT+BLEINIT?
Function: to check the initialization status of
BLE.
If BLE is not initialized, it will return:
+BLEINIT:0
OK
If BLE is initialized, it will return:
+BLEINIT:<role>
OK
<init>:
‣ 0: de-init BLE, disable BLE RF *
‣ 1: client role
‣ 2: server role
Before using BLE AT commands, this command has to be called first to trigger the
•
initialization process.
After being initialized, the BLE role cannot be changed directly. If the user wants to
•
change the BLE role, AT+RST or AT+BLEINIT=0 needs to be called first.
If using ESP32 as a BLE server, a service bin should be downloaded into Flash.
•
‣ at_customize.bin has to be downloaded, so that the relevant commands can be used.
Please refer to the
ESP32_Customize_Partitions
‣ To learn how to generate a service bin, please refer to esp32-at/tools/readme.md.
‣ The download address of the service bin is the "ble_data" address in
at_customize.csv.
AT+BLEINIT=1
Query Command:
AT+BLEADDR?
Function: to get the BLE public address.
+BLEADDR:<BLE_public_addr>
OK
<addr_type>:
‣ 0: public address
‣ 1: random address
42 97
!
/!
6. BLE-Related AT Commands
Set Command:
AT+BLEINIT=<init>
Function: to initialize the role of BLE.
OK
for more details.
Set Command:
AT+BLEADDR=<addr_type>,<random_addr>
Function: to set the BLE random address.
OK
esp32-at/
2019.06
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers