Versions Compared

Key

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

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.

...

  • compile and run OpenWSN in simulation mode, ping a simulated mote, and interact with it over CoAP.
  • program a TelosB OpenMote-CC2538 mote, connect it to your computer, ping it, and interact with it over CoAP.

Info
titleWhat to bring?
  • a computer running Linux with root access. This page is written with Ubuntu 1218.10 Quantal.
  • optionally, two TelosB motes to play with real hardware.

...

...

Code Block
languagebash
~$ 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-swopenvisualizer.git
[...]
~/Desktop/openwsn$ git clone https://github.com/openwsn-berkeley/coap.git
[...]

...

Code Block
languagebash
~$ cd Desktop/
~/Desktop$ cd openwsn/
~/Desktop/openwsn$ cd openwsn-swopenvisualizer/
~/Desktop/openwsn/openwsn-sw$openvisualizer$ git pull
Already up-to-date.
~/Desktop/openwsn/openwsn-sw$openvisualizer$ cd ..
~/Desktop/openwsn$ cd openwsn-fw/
~/Desktop/openwsn/openwsn-fw$ git pull
Already up-to-date.

...

Tip
titleOops!

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

Code Block
languagebash
~/Desktop/openwsn/openwsn-swopenvisualizer/$ sudo pip install -r requirements.txt
~/Desktop/openwsn/coap/$ sudo pip install -r requirements.txt


Info

The current version of pip 8.1.2 has some changes on the source code, which may cause the error: AttributeError: 'Requirement' object has no attribute 'project_name' when use the -r option to install the packages, . If this error happens, try to install those packages one by one as shown previously.


PySerial is also required and it's available in Debian/Ubuntu. you need to install the PySerial if it's not installed on your machine.

Code Block
languagebash
~/Desktop/openwsn/openwsn-sw/software/openvisualizer$ sudo pip install PySerial


...

Code Block
languagebash
~/Desktop/openwsn/openwsn-sw/software/openvisualizer$ sudo scons runweb --sim
scons: Reading SConscript files ...

 ___                 _ _ _  ___  _ _ 
| . | ___  ___ ._ _ | | | |/ __>| \ |
| | || . \/ ._>| ' || | | |\__ \|   |
`___'|  _/\___.|_|_||__/_/ <___/|_\_|
     |_|                  openwsn.org

scons: done reading SConscript files.
scons: Building targets ...
Copy("bin/openVisualizerApp/sim_files", "../../../openwsn-fw/bsp/boards/python/openwsnmodule_obj.h")
Mkdir("bin/openVisualizerApp/sim_files/linux")
Copy("bin/openVisualizerApp/sim_files/linux/oos_openwsn-x86.so", "../../../openwsn-fw/build/python_gcc/projects/common/oos_openwsn.so")
Copy("bin/openVisualizerApp/sim_files", "../../../openwsn-fw/build/python_gcc/projects/common/oos_openwsn.sopyd")
Delete("build/runui/web_files")
Mkdir("/home/tengfeithomas/Desktop/openwsn/openwsn-sw/software/openvisualizer/build/runui")
Copy("build/runui/web_files", "bin/openVisualizerApp/web_files")
Delete("build/runui/sim_files")
Mkdir("/home/tengfeithomas/Desktop/openwsn/openwsn-sw/software/openvisualizer/build/runui")
Copy("build/runui/sim_files", "bin/openVisualizerApp/sim_files")
uiRunner(["bin/openVisualizerApp/openVisualizerWeb"], ["bin/openVisualizerApp/openVisualizerWeb.py"])
ioctl(TUNSETIFF): Device or resource busy

created following virtual interface:
6: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/none 
    inet6 bbbb::1/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link 
       valid_lft forever preferred_lft forever
21:57:51 INFO create instance
21:57:51 INFO create instance
21:57:51 INFO create instance
21:57:51 INFO create instance
21:57:51 INFO create instance
21:57:51 INFO create instance
21:57:51 INFO create instance
21:57:51 INFO create instance
21:57:51 INFO create instance
OpenVisualizer
web interface started at  0.0.0.0: 8080
enter 'qquit' to exit
> 21:57:51 INFO 3 [OPENWSN] booted
21:57:51 INFO 2 [OPENWSN] booted
21:57:51 INFO 1 [OPENWSN] booted

...

Code Block
languagebash
~/Desktop/openwsn/openwsn-sw/software/openvisualizer$ ping6 -s 10 bbbb::1415:92cc:0:2
PING bbbb::1415:92cc:0:2(bbbb::1415:92cc:0:2) 56 data bytes
64 bytes from bbbb::1415:92cc:0:2: icmp_seq=1 ttl=64 time=51.1 ms
64 bytes from bbbb::1415:92cc:0:2: icmp_seq=2 ttl=64 time=134 ms
64 bytes from bbbb::1415:92cc:0:2: icmp_seq=3 ttl=64 time=137 ms
64 bytes from bbbb::1415:92cc:0:2: icmp_seq=4 ttl=64 time=101 ms
^C
--- bbbb::1415:92cc:0:2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 51.172/106.146/137.486/34.713 ms

...

Code Block
languagebash
~/Desktop/openwsn/openwsn-sw/software/openvisualizer$ ping6 -s 10 bbbb::1415:92cc:0:3
PING bbbb::1415:92cc:0:3(bbbb::1415:92cc:0:3) 10 data bytes
18 bytes from bbbb::1415:92cc:0:3: icmp_seq=1 ttl=63 time=80.1 ms
18 bytes from bbbb::1415:92cc:0:3: icmp_seq=2 ttl=63 time=105 ms
18 bytes from bbbb::1415:92cc:0:3: icmp_seq=3 ttl=63 time=94.0 ms
18 bytes from bbbb::1415:92cc:0:3: icmp_seq=4 ttl=63 time=147 ms
^C
--- bbbb::1415:92cc:0:3 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3001ms
rtt min/avg/max/mdev = 80.115/106.887/147.964/25.359 ms

...

Code Block
languagebash
thomas@Thomas-X61s:~/Desktop/openwsn/openwsn-sw/software/openvisualizer$ sudo scons runweb
scons: Reading SConscript files ...
 ___                 _ _ _  ___  _ _ 
| . | ___  ___ ._ _ | | | |/ __>| \ |
| | || . \/ ._>| ' || | | |\__ \|   |
`___'|  _/\___.|_|_||__/_/ <___/|_\_|
     |_|                  openwsn.org
scons: done reading SConscript files.
scons: Building targets ...
Delete("build/runui/web_files")
Mkdir("/home/thomas/Desktop/openwsn/openwsn-sw/software/openvisualizer/build/runui")
Copy("build/runui/web_files", "bin/openVisualizerApp/web_files")
Delete("build/runui/sim_files")
Mkdir("/home/thomas/Desktop/openwsn/openwsn-sw/software/openvisualizer/build/runui")
Copy("build/runui/sim_files", "bin/openVisualizerApp/sim_files")
uiRunner(["bin/openVisualizerApp/openVisualizerWeb"], ["bin/openVisualizerApp/openVisualizerWeb.py"])
Child PID is 2820
scons: done building targets.
thomas@Thomas-X61s:~/Desktop/openwsn/openwsn-sw/software/openvisualizer$ ioctl(TUNSETIFF): Device or resource busy
created following virtual interface:
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/none 
    inet6 bbbb::1/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link 
       valid_lft forever preferred_lft forever

...