From db1bff6ffa9257f8cb283188a59ed63ce2dbfa6a Mon Sep 17 00:00:00 2001 From: Zhang Hai Peng Date: Tue, 9 Sep 2025 11:52:26 +0800 Subject: [PATCH] feat(blufi): Update BluFi document (cherry picked from commit 3f4bedd3a5a5fc92d1c89ea03b5f23df75a8d897) Co-authored-by: zhanghaipeng --- docs/en/api-guides/ble/blufi.rst | 10 ++++++++++ docs/zh_CN/api-guides/ble/blufi.rst | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/docs/en/api-guides/ble/blufi.rst b/docs/en/api-guides/ble/blufi.rst index ce60c53f46..023d3a708f 100644 --- a/docs/en/api-guides/ble/blufi.rst +++ b/docs/en/api-guides/ble/blufi.rst @@ -481,6 +481,16 @@ The data to be encrypted and decrypted must be in the same length. The IV8 is an This function is used to compute CheckSum and return a value of CheckSum. BluFi uses the returned value to compare the CheckSum of the frame. +5. Implementing Stronger Security + +The default encryption/decryption logic in this example is intended for demonstration purposes only. + +If you require a higher level of security, it is recommended to implement your own encryption, decryption, authentication, and checksum algorithms by customizing the security callbacks in the BluFi framework. + +.. code-block:: c + + esp_err_t esp_blufi_register_callbacks(esp_blufi_callbacks_t *callbacks) + GATT Related Instructions ---------------------------- diff --git a/docs/zh_CN/api-guides/ble/blufi.rst b/docs/zh_CN/api-guides/ble/blufi.rst index 33737b6298..d747c1b4dd 100644 --- a/docs/zh_CN/api-guides/ble/blufi.rst +++ b/docs/zh_CN/api-guides/ble/blufi.rst @@ -481,6 +481,17 @@ BluFi 会在调用完 Negotiate_data_handler 后,发送 Negotiate_data_handler 该函数用来进行校验,返回值为校验的值。BluFi 会使用该函数返回值与帧的校验值进行比较。 +5. 实现更强的安全性 + +本示例中默认的加密/解密逻辑仅用于演示目的。 + +如果需要更高等级的安全性,建议通过自定义 BluFi 框架中的安全回调函数,实现您自己的加密、解密、认证以及校验算法。 + +.. code-block:: c + + esp_err_t esp_blufi_register_callbacks(esp_blufi_callbacks_t *callbacks) + + GATT 相关说明 -------------