From 2136c072b5faa8b272f560a704fdf45c4bf0be51 Mon Sep 17 00:00:00 2001 From: Linda Date: Thu, 18 Jul 2024 17:39:31 +0800 Subject: [PATCH] docs: update application examples for esp_now.rst and esp-wifi-mesh.rst --- docs/en/api-reference/network/esp-wifi-mesh.rst | 7 +++---- docs/en/api-reference/network/esp_now.rst | 4 +--- docs/zh_CN/api-reference/network/esp-wifi-mesh.rst | 9 ++++----- docs/zh_CN/api-reference/network/esp_now.rst | 4 +--- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/docs/en/api-reference/network/esp-wifi-mesh.rst b/docs/en/api-reference/network/esp-wifi-mesh.rst index 79fdb355ac..dd941a8714 100644 --- a/docs/en/api-reference/network/esp-wifi-mesh.rst +++ b/docs/en/api-reference/network/esp-wifi-mesh.rst @@ -302,12 +302,11 @@ Therefore, application calls to Wi-Fi APIs should be placed in between calls of Application Examples -------------------- -ESP-IDF contains these ESP-WIFI-MESH example projects: +- :example:`mesh/internal_communication` demonstrates how to use the mesh APIs to establish a mesh network, configure it, start it, handle events, and send and receive messages across the network. -:example:`The Internal Communication Example ` demonstrates how to set up a ESP-WIFI-MESH network and have the root node send a data packet to every node within the network. - -:example:`The Manual Networking Example ` demonstrates how to use ESP-WIFI-MESH without the self-organizing features. This example shows how to program a node to manually scan for a list of potential parent nodes and select a parent node based on custom criteria. +- :example:`mesh/ip_internal_network` demonstrates how to use mesh to create an IP capable sub-network where all nodes publish their IP and internal mesh layer to an MQTT broker while using internal communication. +- :example:`mesh/manual_networking` demonstrates how to manually configure a mesh network using ESP-MESH, including scanning for parent candidates, selecting a suitable parent for a node, and configuring network settings. .. ------------------------- ESP-WIFI-MESH API Reference --------------------------- diff --git a/docs/en/api-reference/network/esp_now.rst b/docs/en/api-reference/network/esp_now.rst index 2e6974c88c..37c156591b 100644 --- a/docs/en/api-reference/network/esp_now.rst +++ b/docs/en/api-reference/network/esp_now.rst @@ -123,9 +123,7 @@ If Power-saving is needed for ESP-NOW, call :cpp:func:`esp_wifi_connectionless_m Application Examples -------------------- -* Example of sending and receiving ESP-NOW data between two devices: :example:`wifi/espnow`. - -* For more application examples of how to use ESP-NOW, please visit `ESP-NOW `_ repository. +- :example:`wifi/espnow` demonstrates how to use the ESPNOW feature of {IDF_TARGET_NAME}'s Wi-Fi, including starting Wi-Fi, initializing ESP-NOW, registering ESP-NOW sending or receiving callback function, adding ESP-NOW peer information, and sending and receiving ESP-NOW data between two devices. API Reference ------------- diff --git a/docs/zh_CN/api-reference/network/esp-wifi-mesh.rst b/docs/zh_CN/api-reference/network/esp-wifi-mesh.rst index 8e8fda62b9..dfadbaf2fc 100644 --- a/docs/zh_CN/api-reference/network/esp-wifi-mesh.rst +++ b/docs/zh_CN/api-reference/network/esp-wifi-mesh.rst @@ -299,15 +299,14 @@ ESP-WIFI-MESH 将尝试在启用自组网时保持节点的当前 Wi-Fi 状态 .. _mesh-application-examples: -应用实例 +应用示例 -------------------- -ESP-IDF 包含以下 ESP-WIFI-MESH 示例项目: +- :example:`mesh/internal_communication` 展示了如何使用 mesh API 建立 mesh 网络、进行配置、启动、处理事件,并在网络中发送和接收消息。 -:example:`内部通信示例 ` 展示了如何搭建 ESP-WIFI-MESH 网络,并让根节点向网络中的每个节点发送数据包。 - -:example:`手动连网示例 ` 展示了如何在禁用自组网功能的情况下使用 ESP-WIFI-MESH。此示例展示了如何对节点进行编程,以手动扫描潜在父节点的列表,并根据自定义标准选择父节点。 +- :example:`mesh/ip_internal_network` 展示了如何使用 mesh 创建一个支持 IP 的子网络,在这个子网络中,所有节点都会将它们的 IP 和内部 mesh 层信息发布到 MQTT broker,同时进行内部通信。 +- :example:`mesh/manual_networking` 演示了如何使用 ESP-MESH 手动配置 mesh 网络,包括扫描父节点候选项、为节点选择合适的父节点,以及配置网络设置。 .. -------------------------ESP-WIFI-MESH API 参考 --------------------------- diff --git a/docs/zh_CN/api-reference/network/esp_now.rst b/docs/zh_CN/api-reference/network/esp_now.rst index 560a7ffda7..d019cff5cb 100644 --- a/docs/zh_CN/api-reference/network/esp_now.rst +++ b/docs/zh_CN/api-reference/network/esp_now.rst @@ -123,9 +123,7 @@ ESP-NOW 采用 CCMP 方法保护供应商特定动作帧的安全,具体可参 应用示例 ---------- -* 如何在设备间传输 ESP-NOW 数据::example:`wifi/espnow`。 - -* 了解更多 ESP-NOW 的应用示例,请参考 `README.md 文件 `_。 +- :example:`wifi/espnow` 演示了如何使用 {IDF_TARGET_NAME} 的 Wi-Fi 的 ESPNOW 功能,包括启动 Wi-Fi、初始化 ESP-NOW、注册 ESP-NOW 发送或接收回调函数、添加 ESP-NOW 对等信息,以及在两台设备之间发送和接收 ESP-NOW 数据。 API 参考 -------------