Browse Source

info

master
test2 5 years ago
parent
commit
c1c31b554d
  1. 78
      IoT-Wireless/Lab-I.adoc

78
IoT-Wireless/Lab-I.adoc

@ -288,6 +288,84 @@ To toggle LEDs:
leds_toggle(LEDS_AL
----
=== Create an IPv6 network
The border router will setup the IPv6 prefix of the network and will initiate the creation of the RPL routing tree.
The code of the border-router is in contiki/examples/ipv6/rpl-border-router/border-router.c+.
==== Copy and paste the folder in your project folder.
- Start Cooja and create a new simulation.
- Create a new mote type, browse to your project folder where the rpl-border-router is located and compile it.
- Once the border-router node has been added to the simulation, you then need to populate your network with more motes.
- For this, we use the code in ipv6/sky-websense/sky-websense.c
.
The sky-websense application generates sensing data and provides access to the latest data via built-in webserver.
cd to your project folder where the rpl-border-router is located
[source,bash]
----
make connect-router-Cooja TARGET=sky
----
You should see something like
[source,bash]
----
ifconfig tun0 inet ‘hostname‘ up
ifconfig tun0 add aaaa::1/64
ifconfig tun0 add fe80::0:0:0:1/64
ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00
----
----
http://[‘‘webserver-ipv6-addr’’]
----
in your web browser to see the available readings.
----
e.g.
Current readings
Light: 65
Temperature: 24C
----
[source,bash]
----
http://[aaaa::212:7401:1:101]/
----
And see the following:
[source,bash]
----
Neighbors
fe80::c30c:0:0:9e
Routes
aaaa::c30c:0:0:9e/128 (via fe80::c30c:0:0:9e)
----
Now try to access the light service
- with l for ’light’
- with t for ’temperature’
[source,bash]
----
http://[aaaa::212:7403:3:303]/l
----
:hardbreaks:

Loading…
Cancel
Save