Hello,
I've an arduino + NRF24 connected to my PC to make a "bridge" with my nodeJS application.
On a track, i've RC cars that also have an arduino + nrf24. I need to speak with all my cars from my application (and my bridge).
Look at the attachments if i'm not clear
Today, i'm using the radiohead library (RadioHead: RH_NRF24 Class Reference), it's working, but it doesn't manage acknowledgement. So i've develop my own, but it's not a good solution.
I want to try the http://tmrh20.github.io/RF24/ but i don't know if i have to use rf24 or rf24Network library ?
Here is what i need :
All message are transmitted to the bridge. I have 4 cars for now, but i would like to have more later, if i've understand, rf24Network can only speak to 5 direct clients.
At the start, the bridge don't know which cars will be on the track. When i power on the car it send a message to the bridge, but is it possible with rf24 ? (i can send to a "public" channel ?)
I have a somewhat similar application - controlling model trains. I am using the TMRh20 RF24 library (not the network version) arranged as master and slaves. The master polls each slave in turn. There is a simplified version of my pair of programs here.
You can listen to six different addresses (5 have to share the top 4 byte) at the same time.
There is nothing like a personal address, all addresses are 'public'.
The normal RF24 should work.
If you need acknowledgement, the chips are able to provide it.
I would have one public address open in the receiver and have the cars send to that address.
As long as no other PRX acknowledges that address, this works with any number of nodes.
You don't really need to have individual addresses for the cars, if the information only flows to the receiver.
The communication is half-duplex, the receiving nodes wait as PRX for packets, the sending nodes have to be/become PTX to send.
The switching of both sides to the other role (and back) for transmitting the acknowledgement is handled by the shockburst protocol.
Any number of nodes can listen to any address. As long as maximal one node acknowledges an address at a time, there are no problems with collisions. If no node acknowledges, a send (expecting an acknowledgement) will reported as failed, regardless of how many nodes copied the message.
base station listens to well known address and acknowledges
cars listen to an individual address and acknowledge
cars pass their individual addresses to base so they can be reached
all nodes act as PRX and only switch to PTX if they have to send something
All messages will be acknowledged. It is even possible to send up to 32 bytes back (embedded in the acknowledge packet),
but this data is always a little behind (it has to be preloaded) and can only be pipe-specific (not node-specific) (1:N),
so the base station would present the same data to any node sending to its address.
Cars could attach personal data for the base, because only the base will talk to them (1:1).
Thank you very much for all your answers !
I don't know what is the system used by mySensors (https://www.mysensors.org/).
But it's time for me to test everything, and to try it !