From acacfc9234cf84e5c29ee587d598917751128da4 Mon Sep 17 00:00:00 2001 From: luweike Date: Fri, 10 Apr 2026 12:09:33 +0800 Subject: [PATCH] docs: Fix BLE get-started adv comments and typos --- docs/en/api-guides/ble/get-started/ble-connection.rst | 2 +- docs/en/api-guides/ble/get-started/ble-device-discovery.rst | 4 ++-- docs/zh_CN/api-guides/ble/get-started/ble-connection.rst | 4 ++-- .../zh_CN/api-guides/ble/get-started/ble-device-discovery.rst | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/api-guides/ble/get-started/ble-connection.rst b/docs/en/api-guides/ble/get-started/ble-connection.rst index bf79aede9e..16e257442e 100644 --- a/docs/en/api-guides/ble/get-started/ble-connection.rst +++ b/docs/en/api-guides/ble/get-started/ble-connection.rst @@ -326,7 +326,7 @@ Next, we want the device to be connectable, so we need to modify the advertising static void start_advertising(void) { ... - /* Set non-connetable and general discoverable mode to be a beacon */ + /* Undirected connectable and general discoverable advertising */ adv_params.conn_mode = BLE_GAP_CONN_MODE_UND; adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN; diff --git a/docs/en/api-guides/ble/get-started/ble-device-discovery.rst b/docs/en/api-guides/ble/get-started/ble-device-discovery.rst index dbc4dfb1e8..18a2bd6999 100644 --- a/docs/en/api-guides/ble/get-started/ble-device-discovery.rst +++ b/docs/en/api-guides/ble/get-started/ble-device-discovery.rst @@ -263,7 +263,7 @@ These advertising behaviors can be combined into four common types of advertisin - N - Y - `ADV_NONCONN_IND` - - Used by beacon devices to advertising data without connection + - Used by beacon devices to advertise data without connection * - N - Y - Y @@ -1003,7 +1003,7 @@ Finally, we set the advertising parameters and initiate the advertising by calli ... - /* Set non-connetable and general discoverable mode to be a beacon */ + /* Set non-connectable and general discoverable mode to be a beacon */ adv_params.conn_mode = BLE_GAP_CONN_MODE_NON; adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN; diff --git a/docs/zh_CN/api-guides/ble/get-started/ble-connection.rst b/docs/zh_CN/api-guides/ble/get-started/ble-connection.rst index 23d7360774..e5657a9c58 100644 --- a/docs/zh_CN/api-guides/ble/get-started/ble-connection.rst +++ b/docs/zh_CN/api-guides/ble/get-started/ble-connection.rst @@ -319,14 +319,14 @@ MTU 可以设定为更大的值,例如 140 字节。在蓝牙核心规范 4.2 ... } -其次,我们希望设备是可连接的,所以需要将广播模式从不可连接修改为可连接;另外,在扫描响应中设定的广播间隔参数仅仅起到告知扫其他设备的作用,不影响实际的广播间隔,该参数必须设定到广播参数结构中才能真正生效,这里我们将广播间隔的最小值与最大值分别设为 500 ms 和 510 ms ;最后,我们希望用回调函数 `gap_event_handler` 处理 GAP 事件,所以将该回调函数传入对应于开始广播的 API `ble_gap_adv_start` 中。相关代码如下 +其次,我们希望设备是可连接的,所以需要将广播模式从不可连接修改为可连接;另外,在扫描响应中设定的广播间隔参数仅仅起到告知其他设备的作用,不影响实际的广播间隔,该参数必须设定到广播参数结构中才能真正生效,这里我们将广播间隔的最小值与最大值分别设为 500 ms 和 510 ms ;最后,我们希望用回调函数 `gap_event_handler` 处理 GAP 事件,所以将该回调函数传入对应于开始广播的 API `ble_gap_adv_start` 中。相关代码如下 .. code-block:: C static void start_advertising(void) { ... - /* Set non-connetable and general discoverable mode to be a beacon */ + /* Undirected connectable and general discoverable advertising */ adv_params.conn_mode = BLE_GAP_CONN_MODE_UND; adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN; diff --git a/docs/zh_CN/api-guides/ble/get-started/ble-device-discovery.rst b/docs/zh_CN/api-guides/ble/get-started/ble-device-discovery.rst index 07d4e9fd1f..1fe37fb4a7 100644 --- a/docs/zh_CN/api-guides/ble/get-started/ble-device-discovery.rst +++ b/docs/zh_CN/api-guides/ble/get-started/ble-device-discovery.rst @@ -1003,7 +1003,7 @@ PDU 有效负载也分为两部分 ... - /* Set non-connetable and general discoverable mode to be a beacon */ + /* Set non-connectable and general discoverable mode to be a beacon */ adv_params.conn_mode = BLE_GAP_CONN_MODE_NON; adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;