NRF24 Basic problem

Please has anyone got an easy or simple way to test if the NRF24L01 s are working i.e. simple code including the required IDE version & NRF24 library versions.
I have tried many of the code examples given on the IDE library page and also those listed by other users but I can get nothing to work, or any indication that there is any TX or RX taking place at all. Is there a way to test a single NRF24 ( the idea being to eliminate as many error sources as possible) ? I have tried the wi-fi scanner example with no result. All suggestions given to other forum users with similar problem of getting these units to work have been tried, including new units from a different source.
I have tried some various IDE version & NRF24 library versions and believe this may be the problem.

I used Robin2's simple rf24 tutorial to get my radios to work. If you carefully read and follow the tutorial you should have success. if you still have trouble run the CheckConnection.ino (look in reply #30) to verify wiring between the radio module and its processor (Arduino).
If you cannot get them to work, you are doing something wrong or the modules are bad.

The rf24 radios are not WiFi and will not show in a WiFi scanner.

There is no way to test a single radio that I know of and I have been using them for at least 5 years. Get 2 Arduinos and 2 rf24 modules.

Some other suggestions:
Make sure the rf24 power supply can provide enough current. This is especially true for the high power (ecternal antenna) modules. I use homemade adapters like these. They are powered by 5V and have a 3.3V regulator on the board.

If using the high powered radios make sure to separate them by a few meters. They may not work too close together.

Reset the radios by cycling power to them after uploading new code. I have found that to help. They do not reset with the Arduino.

Switch to 1MB data rate to catch the not so cloned clones.

 radio.setDataRate( RF24_1MBPS );

@Robin2's sketches works on legit NRF24L01+ chips,
if the connections and power supply are correct.

To test (and develop for) NRF24L01+s, I like to use

Worth pointing out that the basic examples in the RF24 and RadioHead libraries do work as well.

And as @groundFungus has said;

"If you cannot get them to work, you are doing something wrong or the modules are bad"

Do not assume that the reason why modules are not working for you is that the libraries or IDE somehow have errors in them.

1 Like

You can do simple register read\write tests, but that will not prove the RF side is working.

However if you make the NRF24 transmit continuously you can see the RF output on a spectrum analyser .......................


They sure do.

Or the tutorials (at least in the case of Robin2's tutorial).

1 Like

Have you tried Dave Parsons NRFLite library? It is easier to set up and has some simple examples to test Tx and Rx. Your channel selection could be causing issues, you can use the NRFLite library to scan channels. There are a number of things that can cause these modules not to work, you really have to work through and eliminate them one at a time.

Thanks for your reply srnet. I did not mean to infer that the libraries or IDE had errors, but I have read some posts which said that they found certain NRF library versions did not work with particular IDE versions.

This can be confusing. Robin2's tutorial states this:

For most of the simple tutorials, this is irrelevant. With some more advanced tutorials with a payload in the 'ack' return, there are some differences between library versions.

Can anyone tell me how I find Reply#30 please.

Well, your post was number #11 in this thread:

Incidentally, the post you want is #31 due to a renumbering of the posts from the old forum. There the first post was #0. Here it is #1.

Got it thanks. I see how it works now.

Hi middles.
Thanks for your reply. I am currently using IDE ver 1.8.15. Should the latest version of the NRFLite library work with this do you know?

I am using 1.8.13 and it's fine, should be okay with 1.8.15. What platform are you using, all the problems I had were mostly compatibility issues, NRF24 modules can be frustrating to get working. I have been around the loops several times so I know what works and what doesn't. If you are still having problems come back and I see if I can help.

Just a thought - you have crossed over the reading and writing pipes? So many times people copy code and don't correct it!!

Thanks for all of your replies so far.

As suggested, I am now using the Basic_RX and basic_TX examples in the NRFLite library to try to test my NRF24L01's.

Win8.1 laptop one side & Win10 the other, both using IDE ver 1.8.15 with NRFLite version 3.0.1

On the TX side the serial monitor reports " failure" - but if I alter the TX sketch so that it does not request an ack from receiver, it reports " success".

The RX side reports "cannot communicate with radio" so obviously has a problem which I cannot yet find. Same result if I swap the NRF's around.

The altered line in TX where I added the no ACK part (as given as an option in the Basic_TX example code) is:

</ if (_radio.send(DESTINATION_RADIO_ID, &_radioData, sizeof(_radioData), NRFLite::NO_ACK)) / >

My question is this, does success of the above line of code indicate that the TX unit is actually transmitting?

No, you need to receive something to be sure of that.

It's probably better not to alter the test code as it creates just another variable. If the library cannot communicate with the NRF then you probably have a hardware issue, assuming the SPI library is loading correctly. You can test the functioning of each individual NRF with the scanner sketch, that reads channel activity. It does not check transmission which is usually where the problems start because of the additional stress on power supplies.

Thanks middles.
I will try the ChannelScanner in NRFLite. The author gives examples of radio.init lines of code to assign different channels. He doesn't indicate where but I assume the radio.init line would go just before void setup? i'm not very good at code yet.