Espressif ESP32-S2 Programming Manual page 1333

Table of Contents

Advertisement

Chapter 4. API Guides
of target nodes, or specifying a preconfigured group of nodes. Both methods of multicasting are called via
esp_mesh_send().
To multicast by specifying a list of target nodes, users must first set the ESP-WIFI-MESH packet's destina-
tion address to the Multicast-Group Address (01:00:5E:xx:xx:xx). This signifies that the ESP-WIFI-
MESH packet is a multicast packet with a group of addresses, and that the address should be obtained from the
header options. Users must then list the MAC addresses of the target nodes as options (see
mesh_opt_t
and
MESH_OPT_SEND_GROUP). This method of multicasting requires no prior setup but can incur a large amount of
overhead data as each target node's MAC address must be listed in the options field of the header.
Multicasting by group allows a ESP-WIFI-MESH packet to be transmitted to a preconfigured group of nodes. Each
grouping is identified by a unique ID, and a node can be placed into a group via esp_mesh_set_group_id().
Multicasting to a group involves setting the destination address of the ESP-WIFI-MESH packet to the target group ID.
Furthermore, the
MESH_DATA_GROUP
flag must set. Using groups to multicast incurs less overhead, but requires
nodes to previously added into groups.
Note: During a multicast, all nodes within the network still receive the ESP-WIFI-MESH packet on the MAC layer.
However, nodes not included in the MAC address list or the target group will simply filter out the packet.
Broadcasting
Broadcasting is a feature that allows a single ESP-WIFI-MESH packet to be transmitted simultaneously to all nodes
within the network. Each node essentially forwards a broadcast packet to all of its upstream and downstream con-
nections such that the packet propagates throughout the network as quickly as possible. However, ESP-WIFI-MESH
utilizes the following methods to avoid wasting bandwidth during a broadcast.
1. When an intermediate parent node receives a broadcast packet from its parent, it will forward the packet to each
of its child nodes whilst storing a copy of the packet for itself.
2. When an intermediate parent node is the source node of the broadcast, it will transmit the broadcast packet
upstream to is parent node and downstream to each of its child nodes.
3. When an intermediate parent node receives a broadcast packet from one of its child nodes, it will forward the
packet to its parent node and each of its remaining child nodes whilst storing a copy of the packet for itself.
4. When a leaf node is the source node of a broadcast, it will directly transmit the packet to its parent node.
5. When the root node is the source node of a broadcast, the root node will transmit the packet to all of its child
nodes.
6. When the root node receives a broadcast packet from one of its child nodes, it will forward the packet to each of
its remaining child nodes whilst storing a copy of the packet for itself.
7. When a node receives a broadcast packet with a source address matching its own MAC address, the node will
discard the broadcast packet.
8. When an intermediate parent node receives a broadcast packet from its parent node which was originally transmitted
from one of its child nodes, it will discard the broadcast packet
Upstream Flow Control
ESP-WIFI-MESH relies on parent nodes to control the upstream data flow of their immediate child nodes. To prevent
a parent node's message buffer from overflowing due to an overload of upstream transmissions, a parent node will
allocate a quota for upstream transmissions known as a receiving window for each of its child nodes. Each child
node must apply for a receiving window before it is permitted to transmit upstream. The size of a receiving
window can be dynamically adjusted. An upstream transmission from a child node to the parent node consists of the
following steps:
1. Before each transmission, the child node sends a window request to its parent node. The window request consists
of a sequence number which corresponds to the child node's data packet that is pending transmission.
Espressif Systems
1322
Release v4.4
Submit Document Feedback

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF