Skip to content

RF24Network: Dynamic Addressing

reixd edited this page Sep 17, 2014 · 2 revisions

Collection of ideas and thoughts about (dynamic) addressing in a RF24Network

See issue https://github.com/reixd/RF24toTUN/issues/2#issuecomment-55097874

Proposal from TMRh20:

  • extract the IP address from the TUN/TAP device (last 16 bits) and use that as a dynamic addressing mechanism for the RF24Network

RF24Network addressing is directly relatable to IP addresses

RF24Network Address format IP Address Format
40-bits (5-bytes) 32-bits (4-bytes)
byte 0: Pipe number n/a
bytes1-4: Node address bytes 0-3: Node Address

Example

So, if we used a mask of 10.10.10.10 for example, the master node could be 10.10.10.10 n = 1-5 Direct children of master would be 10.10.10.n/24 using a gateway of 10.10.10.10 Children of those nodes would be 10.10.n.n/16 (Node 10.10.5.5 uses gateway 10.10.10.5) Subsequent subnets/levels could use similar topology, and routing is all IP-based, regardless of whether you are addressing things from the RF24Network or RF24toTUN viewpoint.