#Erbium Border-Router This is a border router based on [Contiki OS] (https://github.com/contiki-os). This border-router uses a REST Engine on it using Erbium unlike the one in Contiki under the ipv6 folder
examples/ipv6/rpl-border-router
This Border Router is removes the HTTP-simple application running on top of the original file and replaces it with JSON formated RPL information. Hence, instead of accessing:
https://[IPv6 Address of Border-Router]
in order to get information of neighbouring sensors, we can use any type of CoAP implementation like [SMCP] (https://github.com/darconeous/smcp)
-
Here the testing is done on [Zolertia Z1] (https://sourceforge.zolertia.net)motes
-
This folder should be places in the examples/ folder of your Contiki Repository (change the Makefile if other place chosen)
-
inside the folder
make TARGET =z1 erbr.upload
- after the program is burnt on the Z1 mote connect to border Router with the following code
make connect-router
for connecting via Cooja Simulator
make connect-router-cooja
-
Wait till the Prefix is set (usually it will be aaaa::) and observe the IPv6 address of the Border Router in the Terminal window
-
to check connection use:
ping6 aaaa::IPv6:of:the:BorderRouter
- use the following commands on SMCP:
~$ smcpctl coap:https://[IPv6 of Border-Router]:5683/
- Inside the multiline environment use the following to access RPL information:
get rplinfo/parents
if returned value is 0 this means it has no parent and it is itself the Border Router.
- to access the Routing Information use the following:
get rplinfo/routes
if returned valued is greater than 0 then use the following
get rplinfo/routes?index=(0 to value-1)
sure enough you will be getting the Routing information in JSON format.
if the routes value returned is 1 then use
get rplinfo/routes?index=0
if you use index=1 then the returned output will be the following: (hence always use (0 to values-1))
{}
When you try to upload (burn) the code on the Z1 mode the buffer size will be overflowed by a mere 2 bytes and error returned will be the following:
#error "UIP_CONF_BUFFER_SIZE too small for REST_MAX_CHUNK_SIZE" make: *** [obj_z1/er-coap-07-engine.o] Error 1
hence in order to fit the code do the following steps
- go to
platform/z1/ directory
-
open contiki-conf.h file and find ALL UIP_CONF_BUFFER_SIZE and change the value to 240
-
do the same steps as above mentioned to fit the code and run the code.
In order to use multihop functionality for testing purposes
provided that distance between nodes and the Border Router is
not sufficient enough, Control TX Power by adding the following in the source code:
use CC2420.h in the Contiki-OS to control TX Power.
Path to the header file:
dev/cc2420/cc2420.h
Add the Following to the source-code erbr.c
#include "cc2420.h" . . . static uint8_t txpower; txpower = (any number between 0 to 31); cc2420_set_txpower(txpower);
NOTE: 0 is the minimum value of TX Power, 31 being maximum value.
for tesing purpose, disable both the RDC and MAC Layers in project-conf.h file
#DEFINE_CONF_RDC nullrdc_driver #DEFINE_CONF_MAC nullmac_driver
Not for practical scenarios, only when your want the Border-Router with all power and no packet drops