RF24Mesh nRF24L01 very long range

Hello,

When I use RF24 librairy, I use to have the better long range

radio.setPALevel(RF24_PA_MAX); radio.setDataRate(RF24_250KBPS); radio.setRetries(15,15);

I did not succeed to do the same thong with RF24Mesh Library.

Any ideas ?

Michel

Are those the settings recommended for the Mesh library?

What distances are you talking about?

...R

About 500-700m between two nodes. In fact, I test these modules and I whant to know, to test the range in différents conditions. And I whant to learn all the possibilities.

For your question : Are those the settings recommended for the Mesh library? No, radio.setPALevel(RF24_PA_MAX) is for the RF24 Library and I suppose we have the same possibilities with RF24Mesh Library but how ?.

I think you need to try the examples provided by TMRh20.

I have no personal experience of either the Network or Mesh extensions but from what I have read the settings for re-tries can be important.

As I understand it the Network extension adds a layer on top of the ordinary RF24 library and in so doing probably reduces potential overall throughput and the Mesh extension adds another layer on top of the Network. Presumably if the whole thing is not planned carefully all the radios will interfere with each other.

Am I correct to assume that you already have reliable communication at 500m between a pair of nRF24s using the basic RF24 library? Do you know how many retries are required as part of that? Maybe the link is close to its limit?

...R

Using the basic library, today I did a test. I reached a range of 1.3km !!

I use this sort of module :NRF24L01+ with antenna

http://www.ebay.fr/itm/NRF24L01-PA-LNA-SMA-Antenna-Wireless-Transceiver-communication-module-2-4G-NR-/252608965072?hash=item3ad0aae9d0:g:eOIAAOSwtLxYE~z-

That's good to know.

Can you give more details of how you did the test. There are often queries here about the range of those devices.

And, by the way, EBay links are not very useful because they go out of date when all the product has been sold.

...R

In fact I wanted to put the picture et not the link but I dit not know how.
Now I do :

For the test itself :
I change the basic code to have a blink led which stop to blink when the message is not received.
I put one nRF24L01 on my windows and the other in my car.
I give you the code in attachement, but it is not nice code!, Just for test and I am a beginner in C. If someone whant, I can do it better.
The code is for DHT temperature device but it’s ok if you don’t have one.

DHT22-NRF24L01-struct.ino (3.08 KB)

rfsend-led-struc.ino (3.01 KB)

mic78000: I put one nRF24L01 on my windows and the other in my car.

Out of curiosity, how high is the window and were there any obstructions between your car and the device in the window?

And whereabouts in your car was that device?

...R

Can you post the code you used for the mesh test?

Have a look at the Class Documentation for RF24Mesh, specifically at mesh.begin().

Robin2: Out of curiosity, how high is the window and were there any obstructions between your car and the device in the window?

And whereabouts in your car was that device?

...R

The window is about 4m from the ground. No obstruction between the window and my car. To reach 1.3km, I need to put the NRF24L01+ outside the car. Most of the time for lower Range, the antenna was in the car, but my car is a 2cv which is a very open car. It is also a very old car :-)

SamIAm93:
Can you post the code you used for the mesh test?

Have a look at the Class Documentation for RF24Mesh, specifically at mesh.begin().

mesh.begin :
begin (uint8_t channel=MESH_DEFAULT_CHANNEL, rf24_datarate_e data_rate=RF24_1MBPS, uint32_t timeout=MESH_RENEWAL_TIMEOUT)

