Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh Topology #37

Closed
folksman opened this issue Jan 12, 2022 · 5 comments
Closed

Mesh Topology #37

folksman opened this issue Jan 12, 2022 · 5 comments
Labels
question Further information is requested

Comments

@folksman
Copy link

Can you may tell me morf about the Mesh Topology used in this Lib? Does the nodes (slaves) also repeat messages to other nodes or is all handled by the master? I miss a diagram for the Mesh to better understand it. I study the Network page already.

@2bndy5
Copy link
Member

2bndy5 commented Jan 12, 2022

The topology is the same for both mesh and network API. The diagrams use the octal-based logical address because when a mesh node connects to the network, the mesh master assigns a octal-based logical address to the mesh child node's ID number. This is done so both network nodes and mesh nodes can co-exist on the same network.

I guess I should add this tidbit of info to the docs' topology page. But, it is stated in the RF24Mesh.node_id attribute documentation.

@folksman
Copy link
Author

The question is follow.. if a slave node is out of range of master node, does another slave node repeat it to master or must all slave nodes direct communicate with master to working?

@2bndy5
Copy link
Member

2bndy5 commented Jan 13, 2022

Each level of the network only interacts with an adjacent level. A node on level 4 never communicates directly with the master node (which is on level 0).

I thought this info would be apparent as the topology page says:

For a message to travel from node 0o124 to node 0o3, it must be passed through any applicable network levels. So, the message flows 0o124 -> 0o24 -> 0o4 -> 0o0 -> 0o3.

If a slave node on level 1 (that is a direct child of master node) becomes out of range from the master node (level 0), then it is considered disconnected and needs to call renew_address() to reconnect to the mesh network from it's new location.

if not nrf.check_connection():
    nrf.renew_address()

Remember that each node in the network can only have a maximum of 5 child nodes. I tried to use the first diagram in the topology page to show this visually.

@2bndy5 2bndy5 added the question Further information is requested label Jan 13, 2022
@folksman
Copy link
Author

folksman commented Jan 15, 2022

Ok understand. But as i read on topology (781 nodes) only possible on network not on mesh (as i read there must be a id 0-127 or so..), correct?

@2bndy5
Copy link
Member

2bndy5 commented Jan 15, 2022

The node ID is an unsigned byte, so 0-255.

There can be a maximum of 255 mesh nodes in a network. But there can also be non-mesh nodes on the same network. So a maximum of 781 (including up to 255 mesh nodes and the master node).

You can also assign a node ID number to a non-mesh network node by calling set_address() on the master node.

@2bndy5 2bndy5 closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants