I've got a bunch of Arduinos connected together using the RF24 library (http://maniacbug.github.com/RF24/index.html) and nRF24L01+ transceivers.

It's basically working, but I have a strange problem:

Between some pairs of Arduinos, when I send a message the message arrives, but the radio.write() method returns a false (failure) status code. I think this means that the outgoing message was received, but the sender did not receive an ack from the receiver.

The problem is quite widespread; usually, write() succeeds but returns false. Occasionally, when I start up two Arduinos I don't see this problem; the write() returns true (success) every time for hours on end. And then for no apparent reason, it will start returning false.

When problem is occurring, I will occasionally (perhaps 1 in 100 messages) see a successful ack.

I don't think it is a hardware problem - the problem affects all my Arduinos and they are all capable of sending and receiving.

I don't think it is a signal strength problem - I see the problem when the radios are two feet apart or twenty feet apart.

I see the problem with just two Arduinos running - I don't think it is a collision/overlap problem.

I have a suspicion it may be due to internal behaviour of the RF24 library. Sometimes I have an Arduino that is acting as an intermediary between two other Arduinos, and it will consistently fail to send messages that are initiated locally but it will successfully send a message that is being forwarded (i.e. radio.read() immediately followed by radio.write()) and then subsequent write()s will fail.

I have briefly turned on debug within the RF24 library, got a welter of information that I didn't understand and quickly turned it off again.

Yes, when I use that address it seems to be 100% reliable. I'm intrigued to know what difference that made, perhaps it upset the radio's framing algorithm? Anyway it seems to have solved the problem which is all that matters.

Thanks for the help.

I don't suppose it matters now, but in case you're interested the version of RF24 I'm running comes from maniacbug-RF24-d437163.zip.

I only provide help via the forum - please do not contact me for private consultancy.

Yes, when I use that address it seems to be 100% reliable. I'm intrigued to know what difference that made, perhaps it upset the radio's framing algorithm? Anyway it seems to have solved the problem which is all that matters.

Thanks for the help.

Cool, glad it's working. I was always wondering if that was superstition or really needed, but I never bothered to test it. Until now!

That seems like an unlikely thing to want to do. What is your underlying objective? I had a possibly similar requirement which was to enable each RF24 device to find an address which was unique within the set of devices near it. In my case I did that by setting up a self-organising tree of devices, where each device tried to identify the devices around it and find which one had the best route to the root of the tree, and arrange for that parent to allocate it a unique address. The idea was that this functions as a loose mesh network that would each device to act as a range extender for the root node. My approach using the ack payloads as a return channel to avoid each device from having to keep pipes open for other devices trying to connect to it.

I only provide help via the forum - please do not contact me for private consultancy.

Really glad I found this topic! I have a question about the library as well, as well as about your code.

I have tried the GettingStarted example, which comes with the RF24 library. Both my NRF24L01+ modules are working and the ping example works.

Then I uploaded your code to my arduinos, and get no response whatsoever. I used the latter address (0xABCDABCD71LL - btw what does 'LL' mean ? ). Your code doesn't seem to differ from the example, so I don't understand. I added the radio.printDetails for debugging. Results below.

Sender:

Receiver:

(For some reason I can't copy the text from the serial window to anywhere else; can the printf statement make weird characters which prevent copying text?)

So my question is: why do I not get this code to work, while the original example is working?

To copy code from the serial monitor, put the cursor over the text you want to copy and click the left button to set focus on that window, press ctrl+A to select all the text and ctrl+C to copy it all to the clipboard. To post it into a post, click the right mouse button and select 'paste' from the context menu. I recommend pasting the output inside code tags to ensure the forum software doesn't mangle it.

If your sketch doesn't behave the same as the example then there is some difference between them. I suggest comparing the two files to find what the difference is.

I only provide help via the forum - please do not contact me for private consultancy.

and that is either all there is in the clipboard, or for some reason it stops pasting after that point. Mind: after RC_ADDR_PO-1 it pastes a TAB, and then it ends.

I was comparing the sketch you posted above to the GettingStarted sketch which is provided with the library you use. I could not find a functional difference. My guess is the above sketches are working for you, and I was wondering whether you made certain choices in programming that sketch which differ from the examples provided.

Does all the text highlight when you press ctrl-A? Note that you have to put the focus in the text area by clicking the mouse in it, first. You should also be able to drag-select the text using the mouse. With the text selected, ctrl+c should copy it to the clip-board.

I only provide help via the forum - please do not contact me for private consultancy.