You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/AT_Command_Set/BLE_AT_Commands.rst
+21-27Lines changed: 21 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,6 +158,7 @@ Introduction
158
158
- 0: deinit Bluetooth LE
159
159
- 1: client role
160
160
- 2: server role
161
+
- 3: dual role (client and server)
161
162
162
163
Notes
163
164
^^^^^
@@ -167,6 +168,12 @@ Introduction
167
168
- After the initialization, the Bluetooth LE role cannot be changed unless you run :ref:`AT+RST <cmd-RST>` to restart the system first and then re-initialize the Bluetooth LE role.
168
169
- Before you deinitialize the Bluetooth stack, it is recommended to stop broadcasting, stop scanning, and disconnect all existing connections.
169
170
- If Bluetooth LE is initialized, :ref:`AT+CIPMODE <cmd-IPMODE>` cannot be set to 1.
171
+
- In dual mode, both server-specific and client-specific commands are available.
172
+
- In dual-mode, BLE passthrough-related commands and BLE auto-passthrough at startup are not supported.
173
+
- In dual mode, it is possible to set advertising parameters, query advertising parameters, and start or stop advertising.
174
+
- In dual mode, it is possible to set scanning parameters, query scanning parameters, and start or stop scanning.
175
+
- In dual mode, it is possible to initiate all connection-related parameter updates and query connection parameters.
176
+
- In dual mode, the total number of connections and advertisements combined is limited to 3.
170
177
171
178
Example
172
179
^^^^^^^^
@@ -527,7 +534,8 @@ Introduction
527
534
::
528
535
529
536
AT+BLEINIT=2 // Role: server
530
-
AT+BLESCANRSPDATA="1122334455"
537
+
AT+BLEADVPARAM=32,32,0,0,7,0,, // set advertising parameters
538
+
AT+BLESCANRSPDATA="1122334455" // set scan response data
531
539
532
540
.. _cmd-BADVP:
533
541
@@ -767,7 +775,8 @@ Introduction
767
775
::
768
776
769
777
AT+BLEINIT=2 // Role: server
770
-
AT+BLEADVDATA="1122334455"
778
+
AT+BLEADVPARAM=32,32,0,0,7,0,, // set advertising parameters
779
+
AT+BLEADVDATA="1122334455" // set advertising data
771
780
772
781
.. _cmd-BADVDEX:
773
782
@@ -830,6 +839,7 @@ Introduction
830
839
831
840
- If advertising data is preset by command :ref:`AT+BLEADVDATA <cmd-BADVD>`\=<adv_data>, it will be overwritten by this command.
832
841
- This command automatically changes the adv type previously set using :ref:`AT+BLEADVPARAM <cmd-BADVP>` to 0.
842
+
- The AT module automatically assembles packets in sequence based on the parameters provided by the user. However, the total data length is limited to 31 bytes. Any data exceeding this limit will be truncated.
833
843
834
844
Example
835
845
^^^^^^^^
@@ -1268,36 +1278,20 @@ Introduction
1268
1278
Parameters
1269
1279
^^^^^^^^^^
1270
1280
1271
-
.. only:: esp32 or esp32c3
1272
-
1273
-
::
1274
-
1275
-
- **<conn_index>**: index of Bluetooth LE connection. Range: [0,2].
1276
-
- **<mtu_size>**: MTU length. Unit: byte. Range: [23,517].
1277
-
1278
-
.. only:: esp32c2 or esp32c5 or esp32c6 or esp32c61
1279
-
1280
-
::
1281
+
.. list::
1281
1282
1282
-
- **<conn_index>**: index of Bluetooth LE connection. Range: [0,1].
1283
+
:esp32 or esp32c3 or esp32c5 or esp32c6 or esp32c61: - **<conn_index>**: index of Bluetooth LE connection. Range: [0,2].
1284
+
:esp32c2: - **<conn_index>**: index of Bluetooth LE connection. Range: [0,1].
1285
+
:esp32 or esp32c3: - **<mtu_size>**: MTU length. Unit: byte. Range: [23,517].
1283
1286
1284
1287
Notes
1285
1288
^^^^^
1286
1289
1287
-
.. only:: esp32 or esp32c3
1288
-
1289
-
::
1290
-
1291
-
- Bluetooth LE connection has to be established first.
1292
-
- Only the client can call this command to set the length of MTU.
1293
-
- The actual length of MTU needs to be negotiated. The ``OK`` response only indicates an attempt to negotiate the length. The actual length may not be the value you set. Therefore, it is recommended to run command :ref:`AT+BLECFGMTU? <cmd-BMTU>` to query the actual length.
1294
-
1295
-
.. only:: esp32c2 or esp32c5 or esp32c6 or esp32c61
1296
-
1297
-
::
1290
+
.. list::
1298
1291
1299
-
- Bluetooth LE connection has to be established first.
1300
-
- Only the client can call this command to set the length of MTU.
1292
+
- Bluetooth LE connection has to be established first.
1293
+
- Only the client can call this command to set the length of MTU.
1294
+
:esp32 or esp32c3: - The actual length of MTU needs to be negotiated. The ``OK`` response only indicates an attempt to negotiate the length. The actual length may not be the value you set. Therefore, it is recommended to run command :ref:`AT+BLECFGMTU? <cmd-BMTU>` to query the actual length.
0 commit comments