help understanding code for nRF24L01+

I'm planning on using nRF24L01+ chips to make a sensor network with Arduino Uno's. Basically, sensor units w/ temperature sensors and nRF24L01 chip. A single receiver unit, also using nRF24L01, will receive sensor data from several sensor units. Eventually, I'd like to put an ethernet shield on the receiver unit to serve out HTML webpage with all the sensor data.

I'm still learning about the nRF24L01, so here's some questions.

  1. Which driver?
    I've found two sets of drivers. One is from maniacbug on github, who has posted in this forum before. The other one is the web site

And a very basic question: these operate on wifi bands, but they don't seem to implement TCP/IP like a normal computer does. That is, you can use these modules on Arduinos to send bytes to each other, but there's no mechanism for connecting to a central access point, right?

  1. Extending range: There seems to be two version of the Nrf2401+. One has an external antenna and amplifier. The other one is cheaper, and it just uses an squiggly antenna that's part of the board trace. I read that you can extend the range of cheaper units by dremeling off the squiggly antenna trace and soldering in a four inch wire to act as a bigger antenna. Has anyone tried this? Is it a good idea?

I have a third question, but it's so long I'm going to set it aside on the reply to this post. Thanks for reading and for any help.

  1. Powering the unit: I've read that powering the nRf24L01+ using the onboard 3.3V on the Uno is kind of flaky. It needs more current than the 3.3V regulator on the Uno could supply. Has anyone experienced this? Is that true with the R3 Uno?

EDIT: uh oh, I've been using nRF24L01 and nRF24L01+ interchangeably, but I wonder if the driver is for an older nRF24L01 chip, NOT for the nRF24L01+ chip?

Ok, here's my third question. I've only seen one example code for the nRF24L01, and it's on this website of a person testing the range of two nRF24L01's using a "ping-pong" program that he wrote. His code is very close to what I'm trying to do. Can you help me understand some of the code? Is he using the driver? I can't tell.

Here's the guy's blog page:

But the two programs (one for sender/client, one for receiver/server) are here:

I am looking up these commands on the Arduino nRF24L01 API, but still need some help.

Here's the parts I'd like clarification:

Question A1: = 8;

This is how to set the wifi channel right? So, you want to select a channel between 1 and 11 that you and your neighbor isn't using?

Question A2:

Mirf.csnPin = 10;

The csnPin is the slave select pin, right? If I have more than one SPI device on the bus (let's say a nrf24L01 and a ethernet shield), I would have to assign the Ethernet shield it's own slave ID pin, right? So the csn on the nrf24L01 could be pin 9 if the ethernet shield defaults to using pin 10?


  • Configure reciving address.

Mirf.setRADDR((byte *)"serv1");

So, only packets sent to "serv1" will be present in this nrf24l01's buffer and would return true on data.Ready()? It automatically rejects data sent to addresses other than "serv1"? I don't know communications protocols...but aren't there a lot of packets flying around the same wifi frequency? Are the packets sent by the Arduino driver different than the wifi packets used by wireless tablets/laptops using TCP/IP? Just wondering, I don't need to know to make this work I guess. But it seems like I would have two different types of packets on my wireless area. TCP/IP from my wireless router and tablet, and Arduino wireless packets?

Question A3:
on the client:

unsigned long time = millis();
Mirf.send((byte *)&time);

and on the server:

byte data[Mirf.payload];

The first line declares a variable of length Mirf.payload long. In this example, he is only sending a long integer that is the miliseconds it took for the time in ms of the client Arduino's clock, right?

Question A4:
How do you specify the speed? I read that there's three data rages (250kbps, 1Mbps and 2Mbps), and that the slowest data rate gives you the best transmission range. I didn't see where in the code to specify the data rate.