RF24Ethernet - TCP/IP over RF24Network v2.2.6
TMRh20 - Pushing the practical limits of RF24 modules
Loading...
Searching...
No Matches
Ethernet and TCP/IP Networking for RF24Network

Arduino CLI build PlatformIO build

Easily create home automation scenarios and sensor networks

Give $2 Arduino radio nodes a real IP address. Ping them, browse them, and use MQTT, HTTP and SSH from your network, with no WiFi or ESP32 needed. A Raspberry Pi/Linux box running RF24Gateway is the bridge.

Why not just use an ESP32?

The RF24 Comm stack uses very little power, and provides a self-healing mesh with range beyond WiFi, cheap nodes, and no WiFi credentials on every device. Use RF24 software to extend your ESP32 networks!

Quick Start:

A: No Gateway

  1. Install RF24Ethernet from the Arduino Library Manager
  2. Run the Headless examples on two RF24Ethernet nodes

B: With a Gateway

  1. Download and run the installer on RPi:

wget https://raw.githubusercontent.com/nRF24/.github/main/installer/install.sh

  1. Make it executable:

chmod +x install.sh

  1. Run it!

./install.sh

  1. Use the Arduino Library Manager to install RF24Ethernet and its dependencies.

Documentation & Setup Info: http://nRF24.github.io/RF24Ethernet

RF24 communication stack general usage

docs/images/RF24Gateway-network.svg

RF24 communication stack vs. OSI Model Mapping

This table illustrates how the RF24 ecosystem aligns with the standard OSI (Open Systems Interconnection) model, highlighting the role of RF24Ethernet as the primary bridge to standard internet protocols.

OSI Layer RF24 Component C++ Header Primary Function Real-World Equivalent
7. Application User Sketch / RF24Mesh RF24Mesh.h Data generation & node ID management HTTP, MQTT, DHCP
6. Presentation nrf_to_nrf (CCM) nrf_to_nrf.h Hardware AES-CCM Encryption/Auth TLS, AES-GCM, IPsec
5. Session RF24Ethernet (lwIP / uIP) RF24Ethernet.h Socket state & connection management BSD Sockets, NetBIOS
4. Transport RF24Ethernet (lwIP / uIP) lwip/tcp.h or uip.h TCP/UDP transport & flow control TCP, UDP
3. Network RF24Network RF24Network.h Octal routing & IP-over-RF24 encapsulation IPv4, IPv6, ICMP
2. Data Link nrf_to_nrf / RF24 Core RF24.h or nrf_to_nrf.h MAC (Pipes), Auto-ACK, & Framing Ethernet (MAC), 802.11
1. Physical nRF24L01+ / nRF52 SPI Hardware 2.4GHz GFSK Radio Frequency Fiber, Copper, WiFi PHY

Key Implementation Details

  • Secure Lower Layers: When using nrf_to_nrf, the stack can utilize the nRF52 hardware CCM module to provide Authenticated Encryption (AES-CCM). This ensures data privacy (Layer 6) and packet integrity (Layer 2) with near-zero CPU overhead.
  • The IP Bridge: RF24Ethernet acts as the "Network Interface Card" (NIC) driver, allowing standard IP stacks (uIP for memory-constrained AVR or lwIP for high-performance ARM/ESP32) to run over the radio mesh.
  • Modernization: nrf_to_nrf serves as a modernized, high-efficiency replacement for the legacy RF24 core library, specifically optimized for integrated nRF52 radio hardware.

Updated 2026:

RF24Ethernet now supports the lwIP stack and native Zephyr networking!

RF24Ethernet requires the RF24, RF24Network and RF24Mesh libraries

Downloads: http://tmrh20.github.io/

Note: Recent changes to support NRF5x boards prevent usage of RF24 devices with NRF5x boards. Users must use the internal radio with RF24Ethernet. See the nrf_to_nrf Arduino library.

## Licenses

IF USING the lwIP STACK or native Zephyr networking:

RF24Ethernet.h, RF24Ethernet.cpp, RF24Server.h, RF24Server.cpp, RF24Client.h, RF24Client.cpp, RF24Udp.h, RF24Udp.cpp

Copyright (c) 2025 tmrh2.nosp@m.0@gm.nosp@m.ail.c.nosp@m.om, github.com/TMRh20 All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Dns.h & Dns.cpp: (c) Copyright 2009-2010 MCQN Ltd. Released under Apache License, version 2.0


IF USING THE uIP STACK:

Licenses include, but are not limited to the following.

RF24Ethernet.h, RF24Ethernet.cpp, RF24Server.h, RF24Server.cpp, RF24Client.h, RF24Client.cpp, RF24Udp.h, RF24Udp.cpp, utility/mempool.h, utility/mempool.cpp

Copyright (c) 2014 tmrh2.nosp@m.0@gm.nosp@m.ail.c.nosp@m.om, github.com/TMRh20 Copyright (c) 2013 Norbert Truchsess norbe.nosp@m.rt.t.nosp@m.ruchs.nosp@m.ess@.nosp@m.t-onl.nosp@m.ine..nosp@m.de All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.


utility/uip.c, utility/uip_arp.h, utility/uip_arp.c, utility/uip_arch.h, utility/uip.h, utility/uipopt.h

Copyright (c) 2001-2003, Adam Dunkels adam@.nosp@m.sics.nosp@m..se, adam@.nosp@m.dunk.nosp@m.els.c.nosp@m.om. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the Institute nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


uip-conf.h, utility/uip-neighbor.h, utility/uip-neighbor.c, utility/uip_timer.h, utility/uip_timer.c, utility/uip_clock.h

Author Adam Dunkels Adam Dunkels adam@.nosp@m.sics.nosp@m..se, adam@.nosp@m.dunk.nosp@m.els.c.nosp@m.om Copyright (c) 2004,2006, Swedish Institute of Computer Science. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the Institute nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Dhcp.h, Dhcp.cpp

DHCP Library v0.3 - April 25, 2009 Author: Jordan Terrell - blog.jordanterrell.com

  • as included in Arduinos stock Ethernet-library, no special licence mentioned here

Dns.h, Dns.cpp

(c) Copyright 2009-2010 MCQN Ltd. Released under Apache License, version 2.0


clock-arch.h, clock-arch.c

Copyright (c) 2010 Adam Nielsen malvi.nosp@m.neou.nosp@m.s@shi.nosp@m.kadi.nosp@m..net All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA