Vous êtes sur la page 1sur 14

Lab Session

Indoors and Outdoors: how far can we go? every 2 seconds, transmit unicast packets
to your neighbour + light a LED everytime you send/receive a packet
Unicast example Timer every 2 sec Toggle red LED when you send, green LED when received

Tuesday, March 8, 2011

Lab Session
Indoors and Outdoors: how far can we go? examples/rime example-unicast2.c Setting up a multi-hop network Measuring temperature or battery
outdoors/indoors via multi-hop

Tuesday, March 8, 2011

REMINDER: your RIME address


make z1-reset && make login Rime Started address with 225.1

Tuesday, March 8, 2011

Lab Session Tuesday 8th

Summing up yesterdays Lab:

Yesterday you should have checked distance between two sensor nodes, putting together several things you should have learned last week It was done via unicast packets sent between you and your partner Solution was in examples/rime/example-unicast2.c and example-unicast3.c You should have added led toggling when sending and receiving packets, and should have got between 60m ~ 200m LOS, outdoors, depending on the nodes you used.

Tuesday, March 8, 2011

Lab Session Tuesday 8th



Today we will set an IPv6 Multihop network I will run a border router, (to avoid interferences) later maybe you can run border-router in a different channel from anyone else Each of you will run a web-server on their own mote!!! Then Ill be able to connect to your sever, and turn your leds on/off, or see the last history of your battery and temperature sensor readings

Tuesday, March 8, 2011

Lab Session Tuesday 8th


Today, rst of all get my changes typing 2
commands:

go to examples/ipv6/z1-websense directory
Tuesday, March 8, 2011

git stash save git pull

Lab Session Tuesday 8th



Look at z1-websense.c, see main THREAD upload program to Z1 mote with command:

make z1-websense.upload nd out YOUR OWN IPv6 local link MAC address (how? make z1-reset && make login) mine is: fe80::c30c:0:0:97 (yours will differ!). I want to know!

Tuesday, March 8, 2011

My border router will assign your mote the routable address aaaa::c30c:0:0:97

Route Discovery

Now if I see the webpage of the border router I will see all discovered nodes, with their own address, and how to get to them. After a while, look, 2 nodes at my reach! I can ping each discovered node with e.g., for my mote:

ping6 aaaa::c30c:0:0:97

Some nodes can be routed via other nodes, well see

Tuesday, March 8, 2011

I will ping6 your node (come and Ill let you do it)

Tuesday, March 8, 2011

enricm@ubuntu:~/$ ping6 aaaa::c30c:0:0:97 PING aaaa::c30c:0:0:97(aaaa::c30c:0:0:97) 56 data bytes 64 bytes from aaaa::c30c:0:0:97: icmp_seq=1 ttl=63 time=105 ms 64 bytes from aaaa::c30c:0:0:97: icmp_seq=2 ttl=63 time=91.6 ms 64 bytes from aaaa::c30c:0:0:97: icmp_seq=3 ttl=63 time=201 ms 64 bytes from aaaa::c30c:0:0:97: icmp_seq=4 ttl=63 time=188 ms 64 bytes from aaaa::c30c:0:0:97: icmp_seq=5 ttl=63 time=178 ms 64 bytes from aaaa::c30c:0:0:97: icmp_seq=6 ttl=63 time=160 ms 64 bytes from aaaa::c30c:0:0:97: icmp_seq=7 ttl=63 time=510 ms

Your node is running a


web server, capable of showing your battery sensor and your temperature sensor. Just go to its address [aaaa:c30c:0:0:97] look:

Lets see your sensing data

It can do lots of stuff,


Tuesday, March 8, 2011

Small commands for your webserver


Commands are sent adding a special page at the end:


Tuesday, March 8, 2011

http://[aaaa::c30c:0:0:97]/1 http://[aaaa::c30c:0:0:97]/0

turn leds-on turn leds-off

http://[aaaa::c30c:0:0:97]/batt see last batt. readings http://[aaaa::c30c:0:0:97]/temp see last temp readings

http://[aaaa::c30c:0:0:97]/batt
readings

Example: battery readings


see last batt.

Tuesday, March 8, 2011

Exercises
How many sensor readings are kept in a
buffer?

How often is data sensed? How can you change the reach of your
radio transmission in z1-websense?

Tuesday, March 8, 2011

Lets go!

Outside, to the Miramare Park to sense


temperature readings with IPv6.

Tuesday, March 8, 2011

Vous aimerez peut-être aussi