You are on page 1of 4

6/8/2015

contiki/rpltutorial.mdatmasternjh/contikiGitHub

Thisrepository Search

Explore

Features

Enterprise

njh / contiki

Blog

Watch

Signup

Star

Signin

Fork

114

forkedfromcontiki/contikimirror

Branch:master

contiki/cpu/mc1322x/doc/rpltutorial.md

maralviraon12Nov,2010fixtypos

0contributors

192lines(132sloc) 6.627kB

Raw

Blame

History

ContikiRPLQuickstartusingEconotags
ContikiRPLimplementstheIETFROLLworkinggroup'sRPL:IPv6RoutingProtocolforLowpowerandLossyNetworks.
Thisroutingstandardenablesyoutosetuparouteover6LowPANnetwork.
ThistutorialwillshowyouhowtorunContiki'sRPLdemosonRedwireEconotags.

1)ObtainRedwireEconotags,orothermc1322xhardware.
Seethemc1322xhardwareforanincomplete,butgrowinglistofmc1322xhardware.
WerecommendafewEconotagstogetstarted.Inadditiontothemc13224v,theEconotagalsohastheFT2232HUSB
dualportcontroller.OneportisconnectedtoUART1andallthenecessarypinstoload,erase,andresetthemc13224v.
TheotherportisconnectedtotheJTAGpinsforruntimedebugging.Nootherprogramminghardwareisnecessary.
Justyourcomputer!

2)Getatoolchain,andContikisource.
EverythingyouneedisinInstantContiki2.5.IfyouaregoingtobeworkingprimarilywithContikithenthisisthewayto
go.
InstantContikicontainsthemc1322xoe[ubuntu][mac]toolchain.
Developmentofthemc1322xportoccursinadifferentbranchfromthemainContikiCVSrepository.Themostcurrent
mc1322xcontikiportcanbefoundhere:contikmc1322x.git

3)Buildtheborderrouterandrpludp
TheRPLdemoconsistsofa"Borderrouter"andatleastoneotherRPLenablednode.Forthistutorial,theborderrouter
createsaRPLDAGandistheROOT.TheothernodewillbeaRPLudpclient.ItjoinstheRPLnetwork,actsasanRPL
router,andsendsaUDPdatagramtoahardcodedIPV6address.Thistutorialonlyhandlesatwonodenetwork,butcan
beextendedforanynumberofnodes.
ThegeneralcommandtomakeaContikibinaryfortheEconotagis:
makeTARGET=redbeeeconotag

https://github.com/njh/contiki/blob/master/cpu/mc1322x/doc/rpltutorial.md

1/4

6/8/2015

contiki/rpltutorial.mdatmasternjh/contikiGitHub

Tobuildtheborderrouter:
cdcontiki2.x/examples/ipv6/rplborderrouter
makeTARGET=redbeeeconotag

Thiswillproducethebinaryimage'borderrouter_redbeeeconotag.bin',whichyoucanloaddirectlyontoanmc1322x
andexecute.
Tobuildtheudpclient,do:
cdcontiki2.x/examples/ipv6/udpclient
makeTARGET=redbeeeconotag

whichwillbuild'udpclient_redbeeeconotag.bin'.

4)LoadthebinariesontheEconotags:
a)RuntheeconotagswithrandomizedMACaddresses(random,but
persistent)
Afterbuildingborderrouter_redbeeeconotag.bin,youloadthecodewith:
mc1322xload.plfborderrouter_redbeeeconotag.bint/dev/ttyUSB1c'bbmclredbeeeconotagreset'

TheeconotagwillflashitselfwitharandomRedwireMACaddressifyouhaven'tprogrammedonein:
addressinflashblank,settingtodefinedIABwitharandomextention.
flashingblankaddress
Rimestartedwithaddress00:50:C2:FF:FE:A8:C2:66
CSMAsicslowmac,channelcheckrate100Hz,radiochannel26
TentativelinklocalIPv6address
fe80:0000:0000:0000:0250:c2ff:fea8:c266
TentativeglobalIPv6addressaaaa:0000:0000:0000:0250:c2ff:fea8:c266

