nRF24/RF24: the OSI Layer 2 driver for nRF24L01 radios on Arduino and Linux
OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
At a glance
- What is it?
- RF24 is the C++ driver that turns an nRF24L01 transceiver into a usable packet radio on Arduino, Raspberry Pi and other Linux boards. It handles the radio's register-level protocol so your sketch only deals with pipes and payloads.
- Who is it for?
- Adopt RF24 when you are driving an nRF24L01 from an Arduino, a Raspberry Pi or another Linux board and you want the register-level work already done. Do not adopt it if you need a mesh stack, IPv6, or a radio other than the nRF24L01 family; RF24 is a Layer 2 driver, and the README points elsewhere for higher-level networking.
- Can I use it commercially?
- Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 16 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 28, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What RF24 solves, and who is actually writing code against it
An nRF24L01+ is a cheap 2.4 GHz transceiver with a six-pipe packet engine, a 32-byte payload limit and an SPI interface. Talking to it directly means poking a few dozen registers, waiting for status bits, and handling the Enhanced ShockBurst acknowledgement machinery yourself. RF24 is the layer that hides that. The repository describes itself as an OSI Layer 2 driver, which is the honest framing: it gives you addressing (pipes), framing (payloads up to 32 bytes), and link-level acknowledgements, and stops there.
The audience is narrow and specific. It is people who have a microcontroller or a single-board computer, an nRF24L01 module wired to an SPI bus, and a need to move small packets between two or more of them without Wi-Fi or Bluetooth. The examples directory shows the shape of that work: GettingStarted, MulticeiverDemo, StreamingData, AcknowledgementPayloads, InterruptConfigure, ManualAcknowledgements, scanner. There is no application framework here, no broker, no discovery protocol. If you wanted a sensor network with routing, RF24 is the bottom half of it, not the whole thing.
One design decision worth naming: the same C++ core is compiled for Arduino, Linux, and RP2xxx boards. That is why RF24_config.h and a configure script exist. It also means the API you read in an Arduino tutorial is the API you call on a Raspberry Pi, which is a real convenience when you want a Pi as a base station and an Uno as a sensor node.
Pipes, payloads and the SPI bus: how the driver is put together
The core is RF24.cpp and RF24.h, with RF24_config.h selecting compile-time options. On Linux, the Makefile compiles RF24.o plus a driver-specific set of objects. The DRIVER variable picks which: MRAA adds spi.o gpio.o compatibility.o interrupt.o, RPi adds spi.o bcm2835.o compatibility.o interrupt.o, SPIDEV adds spi.o gpio.o compatibility.o interrupt.o, wiringPi adds only spi.o, and pigpio adds spi.o gpio.o interrupt.o compatibility.o. That list is the clearest statement of what each Linux backend actually provides: wiringPi is the thinnest, and the others bring GPIO and interrupt support along with SPI.
On the radio side, the abstraction is the pipe. You configure an address per pipe, open reading pipes, and write payloads to a pipe. The MulticeiverDemo example exists because one nRF24L01 can listen on up to six pipes at once, which is how a single receiver can distinguish several transmitters without any higher-level addressing scheme. AcknowledgementPayloads shows the other half of Enhanced ShockBurst: an ACK packet can carry data back, so a node can acknowledge a reading and return a command in the same exchange.
The Linux build also produces a shared library, librf24, linked with SHARED_LINKER_FLAGS and SHARED_LINKER_LIBS from Makefile.inc. Interrupt handling is optional and driver-dependent, which is why interrupt.o appears in four of the five driver branches but not in wiringPi's. If your design depends on an IRQ pin waking the host rather than polling, that Makefile branch is the first thing to check.
Installing RF24 and sending your first packet
On Linux, configuration comes first. The configure script writes Makefile.inc and utility/includes.h, and the Makefile's cleanconfig target removes exactly those two files when you want to start over. The README points to the project documentation site for installation detail; the repository itself gives the build shape.
After running the configure script for your board, build and install the shared library:
./configure
make all
sudo make installThe Makefile's all target depends on the library, and the comment above it notes that a reinstall follows each recompilation. If you need to reset the generated configuration, run make cleanconfig, which removes Makefile.inc and utility/includes.h.
For Arduino, the repository ships library.properties and library.json, so it is installable through the Arduino IDE's library manager or PlatformIO rather than by hand. The CI badges in the README cover Arduino CLI, Linux, PlatformIO and RP2xxx builds, which tells you which toolchains the project builds against on every push.
Once the library is in place, the smallest useful check is the scanner example. It sweeps the channel range and reports what it hears, which is the fastest way to confirm that your SPI wiring and CE/CSN pins are correct before you debug anything else. For a first transmission, examples/GettingStarted is the intended starting point. The README does not document a rollback procedure for the library installation, so if you are installing into a system prefix, record what make install wrote before you upgrade.
Where RF24 stops being the right tool
The 32-byte payload limit is a hardware property, not a library choice, and RF24 does not paper over it. Anything larger is your problem to fragment, and the StreamingData example exists precisely because sending a stream over this radio requires you to think about chunking.
Range and reliability are the other boundary. The nRF24L01 is a 2.4 GHz part sharing spectrum with Wi-Fi and microwave ovens. RF24 gives you channel selection and acknowledgement handling, but the README does not claim any range figure, and you should not expect the library to compensate for a bad antenna or a noisy band. If you need kilometre-scale links or a guaranteed delivery path across many hops, a sub-GHz radio or a LoRa module is a different product category.
The Linux side has its own failure mode. The build depends on a driver backend chosen at configure time, and the Makefile only knows about MRAA, RPi, SPIDEV, wiringPi and pigpio. A board whose GPIO or SPI is exposed through some other interface is not covered by those branches, and the REMOTE_ERROR string in the Makefile makes clear that cross-compilation to a remote machine needs the configure script run with the right arguments first. The README also points anyone hitting trouble at COMMON_ISSUES.md before opening an issue, which is a fair signal that wiring and driver mismatches are the common failure, not the C++ code.
Finally, if you are building a standards-based network, RF24 is the wrong layer. There is no IP stack here, no routing, no name resolution. You get packets between radios and nothing above that.
RF24 against a full radio stack, and against bare register code
The most useful comparison is not against another library but against the two things people do instead. The first is writing to the nRF24L01 registers directly. That is entirely possible, and for a single fixed link between two boards it can be less code than pulling in a library. What you lose is the accumulated handling of the awkward parts: the status polling, the pipe configuration, the ACK payload sequencing, and the differences between Arduino and Linux SPI. RF24 is worth its weight once you have more than one pipe, more than two nodes, or more than one platform.
The second alternative is a different radio and its own ecosystem. If your project needs a mesh, IPv6, or a documented multi-hop routing layer, an 802.15.4-based stack is the more direct path, because it defines the upper layers that RF24 deliberately leaves out. The trade is cost, power and complexity: you take on a heavier stack to get routing you may not need. For two boards exchanging 20-byte readings, that is overkill, and RF24 plus the GettingStarted example gets you there faster.
Within the nRF24L01 world, RF24 is the reference implementation. The repository carries datasheets/, a docs/ tree built on Read the Docs, and a pyRF24/ directory for Python bindings, so the same radio can be driven from a Python script on a Linux host. That breadth is the argument for choosing it over a one-off driver: the protocol handling is shared and the platform coverage is broad.
Licence, maintenance and what an upgrade costs you
RF24 is GPL-2.0. The Makefile header states the licence as GPL (General Public License) and the repository carries a LICENSE file. For anyone linking librf24 into a distributed product, that is a copyleft obligation to understand before you ship, not after. The Arduino library is distributed under the same terms. This is not legal advice; if your product is closed source, read the licence and get proper counsel.
The project is not archived, and the last push was on 2026-09-13. Releases have been steady: v1.6.0 on 2026-04-08, v1.6.1 on 2026-05-31, and v1.6.2 on 2026-08-13. The repository also carries a CHANGELOG.md, which is where you should look before upgrading, since the README itself does not describe version-to-version changes.
Upgrade cost is mostly on the Linux side. Because Makefile.inc and utility/includes.h are generated by configure, a new release can require you to re-run configure rather than just rebuild, and a driver backend that the new Makefile no longer lists would break the build. On Arduino, the library is versioned through the IDE or PlatformIO, so the upgrade is a version bump. Either way, the practical check before upgrading is whether your driver branch still exists in the Makefile and whether your sketch uses anything that moved. The project's own build matrix, Arduino CLI, Linux, PlatformIO and RP2xxx, is the set of configurations the maintainers verify.
Editorial conclusion
Adopt RF24 when you are driving an nRF24L01 from an Arduino, a Raspberry Pi or another Linux board and you want the register-level work already done. Do not adopt it if you need a mesh stack, IPv6, or a radio other than the nRF24L01 family; RF24 is a Layer 2 driver, and the README points elsewhere for higher-level networking. Before committing, run the scanner example against your wiring, read COMMON_ISSUES.md, and confirm that your chosen Linux driver (SPIDEV, RPi, MRAA, wiringPi or pigpio) is one the configure script supports on your board.
Frequently asked questions
What can I do with an nRF24L01 and the RF24 library?
You can move small packets between radios over 2.4 GHz, with up to six listening pipes on one receiver and acknowledgements that can carry return data. RF24 is described as an OSI Layer 2 driver, so it handles addressing, framing and link-level ACKs, and leaves routing and application protocols to you.
What is the nRF24L01 module used for?
It is a 2.4 GHz transceiver that RF24 drives from Arduino, Raspberry Pi and other Linux boards over SPI. The repository's examples cover point-to-point links, one receiver listening to several transmitters, streaming data, and interrupt-driven operation.
What are the alternatives to the nRF24L01 and RF24?
If you need a mesh, IPv6 or documented multi-hop routing, an 802.15.4-based stack defines the upper layers that RF24 deliberately omits. If you only need a fixed link between two boards, writing to the nRF24L01 registers directly is a lighter option, at the cost of handling status polling, pipe setup and ACK payload sequencing yourself.
How much does an NRF module cost?
The repository does not list prices or vendors for the nRF24L01 hardware. RF24 itself is a GPL-2.0 licensed C++ driver, so the software carries no purchase cost; the module is separate hardware you source yourself.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nrf24-rf24)