This page is under construction.
Contact Thomas Watteyne to speed things up.
If you are completely new to OpenWSN, and you are using Linux, read this page first. It will walk you through all the steps to install OpenWSN and explore a number of key features.
In particular you will:
- compile and run OpenWSN in simulation mode, ping a simulated mote, and interact with it over CoAP.
- program a TelosB mote, connect it to your computer, ping it, and interact with it over CoAP.
what to bring
You will need:
- a computer running Linux with root acess.a This page is written with Ubuntu 12.04.4 LTS.
- optionally, two TelosB motes to do the hard tests
At the time of writing, we are using the latest and greatest of all software. Undoubtedly, this will become outdated very fast. If you see something out of the date, take action! Send an e-mail to Thomas Watteyne to get this page update. Thanks!
Download OpenWSN
The OpenWSN is a collection of repositories hosted on GitHub. We will download and use the following:
- https://github.com/openwsn-berkeley/openwsn-fw holds the firmware source code which runs on the (possibly emulated) motes
- https://github.com/openwsn-berkeley/openwsn-sw holds the software source code which runs on your computer
- https://github.com/openwsn-berkeley/coap is a Python module which implements CoAP
We will download these repositories side-by-side in an openwsn/
directory in your desktop using Git.
~$ cd Desktop/ ~/Desktop$ mkdir openwsn ~/Desktop$ cd openwsn/ ~/Desktop/openwsn$ git clone https://github.com/openwsn-berkeley/openwsn-fw.git [...] ~/Desktop/openwsn$ git clone https://github.com/openwsn-berkeley/openwsn-sw.git [...] ~/Desktop/openwsn$ git clone https://github.com/openwsn-berkeley/coap.git [...]
Running a Simulation
Frankly, it's a bit strange to start using OpenWSN with a simulation, since the firmware is really meant (and written) to run on real motes. But, not everyone has hardware, not always the same hardware, etc. So to make things nice and easy, we'll start by simulation. Oh, and the simulated code behaves exactly the same as the real code, so what you see now is what you'll get with real hardware.
Prepare
Before we can start running a simulation, we need to compile the firmware as a Python extension. This is all explained in the OpenSim page if you want to konw what's going on.
Oops!
Before you can go on, you need to install SCons:
~/Desktop/openwsn$ pip install scons
Oops!
Before you can go on, you need to install the Python header files:
~/Desktop/openwsn/openwsn-fw$ sudo apt-get install python-dev
~/Desktop/openwsn$ cd openwsn-fw/ ~/Desktop/openwsn/openwsn-fw$ scons board=python toolchain=gcc oos_openwsn
This step compile the complete OpenWSN firmware as a Python extension module (a form of shared library) which the simulation environment can import at run-time.
The extension module is at poipoi
, no need to move it.
Now with real hardware
TODO
What's next?
TODO