nRF24 / RF24Mesh

OSI Layer 7 Mesh Networking for RF24Network & nrf24L01+ & nrf52x devices
http://nrf24.github.io/RF24Mesh
GNU General Public License v2.0
421 stars 154 forks source link

Using Mesh and Broadcast (or Multicast)? #225

Closed mchacher closed 2 months ago

mchacher commented 11 months ago

Hi, I am about to use this great library in a mesh context. I would have 2 questions:

2bndy5 commented 11 months ago
  1. The master node assigns the connecting node a network (logical) address. The network address informs the other nodes how the newly connected mesh node fits within the network topology. See our documented Mesh connecting process for more detail.
  2. Using network.multicast() seems to be what you're asking about, unless I misunderstood the question. That doc link also references other multicast-related functionality (in the "see also" section).

    Can you provide a simple example?

    Please read the docs as this functionality is pretty straight forward once you understand the network topology.

Both of your questions seem related to the network topology. The pyrf24/topology page has some good basic information, but it uses the python representation of octal numbers (0o0) instead of the C++ representation of octal numbers (00).

unique number ranging from 1 to 255

Please keep in mind that a network can only have 256 mesh nodes (including master node). Using a mix of statically assigned nodes (RF24Network) with mesh nodes is allowed. See mesh.setAddress() about giving static RF24Network nodes a unique RF24Mesh ID.

TMRh20 commented 11 months ago

Just to add to what Brendan posted, multicast doesn’t really work with RF24Mesh since you don’t want to enable multicast forwarding or enable all nodes to use the same multicast level. This is because the mesh uses multicast to find other devices when connecting.