I see we can modify the rate but it is already 1MBPS
we can modify timeout (not so much influence ?)
But we can’t modify power (amplifier) (equivalent to radio.setPALevel(RF24_PA_MAX) I think this has a big influence for the range.

In attachements the “Mesh code”

RF24Mesh_Example.ino (2.12 KB)

RF24Mesh_Example_Master.ino (2.37 KB)

mic78000: But we can't modify power (amplifier)

Because something is not in the list of BEGIN items I would not assume it is forbidden.

And AFAIK max power is the default setting.

You have not actually given us any details of the tests you did with the MESH library. How many nRF24s were involved? Did any of them work at any distance? etc etc

And did you try the simpler Network library?

but my car is a 2cv

Nice

...R

After initializing the mesh

begin (MESH_DEFAULT_CHANNEL,RF24_250KBPS,MESH_RENEWAL_TIMEOUT);

(The lower the frequency, the better range you'll get.)

you can still call radio.setPALevel()

Robin2: Because something is not in the list of BEGIN items I would not assume it is forbidden.

And AFAIK max power is the default setting.

You have not actually given us any details of the tests you did with the MESH library. How many nRF24s were involved? Did any of them work at any distance? etc etc

And did you try the simpler Network library? Nice

...R

No, I did not test Network Library

My range Test with Mesh Library was only with a master and a child (so with only 2 RLF24N01). I did another try of the Mesh (to try only the Mesh and not the range) with one master and 4 child. My first resukt : it s ok but sometime when I move one NrlF24L01 I need to reset this device and sometime, it's ok, the Mesh manage fine. I have to do others try...

I succed but not still tested the range :

We can use radio.setPALevel but we need to put it after and not before (of course !!!) the mesh.begin.. :-) But I test the default-value of PA_LEVEL it's already to MAX. So already for max range.

I will test with this code : with RF24_250KBPS for best range and a shorter TimeOut 15000 rather 60000, but I am not sure to understand what it does. I thing that more this timeout is short more often the mesh is rebuit ? (not sure at all !)

Serial.println(F("Connecting to the mesh...")); // default : mesh.begin(MESH_DEFAULT_CHANNEL, RF24_250KBPS,MESH_RENEWAL_TIMEOUT); mesh.begin(MESH_DEFAULT_CHANNEL, RF24_250KBPS,15000); // a test with other timeout //Parameters of begin // channel The radio channel (1-127) default:97 // data_rate The data rate (RF24_250KBPS,RF24_1MBPS,RF24_2MBPS) default:RF24_1MBPS // timeout How long to attempt address renewal in milliseconds default:60000

Serial.println (F ("PA Level : ")); Serial.println (radio.getPALevel() ); / to test default value radio.setPALevel(RF24_PA_MAX); // already default value. Not useful

mic78000:
and a shorter TimeOut 15000 rather 60000, but I am not sure to understand what it does. I thing that more this timeout is short more often the mesh is rebuit ? (not sure at all !)

I don’t know the Mesh system but if your supposition is correct shortening the timeOut could worsen the situation by increasing the amount of wireless traffic and collisions. Remember that all the devices in the Mesh use the same channel and only one may talk at any one time.

I suspect the Network system is more predictable and it might be wise to get things working at that level first and only then add on the Mesh layer. (I don’t mean to imply that the Mesh layer has bugs - simply that it adds complexity).

…R

New test :

I succed with 1.3km with Mesh Library between the master and one node. In fact, I think that most of problems was due to one of my NRFL01 wich had problems.

Now all is ok.

Next try : A Mesh Network (= not only with two NRFL01) with long range but it's hard to manage :-)

Good news.

I will be interested to hear the results of your multi-unit testing.

...R

One thing to note with the RF24Mesh library: if the master is reset and comes back online before a node realises that it is gone(mesh.write() fails) the node will still be able to talk to the master(mesh.write() will be successful) but the master's list of connected nodes will be reset. So it will receive the message but not know the address of where it came from.

On my nodes I call mesh.renewAddress() if a write fails. On my master I make sure that every message I receive is from an address in the list by iterating through mess.addrList. If not, I reply to the node with a message telling it to renew itself on the network, which will keep the node list on the master updated.

Thanks SamIAm93. I have probems withs Mesh network. your explanation help me to understand. I will try as soon as possible .... but this is the end of my holidays...