MESH network is a distributed network topology. Its topology is shown in the figure below. A MESH network generally consists of two types of devices: terminal nodes and routing nodes:
Terminal nodes are the largest number of nodes in a MESH network and are generally deployed at the edge of the network. Terminal nodes do not participate in frequent information interaction (data forwarding) between networks and are generally designed as low-power devices responsible for data collection and data upload. Terminal nodes usually collect various types of data regularly, such as parameters such as temperature and humidity, and upload them to a certain node for summary. When the upload is completed, the terminal node can enter sleep mode and wait for the next collection and upload.
Routing nodes are generally deployed in the center of the network and are responsible for planning transmission paths. They can also serve as terminal nodes at the same time. Routing nodes need to monitor the data transmission in the network in real time, so routing nodes cannot work periodically like terminal nodes. Otherwise, the data in the network cannot be processed in time, resulting in data loss. In addition, the routing node also needs a mechanism to wake up the terminal node to ensure that data can be transmitted to the sleeping terminal node.
In a MESH network, in order to reach each device in the entire network, it is necessary to know which devices exist in the entire network, so the routing node also needs to regularly collect peripheral device information. This peripheral device information is called a routing table. The destination address and lower-level address are stored in the routing table, and the routing table is continuously updated based on the data transmitted in the network, so that the transmission path can be updated in real time.
The routing node is different from the central node in the star network. In the star network, the only central node controls the entire network. If the central node is abnormal, the entire network collapses immediately, and the data sent from the terminal node to the terminal node needs to be relayed by the central node. . Routing nodes are similar to central nodes, but multiple routing nodes can be deployed. Once a routing node crashes, device transmission will automatically switch to other nearby available routing nodes to re-establish a new network, greatly improving the stability of the network.
In addition, different transmission modes can be specified in the MESH network to transmit data to different targets:
Unicast can realize any point-to-point communication within the network. The address of the target node is determined by the starting node. During data transmission, it will automatically search for the target node and build a data transmission link, and then transmit the data level by level. to the target node.
Broadcasting can realize broadcasting within the entire network and transmit data to all devices in the network. There is no need for routing selection in the broadcast communication mode. The routing nodes at each level will broadcast the data to all surrounding devices until it is transmitted to the entire network.
Multicast (multicast) is a transmission mode that transmits data to a group (or multiple) target nodes. Devices in the same group need to be grouped in advance.
In order to realize the different transmission modes mentioned above, mechanisms such as CSMA/CD (channel sensing) and broadcast filtering are indispensable. In addition, in order to ensure the accuracy and reliability of data, verification mechanisms, encryption mechanisms, etc. are also needed.