esp_mesh: Document that hard-coded non-root nodes do not need TCP/IP

This commit is contained in:
David Cermak
2022-02-22 08:48:43 +01:00
parent 13ffddc0f3
commit 7db0f0feb1
2 changed files with 3 additions and 2 deletions

View File

@@ -60,7 +60,8 @@
* *
* In present implementation, applications are able to access mesh stack directly without having to go through LwIP stack. * In present implementation, applications are able to access mesh stack directly without having to go through LwIP stack.
* Applications use esp_mesh_send() and esp_mesh_recv() to send and receive messages over the mesh network. * Applications use esp_mesh_send() and esp_mesh_recv() to send and receive messages over the mesh network.
* In mesh stack design, normal devices don't require LwIP stack. * In mesh stack design, normal devices don't require LwIP stack, but if any of these devices could be promoted to a root node in runtime,
* (due to automatic or manual topology reconfiguration) the TCP/IP stack should be initialized (for the root code to access external IP network)
* *
* Over the mesh network, only the root is able to access external IP network. * Over the mesh network, only the root is able to access external IP network.
* In application mesh event handler, once a device becomes a root, start DHCP client immediately whether DHCP is chosen. * In application mesh event handler, once a device becomes a root, start DHCP client immediately whether DHCP is chosen.

View File

@@ -65,7 +65,7 @@ LwIP & ESP-WIFI-MESH
The application can access the ESP-WIFI-MESH stack directly without having to go through the LwIP stack. The LwIP stack is only required by the root node to transmit/receive data to/from an external IP network. However, since every node can potentially become the root node (due to automatic root node selection), each node must still initialize the LwIP stack. The application can access the ESP-WIFI-MESH stack directly without having to go through the LwIP stack. The LwIP stack is only required by the root node to transmit/receive data to/from an external IP network. However, since every node can potentially become the root node (due to automatic root node selection), each node must still initialize the LwIP stack.
**Each node is required to initialize LwIP by calling** :cpp:func:`esp_netif_init`. In order to prevent non-root node access to LwIP, the application should not create or register any network interfaces using esp_netif APIs. **Each node that could become root is required to initialize LwIP by calling** :cpp:func:`esp_netif_init`. In order to prevent non-root node access to LwIP, the application should not create or register any network interfaces using esp_netif APIs.
ESP-WIFI-MESH requires a root node to be connected with a router. Therefore, in the event that a node becomes the root, **the corresponding handler must start the DHCP client service and immediately obtain an IP address**. Doing so will allow other nodes to begin transmitting/receiving packets to/from the external IP network. However, this step is unnecessary if static IP settings are used. ESP-WIFI-MESH requires a root node to be connected with a router. Therefore, in the event that a node becomes the root, **the corresponding handler must start the DHCP client service and immediately obtain an IP address**. Doing so will allow other nodes to begin transmitting/receiving packets to/from the external IP network. However, this step is unnecessary if static IP settings are used.