maniacbug / RF24Network

Network Layer for nRF24L01(+) Radios
http://maniacbug.github.com/RF24Network
272 stars 129 forks source link

full duplex communications using RF24Network #12

Open cambazz opened 10 years ago

cambazz commented 10 years ago

Hello,

I have been trying to use this library for full duplex communications.

One one side I have:

while(network.avail) { // read data } if(//each 10ms) { // send command }

On the other side I have

while(network.avail) { // read data mesg = true; }

if(mesg) { // write back to other_node }

so one side (ground) transmits commands each 10ms, looking for data each loop, and the other side, reads data, and if it gets data, it will just respond.

It seems that there are some sync issues with this scheme. if i just transmit on one side, and read on other side, everything is fine, but once we start doing read and writes, it gets out of sync, and sending packets start failing on both sides.

What is the proper way to enable really fast full duplex communications between two nrf24l01s?

Best Regards,

ve2yag commented 10 years ago

If this can help, I have a 01 repeating node with two child: 021 and 011. 021 have weak signal and 011 is powered off. I scan my sensor network sending packet to all node in sequence, 01, 011, 021 and back to 01.

When I set timing to 100ms between each packet, 01 stop to anwser and network seem dead. When I use 500ms between packet, all is OK.

I think the 01 node is busy trying to reach 011 and 021 node and stop receiving base node and never answer to his own packet. I just finding this bug few minute ago in my home automation network, I think about this tomorrow...