ThismacaddressisusedtoderiveitsIPv6address.Inthisexample,it'saaaa::0250:c2ff:fea8:c266.
TheborderrouterconnectstoyourcomputeroveraSLIPtunnelformedbytunslip6atoolincludedinContiki.
Tomaketunslip6:
cdcontiki2.x/tools
maketunslip6

Youneedtoruntunslip6tocreatethistunnelandSLIPconnection:
tunslip6s/dev/ttyUSB1aaaa::1/64

b)ProgramtheMACaddressesontheEconotag
Toerasetheeconotag(andtheMACaddress),firstmakesureyou'vebuiltBBMC:
cdcontiki2.x/cpu/mc1322x/tool/ftditools

https://github.com/njh/contiki/blob/master/cpu/mc1322x/doc/rpltutorial.md

2/4

6/8/2015

contiki/rpltutorial.mdatmasternjh/contikiGitHub
make

Ifyouhavetrouble,seetheBBMCpagefordetails.BBMCcontrolstheFT2232HoverUSBthroughlibftdi.Itcanresetor
eraseanmc13224v.Toerase:
bbmclredbeeeconotagerase

ThentoflashjusttheMACaddressyouneedtobuildflasherfromlibmc1322x.See:
http://mc1322x.devl.org/libmc1322x.html

ThentoflashtheMACaddressyoucando:

mc1322xload.plefflasher_redbeeeconotag.binzt/dev/ttyUSB1c'bbmclredbeeeconotagreset'0x1e000,0xABC25000,0x010000C0

ztoindicateyouaresendingazerolengthbinarytoflasher.
ecausesmc1322xload.pltoexitwhenit'sdone,insteadofdroppingtoaterminal
ThenexttimeyourunContikiyou'llget:
loadingrimeaddressfromflash.
Rimestartedwithaddress00:50:C2:AB:C0:00:00:01
CSMAsicslowmac,channelcheckrate100Hz,radiochannel26
TentativelinklocalIPv6address
fe80:0000:0000:0000:0250:c2ab:c000:0001
TentativeglobalIPv6addressaaaa:0000:0000:0000:0250:c2ab:c000:0001

N.B.forallofthebbmccommands,you'llneedtouseiifyouhavemorethanoneeconotagpluggedin.Onmost
systemstheindexesareenumeratedbackwardsfromtheterminals.E.g.ifyouhave23nodesconnected,then
/dev/ttyUSB1willbeonftdiindex22andtheloadcommandwouldbe:
mc1322xload.plffoo.bint/dev/ttyUSB1c'bbmclredbeeeconotagi22reset'

5)Starttheudpclient
Usemc1322xload.pltorunudpclient_redbeeeconotag.binonthesecondeconotag:
mc1322xload.plfudpclient_redbeeeconotag.bint/dev/ttyUSB3
'bbmclredbeeeconotagi0'

6)Checktheborderrouter'swebpageforstatus
TheRPLborderrouterservesawebpagethatdisplaystheknownneighborsandtheknownroutestoallthenodeonthe
DAG.Infirefox,youcantypeinthefollowingtogotoaIPv6address:
http://[aaaa:0000:0000:0000:0250:c2ff:fea8:c266]

Neighbors
https://github.com/njh/contiki/blob/master/cpu/mc1322x/doc/rpltutorial.md

3/4

6/8/2015

contiki/rpltutorial.mdatmasternjh/contikiGitHub

fe80::250:c2ff:fea8:cbf4

Routes
aaaa::250:c2ff:fea8:cbf4/128(viafe80::250:c2ff:fea8:cbf4)

7)Ping6allthenodes
Afterashorttime,oncetheDAGformstoanode,youshouldseearouteappearontheborderrouter'sstatuspage.You
canpingthisnodefromthecomputerrunning'tunslip6'
ping6aaaa::250:c2ff:fea8:cbf4

Asuccessfulpingshowsthatbothadownwardandupwardroutehasformed.

8)That'sit!
Nowgomeshandstuff.

2015GitHub,Inc. Terms Privacy Security Contact

https://github.com/njh/contiki/blob/master/cpu/mc1322x/doc/rpltutorial.md

Status API Training Shop Blog About Help

4/4

You might also like