Update to markdown

- Spellchecking
- Update plain text to github markdown
This commit is contained in:
Rémy Léone 2013-03-26 13:09:49 +01:00
parent f8edbbb8d2
commit 7b40a568a6
73 changed files with 1826 additions and 1574 deletions

View file

@ -0,0 +1,109 @@
JSON ws
=======
Short description on how to set-up a sensor network for global IPv6 addresses.
NOTE: this assumes that you do not have a native IPv6 connection.
You will need:
- PC with Ubuntu (Linux) - 11 or 12 versions
- A node for the RPL-Border-Router (examples/ipv6/rpl-border-router)
- A node for the json webservice (examples/ipv6/json-ws)
Set-up IPv6 tunnel and Border Router
------------------------------------
1. Ensure that you have gogo6c installed.
sudo apt-get install gogoc
2. Register an account at gogo6 and Freenet6 (http://www.gogo6.com).
The account at Freenet6 is needed by the gogo6c client.
3. Edit the gogoc.conf and set your own Freenet6 user and password by
changing the lines with "userid" and "passwd".
4. Start gogoc at command line
cd contiki/examples/ipv6/json-ws
sudo gogoc -f gogoc.conf -n
This will print your prefix - TSP_PREFIX. In my case
TSP_PREFIX=2001:05c0:1517:e400 (prefixlen is 56).
5. Connect one of the nodes to the PC (via USB or serial) and program
it with the RPL-border-router (assumes Z1 node).
cd contiki/examples/ipv6/rpl-border-router
make DEFINES=DEFINES=NETSTACK_RDC=nullrdc_driver,NULLRDC_CONF_802154_AUTOACK=1 TARGET=z1 border-router.upload
6. Run tunslip6 which will forward IP from the RPL network to the IPv6 tunnel
(and to the Internet).
cd contiki/examples/ipv6/rpl-border-router
make connect-router PREFIX=<TSP_PREFIX>::1/64
When you start this you should get a printout from the border-router
which give you the IPv6 address of it.
Server IPv6 addresses:
2001:05c0:1517:e400:c30c::10a
fe80::c30c:0:0:10a
7. Browse using Mozilla Firefox (or any other browser) to the IPv6 address
given by the border router. This will show you the list of other nodes
connected to the RPL network.
http://[2001:05c0:1517:e400:c30c::10a]/
NOTE: this is a global IPv6 address so it should also be reachable from
any machine on the Internet.
Configuration of COSM submission
--------------------------------
1. Register a COSM account at https://cosm.com/
Set-up a feed and create an API key for the feed.
2. Program the sensor node with (assumes Z1)
cd contiki/examples/ipv6/json-ws
make websense-z1.upload WITH_COSM=1 TARGET=z1
3. Check the IPv6 address of the node via the RPL-border router or by looking
at printouts when booting (make login TARGET=z1)
4. You need to configure the node to push data to the COSM feed and this can be
done in several ways. For convenience a Python script is included that
pushes the configuration to the nodes.
Edit the file 'setcosm.py' and replace "<your-key>" and "<your-feed>" with
your COSM API key and COSM feed id. You can then use this Python script to
configure your nodes.
This is an example that configures the node with IP address
2001:05c0:1517:e400:c30c::10b to push data to the COSM feed with stream 1:
cd contiki/examples/ipv6/json-ws
./setcosm.py [2001:05c0:1517:e400:c30c::10b] 1
Another way to configure the nodes is to use a REST add-on for the web
browser to post a COSM configuration to the node. "REST Client" for Mozilla
Firefox is an example of such add-on.
POST a JSON expression to your node with the following data: This assumes
that you have the feed with id 55180 and want to post to stream 1 in that
feed. The field 'appdata' should be set to the API key you created at the
COSM web site for the feed.
{
"host":"[2001:470:1f10:333::2]",
"port":80,
"path":"/v2/feeds/55180/datastreams/1",
"appdata":"<insert your COSM API key>",
"interval":120,
"proto":"cosm"
}
This will configure the node to periodically push temperature data every
other minute. You can use GET to retrieve the data to se that the node has
been successfully configured (the COSM API key will be visualized as a
number of stars).

View file

@ -1,106 +0,0 @@
Short description on how to set-up a sensor network for global IPv6 addresses.
NOTE: this assumes that you do not have a native IPv6 connection.
You will need:
* PC with Ubuntu (Linux) - 11 or 12 versions
* A node for the RPL-Border-Router (examples/ipv6/rpl-border-router)
* A node for the json webservice (examples/ipv6/json-ws)
Set-up IPv6 tunnel and Border Router
------------------------------------
1. Ensure that you have gogo6c installed.
> sudo apt-get install gogoc
2. Register an account at gogo6 and Freenet6 (http://www.gogo6.com).
The account at Freenet6 is needed by the gogo6c client.
3. Edit the gogoc.conf and set your own Freenet6 user and password by
changing the lines with "userid" and "passwd".
4. Start gogoc at command line
> cd contiki/examples/ipv6/json-ws
> sudo gogoc -f gogoc.conf -n
This will print your prefix - TSP_PREFIX.
In my case TSP_PREFIX=2001:05c0:1517:e400 (prefixlen is 56).
5. Connect one of the nodes to the PC (via USB or serial) and program
it with the RPL-border-router (assumes Z1 node).
> cd contiki/examples/ipv6/rpl-border-router
> make DEFINES=DEFINES=NETSTACK_RDC=nullrdc_driver,NULLRDC_CONF_802154_AUTOACK=1 TARGET=z1 border-router.upload
6. Run tunslip6 which will forward IP from the RPL network to
the IPv6 tunnel (and to the Internet).
> cd contiki/examples/ipv6/rpl-border-router
> make connect-router PREFIX=<TSP_PREFIX>::1/64
When you start this you should get a printout from the border-router
which give you the IPv6 address of it.
Server IPv6 addresses:
2001:05c0:1517:e400:c30c::10a
fe80::c30c:0:0:10a
7. Browse using Mozilla Firefox (or any other browser) to the IPv6 address
given by the border router. This will show you the list of other nodes
connected to the RPL network.
http://[2001:05c0:1517:e400:c30c::10a]/
NOTE: this is a global IPv6 address so it should also be reachable from
any machine on the Internet.
Configuration of COSM submission
--------------------------------
1. Register a COSM account at https://cosm.com/
Set-up a feed and create an API key for the feed.
2. Program the sensor node with (assumes Z1)
> cd contiki/examples/ipv6/json-ws
> make websense-z1.upload WITH_COSM=1 TARGET=z1
3. Check the IPv6 address of the node via the RPL-border router or
by looking at printouts when booting (make login TARGET=z1)
4. You need to configure the node to push data to the COSM feed and
this can be done in several ways. For convenience a Python script
is included that pushes the configuration to the nodes.
Edit the file 'setcosm.py' and replace "<your-key>" and
"<your-feed>" with your COSM API key and COSM feed id. You can then
use this Python script to configure your nodes.
This is an example that configures the node with IP address
2001:05c0:1517:e400:c30c::10b to push data to the COSM feed with
stream 1:
> cd contiki/examples/ipv6/json-ws
> ./setcosm.py [2001:05c0:1517:e400:c30c::10b] 1
Another way to configure the nodes is to use a REST add-on for the
web browser to post a COSM configuration to the node. "REST Client"
for Mozilla Firefox is an example of such add-on.
POST a JSON expression to your node with the following data:
This assumes that you have the feed with id 55180 and want to post
to stream 1 in that feed. The field 'appdata' should be set to the
API key you created at the COSM web site for the feed.
{
"host":"[2001:470:1f10:333::2]",
"port":80,
"path":"/v2/feeds/55180/datastreams/1",
"appdata":"<insert your COSM API key>",
"interval":120,
"proto":"cosm"
}
This will configure the node to periodically push temperature data
every other minute. You can use GET to retrieve the data to se that
the node has been successfully configured (the COSM API key will be
visualized as a number of stars).

View file

@ -1,16 +1,20 @@
This example features a simple webserver running on top of the IPv6
contiki stack on Sky motes to provide sensor values, and with a RPL
border router to bridge the sensor network to Internet.
Sky websense
============
This example features a simple webserver running on top of the IPv6 contiki
stack on Sky motes to provide sensor values, and with a RPL border router to
bridge the sensor network to Internet.
To test the example in COOJA under Linux
----------------------------------------
1. Start COOJA and load the simulation "example-sky-websense.csc"
> make TARGET=cooja example-sky-websense.csc
make TARGET=cooja example-sky-websense.csc
2. Connect to the COOJA simulation using tunslip6:
> make connect-router-cooja
make connect-router-cooja
3. You should now be able to browse to the nodes using your web browser:
Router: http://[aaaa::0212:7401:0001:0101]/
@ -21,16 +25,19 @@ To run the example on real nodes under Linux
--------------------------------------------
1. Program the nodes with the websense application
> make TARGET=sky sky-websense.upload
make TARGET=sky sky-websense.upload
2. Disconnect the nodes and program one node with the RPL border router
> (cd ../rpl-border-router && make TARGET=sky border-router.upload)
cd ../rpl-border-router && make TARGET=sky border-router.upload
3. Connect to the border router using tunslip6:
> make connect-router
make connect-router
4. Reboot the router and note the router IP address
5. You should now be able to browse to your router node using your web
browser: http://[<ROUTER IPv6 ADDRESS>]/. On this page you should
see a list of all accessible nodes with their IP adresses.
5. You should now be able to browse to your router node using your web browser:
http://[<ROUTER IPv6 ADDRESS>]/. On this page you should see a list of all
accessible nodes with their IP adresses.