I am trying to make a mesh network of three nrf24l01 nodes in which all three are transceivers, such that all three are in a line. The modification I want to make is that if two end nodes are not able to communicate with each other as they fall short of range the signal must be sent via the middle node. How should I approach?
To be honest, I still have to receive my RF's... But I have a similar problem, meaning I also need to have them all to both receive and transmit.
I thought it was not possible, since in a 6-1 network, one is receiver, 6 are transmitting. With auto-ack messages can be returned.
Depending on the amount of messages being sent and latency you can let them talk when needed and hope there is not too much sending simultaneously (causing resends).
One solution you could use, is to put in the message a receiver ID. Suppose the 'geographic location' of your objects are
A <----> B <----> C
Assume A wants to send to C, but it will not be received by C, C does not auto-ack, and A knows this. Know A can send the message to B, which can auto-ack, and B has to send it to C. Possibly the original source (A) has to be added to the message as well, if this is important for C to know.
Update: (in steps)
Suppose A wants to send a message m to C
- A sends message m to C
- C does not receive it, thus is does not send an ACK-message back to A
- A gets a timeout
- A knows that message m has not been sent to C (so it is out of range)
- A sends the message m to B (adding 'A' as sender of the message if not already done)
- B receives message m
- B sends an ACK back to A
- A knows message m has been sent to B
- B sends message m (with A as sender) to C
- C receives the package
- C sends back a message to B
- B needs to send a message to A that m has been sent successfully
Some generic remarks: - This scheme is maybe not full-proof or can be optimized (like that A knows from now on it needs to send to B first to reach C). - Also both B and C can be out of range, you want to resend it (later)?