Skip to content

shantanoo-desai/erbium-br

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

Difference:

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:

http://[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)

Steps

  1. Here the testing is done on [Zolertia Z1] (http://sourceforge.zolertia.net)motes

  2. This folder should be places in the examples/ folder of your Contiki Repository (change the Makefile if other place chosen)

  3. inside the folder

	make TARGET =z1 erbr.upload

  1. 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
  1. Wait till the Prefix is set (usually it will be aaaa::) and observe the IPv6 address of the Border Router in the Terminal window

  2. to check connection use:

	ping6 aaaa::IPv6:of:the:BorderRouter
  1. use the following commands on SMCP:
	~$ smcpctl coap://[IPv6 of Border-Router]:5683/
  1. 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.

  1. 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.

Example:

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))

{}

Important configurations:

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

  1. go to
	platform/z1/ directory
  1. open contiki-conf.h file and find ALL UIP_CONF_BUFFER_SIZE and change the value to 240

  2. do the same steps as above mentioned to fit the code and run the code.

Multi-Hoping for Testing Purposes

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.

Testing Purpose

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

About

Contiki Border Router using Erbium CoAP instead of HTTP-simple

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published