Mesh Loop Prevention (AEGHB-952)
Checklist
- [X] Checked the issue tracker for similar issues to ensure this is not a duplicate.
- [X] Provided a clear description of your suggestion.
- [X] Included any relevant context or examples.
Issue or Suggestion Description
On Loop Prevention, Detection, and Handling section of the User Guide, it is mentioned "ESP-MESH-LITE has some internal loop detection mechanism to prevent nodes from establishing upstream connections and forming loops with nodes in its subnetwork unexpectedly."
The term "some" in the description gives the impression that the mechanism may not cover all corner cases. Since my mesh system requires high reliability, I have two ideas to ensure loop prevention without patching the library internally:
Idea 1: Fixed Mesh Layer Assignment Once all nodes are deployed, I plan to reconfigure the allowed level on each node so that every node remains on a fixed mesh layer.
-
Clarification Needed: If I call
esp_mesh_lite_set_allowed_level(3)on a specific node, does it mean:- This node is strictly restricted to layer 3 only?
- Or can it operate on any layer equal to or lower than 3 (e.g., layers 1, 2, or 3)?
Idea 2: Staggered AP Activation I intend to designate a user-specified root node and ensure that no node enables its Access Point (AP) until it has obtained an IP address from its parent node. This approach would enable APs to activate in a concentric order radiating outward from the root node, effectively eliminating the possibility of circular connections.
- Clarification Needed: How can I configure a node to delay enabling its AP until it has established a connection with its parent node?
Your guidance on these questions will be invaluable for ensuring the robustness and reliability of my mesh system.
Thank you!
(如果您偏好使用中文回覆也行!)
-
esp_mesh_lite_set_allowed_level(3)是指设备将只能在 3 层级运行,其只能寻找一个 level 2 的一个设备作为父节点,如果没有合适的 level 2 的设备,其将作为游离节点。所以您的做法有一个弊端,在 Mesh-Lite 拓扑稳定之后,给所有设备设置了固定的层级,比如一旦一个 level 5 设备的父节点掉电了,此时拓扑中又没有任何别的存在 level 4 的设备,那么这个 level 5 的设备将一直处于一个游离节点的状态。 - 通过 esp_wifi_set_mode 可以做到。APSTA 将会打开 AP,STA mode 将会关闭 AP。