Skip to content

Commit a6e9bc3

Browse files
committed
Merge branch 'docs/update_ble_docs' into 'master'
feat(doc): Add Bluetooth LE OTA AT commands and upgrade guide See merge request application/esp-at!2065
2 parents b49e4b9 + 910c54e commit a6e9bc3

7 files changed

Lines changed: 883 additions & 0 deletions

File tree

docs/conf_common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
BLE_DOCS = ['AT_Command_Examples/bluetooth_le_at_examples.rst',
3030
'Compile_and_Develop/How_to_customize_BLE_services.rst',
31+
'Compile_and_Develop/How_to_implement_BLE_OTA_update.rst',
3132
'AT_Command_Set/BLE_AT_Commands.rst']
3233

3334

docs/en/AT_Command_Set/BLE_AT_Commands.rst

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Bluetooth® Low Energy AT Commands
6464
:esp32c3 or esp32c5 or esp32c6 or esp32c61 or esp32c2: - :ref:`AT+BLESETPHY <cmd-BLESETPHY>`: Set the current transmitter PHY.
6565
:esp32 or esp32c3: - :ref:`AT+BLERDRSSI <cmd-BLERDRSSI>`: Query the current connection RSSI.
6666
:esp32 or esp32c3: - :ref:`AT+BLEWL <cmd-BLEWL>`: Set the whitelist.
67+
:esp32 or esp32c3 or esp32c5 or esp32c6 or esp32c61 or esp32c2: - :ref:`AT+BLEOTANAME <cmd-BLEOTANAME>`: Query or set Bluetooth LE OTA device name.
68+
:esp32 or esp32c3 or esp32c5 or esp32c6 or esp32c61 or esp32c2: - :ref:`AT+BLEOTA <cmd-BLEOTA>`: Initialize or deinitialize Bluetooth LE OTA.
6769

6870
.. _cmd-ble-intro:
6971

@@ -3550,3 +3552,147 @@ Introduction
35503552

35513553
AT+BLEWL=1,0,"24:0a:c4:09:34:23" // add a device to the whitelist
35523554
AT+BLEWL=0 // remove all devices from the whitelist
3555+
3556+
.. only:: esp32 or esp32c3 or esp32c5 or esp32c6 or esp32c61 or esp32c2
3557+
3558+
.. _cmd-BLEOTANAME:
3559+
3560+
:ref:`AT+BLEOTANAME <BLE-AT>`: Query or Set Bluetooth LE OTA Device Name
3561+
--------------------------------------------------------------------------------------
3562+
3563+
Query Command
3564+
^^^^^^^^^^^^^
3565+
3566+
**Function:**
3567+
3568+
Query the Bluetooth LE OTA device name.
3569+
3570+
**Command:**
3571+
3572+
::
3573+
3574+
AT+BLEOTANAME?
3575+
3576+
**Response:**
3577+
3578+
::
3579+
3580+
+BLEOTANAME:<device_name>
3581+
OK
3582+
3583+
Set Command
3584+
^^^^^^^^^^^
3585+
3586+
**Function:**
3587+
3588+
Set the Bluetooth LE OTA device name.
3589+
3590+
**Command:**
3591+
3592+
::
3593+
3594+
AT+BLEOTANAME=<device_name>
3595+
3596+
**Response:**
3597+
3598+
::
3599+
3600+
OK
3601+
3602+
Parameter
3603+
^^^^^^^^^^
3604+
3605+
- **<device_name>**: Bluetooth LE OTA device name. Maximum length: 29 bytes. The default name is "ESP-C919".
3606+
3607+
Notes
3608+
^^^^^
3609+
3610+
- If you need to set the Bluetooth LE OTA device name, please set it before running :ref:`AT+BLEOTA=1 <cmd-BLEOTA>`. Otherwise, it will use the default name ``ESP-C919``.
3611+
3612+
Example
3613+
^^^^^^^^
3614+
3615+
::
3616+
3617+
AT+BLEOTANAME="NAME"
3618+
AT+BLEOTANAME?
3619+
3620+
.. _cmd-BLEOTA:
3621+
3622+
:ref:`AT+BLEOTA <BLE-AT>`: Initialize or Deinitialize Bluetooth LE OTA
3623+
----------------------------------------------------------------------------
3624+
3625+
Query Command
3626+
^^^^^^^^^^^^^
3627+
3628+
**Function:**
3629+
3630+
Query the Bluetooth LE OTA initialization status.
3631+
3632+
**Command:**
3633+
3634+
::
3635+
3636+
AT+BLEOTA?
3637+
3638+
**Response:**
3639+
3640+
If Bluetooth LE OTA is not initialized, the response is:
3641+
3642+
::
3643+
3644+
+BLEOTA:0
3645+
3646+
OK
3647+
3648+
If Bluetooth LE OTA is initialized, the response is:
3649+
3650+
::
3651+
3652+
+BLEOTA:1
3653+
3654+
OK
3655+
3656+
Set Command
3657+
^^^^^^^^^^^
3658+
3659+
**Function:**
3660+
3661+
Initialize or deinitialize Bluetooth LE OTA.
3662+
3663+
**Command:**
3664+
3665+
::
3666+
3667+
AT+BLEOTA=<init>
3668+
3669+
**Response:**
3670+
3671+
::
3672+
3673+
OK
3674+
3675+
Parameter
3676+
^^^^^^^^^^
3677+
3678+
- **<init>**:
3679+
3680+
- 0: deinitialize Bluetooth LE OTA;
3681+
- 1: initialize Bluetooth LE OTA.
3682+
3683+
Notes
3684+
^^^^^
3685+
3686+
- The default AT firmware does not enable this command. To use it, please refer to :doc:`../Compile_and_Develop/How_to_implement_BLE_OTA_update` to enable the configuration (and update the MTU to the recommended value 512 at the same time), then rebuild the firmware.
3687+
- If you need to set the Bluetooth LE OTA device name, please execute the :ref:`AT+BLEOTANAME <cmd-BLEOTANAME>` command before initializing with this command.
3688+
- After successful initialization, the device automatically starts advertising, waits for the peer APP to connect, and then receives the OTA firmware from the peer APP.
3689+
- After the firmware has been transferred and verified, the device automatically restarts.
3690+
- Please refer to :doc:`../Compile_and_Develop/How_to_implement_BLE_OTA_update` for the GATT services, peer APP sequence, and data packet format.
3691+
3692+
Example
3693+
^^^^^^^^
3694+
3695+
::
3696+
3697+
AT+BLEOTANAME="NAME"
3698+
AT+BLEOTA=1

0 commit comments

Comments
 (0)