Code Monkey home page Code Monkey logo

erbium-br's Introduction

#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

erbium-br's People

Contributors

shantanoo-desai avatar

erbium-br's Issues

MSP430 compiler check

Test on Native PC fails to burn code on Zolertia Z1 Mote with ROM overflow problem for MSP430.

Version check shows

    msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)

Same code runs on Virtual Image of Contiki-OS

Version check shows

    msp430-gcc (GCC) 4.7.0 20120322 (mspgcc dev 20120716)

Possible solution is the bash file in Contiki Wiki for MSP430X
https://github.com/contiki-os/contiki/wiki/MSP430X

How ever bash does not replace the old compiler version and Check cannot be verified on Native PC

cannot `make clean all`

There seems to some error with make clean all

obj_native/slip-bridge.o: In function `init':
/home/user/contiki-new/examples/erbium-br/slip-bridge.c:98: undefined reference to `slip_arch_init'
obj_native/slip-bridge.o: In function `putchar':
/home/user/contiki-new/examples/erbium-br/slip-bridge.c:130: undefined reference to `slip_arch_writeb'
/home/user/contiki-new/examples/erbium-br/slip-bridge.c:131: undefined reference to `slip_arch_writeb'
/home/user/contiki-new/examples/erbium-br/slip-bridge.c:137: undefined reference to `slip_arch_writeb'
/home/user/contiki-new/examples/erbium-br/slip-bridge.c:144: undefined reference to `slip_arch_writeb'
contiki-native.a(slip.o): In function `slip_poll_handler':
/home/user/contiki-new/examples/erbium-br/../../core/dev/slip.c:175: undefined reference to `slip_arch_writeb'
contiki-native.a(slip.o):/home/user/contiki-new/examples/erbium-br/../../core/dev/slip.c:106: more undefined references to `slip_arch_writeb' follow
collect2: ld returned 1 exit status
make: *** [erbr.native] Error 1
rm erbr.co obj_native/rplinfo.o obj_native/slip-bridge.o

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.