... | ... | @@ -6,15 +6,17 @@ PainlessMesh creates a mesh network using a star topology, without any circular |
|
|
PainlessMesh does not use the native mesh functionality of the ESP8266. (See [here](https://github.com/espressif/ESP8266_MESH_DEMO).) Instead it uses the regular wifi accesspoint (AP) and client, to create a self organizing and repairing network where all nodes are connected.
|
|
|
|
|
|
## Network layout
|
|
|
Every node acts as an accesspoint (AP) for other nodes to connect to and as a client to connect to a maximum of 1 AP of another node.
|
|
|
Every node acts as an accesspoint (AP) for other nodes to connect to and as a client to connect to a maximum of 1 AP of another node. There is a limit of 4 station nodes per AP. This limit is fixed by ESP8266 SDK.
|
|
|
|
|
|
Each node which is not already/anymore connected to an AP, scans for other AP's from other nodes periodically.
|
|
|
|
|
|
From all AP's found while scanning, which are not already present in the list of connections or sub-connections, the AP with the strongest signal is connected to.
|
|
|
From all AP's found while scanning, which are not already present in the list of connections or sub-connections, the AP with the strongest signal is connected to. This avoid the creation of nerwork loops. There is a single route between each pair of nodes of the mesh.
|
|
|
|
|
|
![sample](/uploads/eb0fa85b72a506dc2b49d5d7711df6cb/sample.png)
|
|
|
The direction of the arrow represents the direction in which the connection is made.
|
|
|
|
|
|
Although comunication from a note to its connected AP is made over a TCP/IP conection, mech based messages do not flow over IP. They are text messages in JSON format. Each node is responsible to route each message to the right path
|
|
|
|
|
|
## Node Sync
|
|
|
A list of connections of a node is stored and for each connection a list of sub-connections is also stored. (Note: the list of connections contains the connections which are received by the node, but also the connection (max 1) that are initiated by the node...)
|
|
|
|
... | ... | |