From 39080a2d590c6eacb86599f1c36eff4d1d2501b2 Mon Sep 17 00:00:00 2001 From: liuning Date: Mon, 19 Sep 2022 16:44:31 +0800 Subject: [PATCH] docs: update BluFi documentation --- docs/en/api-guides/blufi.rst | 19 +++++++++++++++++-- docs/zh_CN/api-guides/blufi.rst | 19 +++++++++++++++++-- examples/bluetooth/.build-test-rules.yml | 2 +- examples/bluetooth/blufi/README.md | 6 +++--- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/docs/en/api-guides/blufi.rst b/docs/en/api-guides/blufi.rst index 9f8a3f950b12..3d2dc0745e66 100644 --- a/docs/en/api-guides/blufi.rst +++ b/docs/en/api-guides/blufi.rst @@ -321,11 +321,11 @@ The format of ACK Frame: * 0x02: SoftAP * 0x03: SoftAP & STA - data[1]: connection state of the STA device. 0x0 indicates a connection state, and others represent a disconnected state; + data[1]: connection state of the STA device. 0x0 indicates a connection state with IP address, 0x1 represent a disconnected state, 0x2 indicates a connecting state, and 0x3 indicates a connection state but no IP address. data[2]: connection state of SoftAP. That is, how many STA devices have been connected. - data[3] and the subsequent is in accordance with the format of SSID/BSSID information. + data[3] and the subsequent is in accordance with the format of SSID/BSSID information. If device is in connecting state, maximum Wi-Fi reconnecting time would be included here. If device is in disconnected state, Wi-Fi connection end reason and RSSI would be included here. * - 0x10 (b’010000) - Version - @@ -347,10 +347,25 @@ The format of ACK Frame: * 0x06: dh param error * 0x07: read param error * 0x08: make public error + * 0x09: data format error + * 0x0a: calculate MD5 error + * 0x0b: Wi-Fi scan error * - 0x13 (b’010011) - Custom Data - To send or receive custom data. - The data frame supports to be sent into fragments if the data length is too long. + * - 0x14 (b’010100) + - Set the maximum Wi-Fi reconnecting time. + - + - data[0] represents the maximum Wi-Fi reconnecting time. + * - 0x15 (b’010101) + - Set the Wi-Fi connection end reason. + - + - data[0] represents the Wi-Fi connection end reason, whose type shall be same with struct `wifi_err_reason_t`. + * - 0x16 (b’010110) + - Set the RSSI at Wi-Fi connection end. + - + - data[0] represents the RSSI at Wi-Fi connection end. If there is no meaningful RSSI in the connection end, this value shall be the meaningless one, which is `-128`. .. note:: diff --git a/docs/zh_CN/api-guides/blufi.rst b/docs/zh_CN/api-guides/blufi.rst index d97c3233bcee..3dbe8c39153a 100644 --- a/docs/zh_CN/api-guides/blufi.rst +++ b/docs/zh_CN/api-guides/blufi.rst @@ -321,11 +321,11 @@ ACK 帧格式(8 bit): * 0x02: SoftAP * 0x03: SoftAP & STA - data[1]:STA 设备的连接状态。0x0 表示处于连接状态,其他表示处于非连接状态; + data[1]:STA 设备的连接状态。0x0 表示处于连接状态且获得 IP 地址,0x1 表示处于非连接状态, 0x2 表示处于正在连接状态,0x3 表示处于连接状态但未获得 IP 地址。 data[2]:SoftAP 的连接状态,即表示有多少 STA 设备已经连接。 - data[3]及后面的数据是按照 SSID/BSSID 格式提供的信息。 + data[3]及后面的数据是按照 SSID/BSSID 格式提供的信息。 如果 Wi-Fi 处于正在连接状态,这里将会包含最大重连次数;如果 Wi-Fi 处于非连接状态,这里将会包含 Wi-Fi 断开连接原因和 RSSI 信息。 * - 0x10 (b’010000) - 版本 - @@ -347,10 +347,25 @@ ACK 帧格式(8 bit): * 0x06: dh param error * 0x07: read param error * 0x08: make public error + * 0x09: data format error + * 0x0a: calculate MD5 error + * 0x0b: Wi-Fi scan error * - 0x13 (b’010011) - 自定义数据 - 用户发送或者接收自定义数据。 - 数据较长时可分片发送。 + * - 0x14 (b’010100) + - 设置最大 Wi-Fi 重连次数。 + - + - data[0] 表示 Wi-Fi 最大重连次数。 + * - 0x15 (b’010101) + - 设置 Wi-Fi 连接失败原因。 + - + - data[0] 表示 Wi-Fi 连接失败原因,它的类型应该和 `wifi_err_reason_t` 一致。 + * - 0x16 (b’010110) + - 设置 Wi-Fi 连接失败的 RSSI 。 + - + - data[0] 表示在 Wi-Fi 连接失败时的 RSSI。 如果在连接结束时没有有意义的 RSSI , 这个值应该为一个无意义值 `-128`。 .. note:: diff --git a/examples/bluetooth/.build-test-rules.yml b/examples/bluetooth/.build-test-rules.yml index 217d571da14f..4b193017662e 100644 --- a/examples/bluetooth/.build-test-rules.yml +++ b/examples/bluetooth/.build-test-rules.yml @@ -38,7 +38,7 @@ examples/bluetooth/bluedroid/coex/gattc_gatts_coex: examples/bluetooth/blufi: enable: - - if: IDF_TARGET in ["esp32", "esp32c3"] + - if: IDF_TARGET in ["esp32", "esp32c2", "esp32c3", "esp32s3"] temporary: true reason: the other targets are not tested yet diff --git a/examples/bluetooth/blufi/README.md b/examples/bluetooth/blufi/README.md index 2f9a848c1108..2d90b8ad87b1 100644 --- a/examples/bluetooth/blufi/README.md +++ b/examples/bluetooth/blufi/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | -| ----------------- | ----- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | # ESP-IDF Blufi Example @@ -27,7 +27,7 @@ Blufi is completely open source, here is the download link: ### Hardware Required -* A development board with ESP32/ESP32-C3 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.) +* A development board with ESP32/ESP32-C3/ESP32-S3/ESP32-C2 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.) * A USB cable for Power supply and programming See [Development Boards](https://www.espressif.com/en/products/devkits) for more information about it.