I'm not really an expert in this field, so maybe I used the wrong
terminology. For what I could understand (let me know if I'm wrong), for
routing packets in 802.15.4 networks, RPL is used. And RPL needs a (DAG)
root, that generally is the gateway/border router. This is what I meant with
Thanks for the clarification. This setup is 100% aligned with anything we have
in mind when working on RIOT.
I don't know exactly how it works, but I guess that it maintains a list of
all the nodes in the network, and from here my consideration that if you
have a big network (>1000 nodes?) you need quite some resources to keep the
table, hence the idea of running this role in a bigger CPU (Allwinner A13)
and using R21 only as transceiver.
You're right; RPL (in both modes, storing or non-storing) assumes that the
root of the DAG is more powerful in terms of memory and maintains some routing
information about the nodes in the network.
Some concrete numbers: the gnrc_networking example built for the SAM-R21
requires about 20kB RAM. This example includes most of the components you
mentioned in your scenario, like RPL, 6LoWPAN, or transport layer (UDP in this
case). But it's missing OTA, security (e.g. tinydtls), and MQTT. However, the
RAM overhead for tinydtls is small and I assume it shouldn't be too big for
any OTA mechanism or MQTT. But probably your application will require some
Currently the routing information per node consumes 20 bytes IIRC. The default
configuration used for the gnrc_networking example is able to handle only up
to 20 nodes. Given the 32kB RAM of the SAM-R21, one can make this
- ~20kB for RIOT+network stack
- ~5kB for missing features like DTLS and your application
= ~7kB / 20 -> about 350 nodes could be possible on a SAM-R21.
All in all, yes, the SAM-R21 might be a bit too small memory-wise to act as a
border router for a network with 1000 nodes or more. On the one hand, taking
an Cortex-A8 *might* still be overkill, on the other hand, if energy
consumption is is not a concern for the gateway it should be okay. Latest
plugtest revealed that interoperability between RIOT and Linux for 6LoWPAN and
RPL works quite well.
Has somebody already tried this kind of setup?
(RIOT 6LowPAN <-> RIOT RPL <-> SLIP <-> UART <-----> UART <-> SLIP <->
802.15.4 <-> RF)
I'm not sure if I tested exactly this setup, but I ran a lot of tests with
similar setups (either without RPL or without the SLIP part) and I'm very
optimistic that this setup would work smoothly out of the box.