RF24Ethernet - TCP/IP over RF24Network  1.6b
TMRh20 - Pushing the practical limits of RF24 modules
Configuration and Set-Up

RF24Ethernet requires the RF24 and RF24Network_DEV libraries (optionally RF24Mesh)
See http://tmrh20.github.io for documentation and downloads

See the video at https://www.youtube.com/watch?v=rBAIqAaRu0g for a walk-through of the software setup with Raspberry Pi and Arduino.


On the Raspberry Pi, a companion program, RF24Gateway must be installed along with the RF24 and RF24Network libraries

  1. wget http://tmrh20.github.io/RF24Installer/RPi/install.sh
  2. chmod +x install.sh
  3. ./install.sh
  4. cd RF24Gateway/examples/ncurses
  5. make
  6. sudo ./RF24Gateway_ncurses
  7. The application will require the user to specify an IP address and Subnet Mask: and are the defaults with RF24Ethernet examples
  8. Raspberry Pi defaults to the master node (00) using RF24Mesh. Secondary Raspberry pi nodes need to specify their RF24Network address or RF24Mesh nodeID.


  1. For Arduino devices, use the Arduino Library Manager to install the RF24 libraries
  2. Open the included Getting_Started_SimpleServer or Getting_Started_SimpleClient example
  3. Configure your chosen CE and CS pins for the radio connection.
  4. Configure the RF24Mesh nodeID (Any unique value from 3 to 255)
  5. Configure the IP address according to your preferences, (last octet must==nodeID) with the gateway set to the chosen IP of the RPi.
  6. Connect into your nodes web-server at http://ip-of-your-node:1000 from the RPi or configure the client sketch to connect to a server running on the Raspberry Pi. Note: To minimize memory usage on Arduino, edit RF24Network_config.h with a text editor, and uncomment #define DISABLE_USER_PAYLOADS. This will disable standard RF24Network messages, and only allow external data, such as TCP/IP information.

Non-Raspberry Pi (Linux etc) Devices
Arduino can also function as a gateway for any Linux machine or PC/MAC that supports SLIP.
See the SLIP_Gateway and SLIP_InteractiveServer examples for usage without the need for a Raspberry Pi.

Accessing External Systems: Forwarding and Routing

In order to give your network or nodes access to your network or the internet beyond the RPi, it needs to be configured to route traffic between the networks.

  1. Run
    sudo sysctl -w net.ipv4.ip_forward=1
    to allow the RPi to forward requests between the network interfaces
  2. sudo iptables -t nat -A POSTROUTING -j MASQUERADE
    to allow the RPi to perform NAT between the network interfaces
This configuration is generally for initial testing only. Users may also need to add a static route to their local machine, or configure port forwarding on the RPi.
See the following links for more information on configuring and using IPTables:
Note: Users are responsible to manage further routing rules along with their IP traffic in order to prevent unauthorized access.

Advanced (uIP) Configuration and Info

See the User Configuration section for modifying uip-conf.h