Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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.

 

Info
titleWhat to bring?
  • a computer running Windows. This page is written with Windows 7 Professional.
  • optionally, two TelosB motes to play with real hardware.

...

 

Tip
titleOops!

Before you can go on, you need to install a Git client. Any client will do, but we will use tortoisegit.

Once you've installed it, it will integrate nicely with your Windows explorer.

We will download these repositories side-by-side in an openwsn/ directory in your desktop using Git.on your desktop using Git:

You now have:

Image Added

At any time you can make sure you are running the latest code by right-clicking on each folder, and choosing Git Pull....

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 know what's going on.

Tip
titleOops!

Before you can go on, you need to install mingw, which gives you all of the build tools to build the firmware:

  • Download from http://www.mingw.org/
  • Install at C:\MingGW\
  • Add C:\MinGW\bin to your PATH environment variable
  • Verify you can call the gcc command:

    Code Block
    languagebash
    C:\Users\Thomas>gcc --version
    gcc (GCC) 4.8.1
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

Tip
titleOops!

Before you can go on, you need to install Python:

  • Download Python 2.7.x from https://www.python.org/(NOT Python 3!)
  • Add the following directories to your PATH environment variable:
    • C:\Python27
    • C:\Python27\Scripts
  • Verify you can call python:

    Code Block
    languagebash
    C:\Users\Thomas>python --version
    Python 2.7.5