RF24Ethernet - TCP/IP over RF24Network v1.6.14
TMRh20 - Pushing the practical limits of RF24 modules
No Matches
uIP Configuration

User configuration options

uIP has a number of configuration options that can be overridden for each project. These are kept in a project-specific uip-conf.h file and all configuration names have the prefix UIP_CONF. Some of these options are specific to RF24Ethernet.

 Maximum number of TCP connections.
 Maximum number of listening TCP ports.
 uIP buffer size.
 Optional: Uncomment to disable
#define UIP_CONF_LLH_LEN   0
 SLIP/TUN - 14 for Ethernet/TAP & 0 for TUN/SLIP.
#define UIP_CONF_UDP   0
 UDP support on or off (required for DNS)

Advanced Operation

For advanced configuration of RF24Ethernet

#define UIP_TIMER_DIVISOR   16
 Adjust the rate at which the IP stack performs periodic processing.
 UDP checksums on or off.
 uIP User Output buffer size

Detailed Description

User Configuration Options

Macro Definition Documentation



Maximum number of TCP connections.

InteractiveServer_Mesh.ino, and SLIP_InteractiveServer.ino.

Definition at line 59 of file uip-conf.h.



Maximum number of listening TCP ports.

Definition at line 62 of file uip-conf.h.



uIP buffer size.

For simplicity, this is automatically set to the MAX_PAYLOAD_SIZE configured in the RF24Network_conf.h file, but can be configured independently of RF24Network if desired.
  1. Nodes can use different buffer sizes, direct TCP communication is limited to the smallest ie: A RPi can be configured to use 1500byte TCP windows, with Arduino nodes using only 120byte TCP windows.
  2. Routing nodes handle traffic at the link-layer, so the MAX_PAYLOAD_SIZE is not important, unless they are running RF24Ethernet.
  3. Nodes running RF24Ethernet generally do not need to support RF24Network user payloads. Edit RF24Network_config.h and uncomment #define DISABLE_USER_PAYLOADS. This will free memory not used with RF24Ethernet.
  4. The user buffers are automatically configured to (Buffer Size - Link Layer Header Size - TCP Header Size) so using RF24Mesh will decrease payloads by 14 bytes.
  5. Larger buffer sizes increase throughput for individual nodes, but can impact other network traffic.
  6. Max usable value is 512

Definition at line 82 of file uip-conf.h.



Optional: Uncomment to disable

Adjust the length of time after which an open connection will be timed out.

If uIP is polling the established connection, but an ack or data is not received for this duration in ms, kill the connection.

Definition at line 90 of file uip-conf.h.


#define UIP_CONF_LLH_LEN   0

SLIP/TUN - 14 for Ethernet/TAP & 0 for TUN/SLIP.

Ethernet headers add an additional 14 bytes to each payload.

RF24Mesh generally needs to be used if setting this to 0 and using a TUN or SLIP interface

Definition at line 99 of file uip-conf.h.


#define UIP_CONF_UDP   0

UDP support on or off (required for DNS)

DNS support typically requires larger payload sizes (250-300). It seems that DNS servers will typically respond with a single address if requesting an address of www.google.com vs google.com, and this will work with the default payload size

Definition at line 107 of file uip-conf.h.


#define UIP_TIMER_DIVISOR   16

Adjust the rate at which the IP stack performs periodic processing.

The periodic timer will be called at a rate of 1 second divided by this value

Increase this value to reduce response times and increase throughput during user interactions.

: Increasing this value will increase throughput for individual nodes, but can impact other network traffic.

Definition at line 127 of file uip-conf.h.



If operating solely as a server, disable the ability to open TCP connections as a client by setting to 0 Saves memory and program space.

Definition at line 133 of file uip-conf.h.



UDP checksums on or off.

Definition at line 136 of file uip-conf.h.



uIP User Output buffer size

The output buffer size determines the max length of strings that can be sent by the user, and depends on the uip buffer size


Must be an odd number or the TCP/IP sequence gets out of order with payloads larger than 511 bytes I think this might be a bug or missing feature of the uip stack

Definition at line 148 of file uip-conf.h.



Definition at line 153 of file uip-conf.h.




If an open connection is not receiving data, the connection will be restarted.

Adjust the initial delay period before restarting a connection that has already been restarted

For small payloads (96-120 bytes) with a fast connection, this value can be as low as ~750ms or so. When increasing the uip buffer size, this value should be increased, or the window may be reopened while the requested data is still being received, hindering traffic flow.

Definition at line 167 of file uip-conf.h.