This directory contains examples for two common networking modes of ESP-WIFI-MESH: with router or without router.
In the ESP-WIFI-MESH networking, there are two ways to generate root node:
- Automatically selected root node: automatically elected based on the signal strength of the idle node and the router.
- Fixed root node: choose a device as the root node in the code, and the remaining devices are non-root nodes
According to the two generation ways of root node, the networking mode can be simply divided into two cases: with router and without router.
When there is no router in the case, we can only choose the fixed root node mode. Refer to [No Routing Sample Program] (./no_router)
When there are routers in the case, we can choose either of the two modes for networking. In the example we use the automatically selected root node. The automatical selection of the root node involves the election process between all idle nodes based on their signal strength with the router, so only in the presence of a router, each idle node will send its MAC address and router RSSI through the Wi-Fi beacon frame. The MAC address is used to uniquely identify each node in the network, and the router RSSI is used to indicate the signal strength of the node reference router. See [routed TCP communication sample program] (./router), [routed MQTT communication sample program] (./mqtt_example)
Test the ESP-WIFI-MESH throughput, network configuration, and packet delay by inputting commands through the serial port. Refer to [Performance Test Sample Program] (./console_test)