isues with nRF24L01

Hello,

I am having very similar issues as well, and before I start a new thread I though I would ask here.
Running Arduino ver 1.8.13, RF24 lib ver 1.3.11
Tried several different nRF24L01+ modules with a couple of different nano boards.
Current setup is 2 x nano clones with the voltage reg changed to a LM1117-3.3V and the board correctly configured for this (everything running off 3v3). Extra 100uF electrolytic and 22uF ceramic caps.

Today I received 4 x nRF24L01+ chips from Element14 (genuine) and still have the same issues.

The GettingStarted example from the RF24 library works fine. Either device will act as the transmitter or receiver.
Cannot get the SimpleTX/RX sketches to work. The message is sent and received (and printed out ) by the receiver but the txNum in the message is never incremented. The radio.write returns a zero.
If I comment out the IF statement that tests rslt then the txNum in incremented and the receiver receives the correct string. The GettingStarted sketch also uses the returned value from the radio.write and it works OK.

Most of the very basic sketches which define a short payload length seam to work. Tried a few "Hello world" or ones that send a byte or two, sketches and they work OK.

I am at a loss to this and have spend about 20 hours over the last couple of weeks trying to get it to work.

Any ideas?

Thanks

@gwh74, I have suggested to the Moderator to move your question to its own Thread. Asking questions in another person's Thread is too confusing.

Have you tried the examples in my Simple nRF24L01+ Tutorial?

...R

Cannot get the SimpleTX/RX sketches to work. The message is sent and received (and printed out ) by the receiver but the txNum in the message is never incremented. The radio.write returns a zero.

can you put links to the example you are referring to? I don't see anything called SimpleTX/RX

J-M-L:
can you put links to the example you are referring to? I don't see anything called SimpleTX/RX

I believe he is referring to examples in my Simple nRF24L01+ Tutorial which was being discussed in the Thread from which this question was moved.

...R

After a few more hours today it looks like I have fixed it.

I needed to add "radio.stopListening();" after the in the "radio.openWritingPipe(slaveAddress);" in the SimpleTX example code.

Will report back after I test with a few different devices and sketches.

gwh74:
I needed to add "radio.stopListening();" after the in the "radio.openWritingPipe(slaveAddress);" in the SimpleTX example code.

I don't understand.

The examples in my Tutorial work as they are without requiring any changes to the code. That's why I wrote them the way I did.

...R

Robin2:
The examples in my Tutorial work as they are without requiring any changes to the code.

I have not tested your code but may be the library has evolved since you wrote it?

The v1.3.11 documentation states for openWritingPipe()

Only one writing pipe can be opened at once, but this function changes the address that is used to transmit (ACK payloads/packets do not apply here). Be sure to call stopListening() prior to calling this function.

This might have to do with setting the address for pipe 0 for auto-ack functionality.

I guess it can't hurt to call it, esp. if OP finds that it does not work without it.

J-M-L:
I have not tested your code but may be the library has evolved since you wrote it?

I will check later today.

I do wish people would make library changes backwards compatible or else give the revised library a different name.

...R

J-M-L:
I have not tested your code but may be the library has evolved since you wrote it?

Alas, that seems to be correct. Is it any wonder I hate the concept of libraries.

Now I have to go through all my Tutorial examples and update them.

And I also have to wonder will the new version of the library break any of the code I use for controlling my model trains.

If @TMRh20 had just given the revised library a different name so the old and the new could co-exist it would be so much simpler.

This drives me tear my hair out.

...R

backward compatibility seems out of fashion...

gwh74:
I needed to add “radio.stopListening();” after the in the “radio.openWritingPipe(slaveAddress);” in the SimpleTX example code.

It appears the RF24 library was updated without taking the trouble either to make it backwards compatible or to give the new version a different name.

I have updated my Tutorial code.

…R

Excellent. So I have not been going crazy over the last couple of weeks. It was a legit issue.
I will go back and test my other modules and hardware configurations to see if all my problems are solved

Just an update.
All 3 of my different modules have been tested. 2 of these have clone chips from different batches and one with a "real" chip. One module is even a RF-nano which extra caps added.
All work with the Simple nRF24L01+ Tutorial with my changes as per post #4 in this thread..
Thanks.

Yes, despite all the fuss and furor in various threads in the forum, the code changes required due to the library update are pretty minor. I updated an old project from v1.3.3 of the library to v1.3.11 and only had to add 2 lines of code --- one in the TX and one in the RX. A tempest in a teapot.

gfvalvo:
Yes, despite all the fuss and furor in various threads in the forum, the code changes required due to the library update are pretty minor. I updated an old project from v1.3.3 of the library to v1.3.11 and only had to add 2 lines of code --- one in the TX and one in the RX. A tempest in a teapot.

I disagree.

Figuring out the "minor" changes is probably straightforward for an experienced Arduino programmer but not for a newbie.

As the Author of Simple nRF24L01+ Tutorial I have no intention of wasting my time checking every new revision of the RF24 library to see if another change to the tutorial code is necessary.

I repeat my earlier assertion (elsewhere, if not here) that when an update makes a library incompatible with previous code the new version of the library should be given a separate name so it and the earlier version can co-exist.

...R