diff --git a/examples/rpl_udp/README.md b/examples/rpl_udp/README.md index a56668666a..e99fc6be71 100644 --- a/examples/rpl_udp/README.md +++ b/examples/rpl_udp/README.md @@ -1,31 +1,71 @@ -#tl;dr - -command order: - - init [r|n] - server - send - -# setup -compile the application +# Setup the build +First switch to this application directory: cd RIOT/examples/rpl_udp + +#### Parameterizing the build +The build system provides two specific parameters for the RPL module. +These parameters are: + * `RPL_MAX_ROUTING_ENTRIES` sets the desired maximum number of entries for the RPL routing table. _If this parameter is not provided, a [default](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L130) value is used._ + * `RPL_NODE_IS_ROOT` indicating the build is specifically for a root node. This parameter is **only required** for using [`RPL_NON_STORING_MODE`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L31) MOP to initialize a RPL routing table. The parameter is ignored in all other cases. _For non-storing MOP a node does not require to provide a routing table._ + +#### Compiling the executable +**example for [`RPL_STORING_MODE_NO_MC`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L139):** + make -Set up a bridge for *two* tap devices to communicate over +builds the project and creates `128` entries for the RPL routing table by default. + + make RPL_MAX_ROUTING_ENTRIES=103 + +builds the project and creates `103` entries for the RPL routing table **overwriting** the default value. + +**example for [`RPL_NON_STORING_MODE`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L133):** + + make RPL_MAX_ROUTING_ENTRIES=103 RPL_NODE_IS_ROOT=1 + +builds the project and creates `103` entries for the RPL routing table for the root node. + +#### _[native only]_ Set up a bridge for *two* tap devices for communication ../../cpu/native/tapsetup.sh create 2 -# rpl init +The `2` corresponds to the number of _virtual_ nodes to be started. +The tap devices are bound to the _virtual_ native node on starting the created executable `rpl_udp.elf`. +#### _[native only]_ Starting _virtual_ nodes Run the first node make term +This starts the executable binding a _virtual_ node to the first tap device `tap0`. + +**Further nodes must be bound to tap devices manually.** +For the second node it would be: + + make term PORT=tap1 + + +# RPL init Type ``help`` to see the commands available. -Init your rpl node as either a root or a node router. +#### Command order: + init (r|n|h) + server + send + + +Init your RPL node either as root (`r`), as node router (`n`), or as non-routing node (host-mode) (`h`) + + > init r + init r + INFO: Initialize as root on address 1 + 6LoWPAN and RPL initialized. + Channel set to 10 + Transport layer initialized + +or > init n init n INFO: Initialize as node on address 2 @@ -34,11 +74,10 @@ Init your rpl node as either a root or a node router. Transport layer initialized or - - > init r - init r - INFO: Initialize as root on address 1 - 6LoWPAN and RPL initialized. + > init h + init h + INFO: Initialize as non-routing node on address 3 + 6LoWPAN initialized. Channel set to 10 Transport layer initialized @@ -66,9 +105,9 @@ You can now use the ``dodag`` command to obtain information on the node's rank i fe80:0000:0000:0000:3612:00ff:fe00:0001 --------------------------- -#sending via UDP +#Sending via UDP -In order to be able to receive UDP messages from other nodes, we have to start rpl_udp's UDP server: +In order to be able to receive UDP messages from other nodes, we have to start `rpl_udp`'s UDP server: > server server