Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reworked installation and download instructions

...

  • shows the internal state (neighbor table, scheduling table, queue, etc.) of each node connected to the interface;
  • displays the multi-hop graph (not-implemented yet);
  • translate error codes into human-readable sentences;
  • buttons allows a use to trigger the sending of a packet;
  • *New! * nodes can be connected either locally or remotely as an OpenVisualizer probe;
  • *New! * provides a simulator in order to test the functionalities of the OpenWSN stack (testing and develop purpose).

Running it

Important: OpenVisualizer is sensitive to its directory structure. OpenVisualizer displays any potential errors that a mote may throw over serial or IP. It does this efficiently by scanning the openwsn.h file for error codes. The best way to make sure that this setup works, is by simply checking out the entire OpenWSN project from the SVN. Otherwise, please make sure that the following holds:

OpenVisualizer should be placed in: (your openwsn-sw directory)/software/openvisualizer/bin/openVisualizerGui/

openwsn.h should be located in: (your openwsn-fw directory)/firmware/openos/openwsn/

The OpenVisualizer Window is depicted on the right. By default, the right pannel is closed. The numbers under the graph at the 16-bit short identifiers of the nodes connected via USB to the application. Click on any checkbutton will open the corresponding frame in the right panel. Each of these frames shows the internals of the nodes, including a few button to force it to send an ICMPv6 echo, a UDP or a TCP packet. In each table, the line which was just updated is displayed with a yellow background. The lower-left part of the window contains the errors reported by the nodesTo run OpenVisualizer, double click on openVisualizerGui.py, or via command line:

 

Code Block
languagetext
C:\develop\openwsn-sw\software\openvisualizer\bin\openVisualizerGui> python openVisualizerGui.py

Must run as Administrator under Windows, or as superuser on Linux.

Installation

Prerequisites

PackageRoleInstallation Notes
Pythonimplementation languageUsing v2.7. v3.x not supported yet.
PySerialserial to moteUsing v2.6.
TAP for Windows
(Windows only *)
IPv6 tunnel driverUsing v9.9.2. When selecting components, include TAP Utilities as well as the adapter itself.
The TUN interface on Windows requires some configuration. Follow our tun/tap for Windows tutorial, specifically the Install tun page and the Configure tun page (perform Computer B steps).

PyWin32
Python Extensions for Windows
(Windows only)

tunnel dependencyUsing Build 218. Be sure to review README.txt at the download site to retrieve the proper version.

FTDI USB/Serial driver

serial to moteTelosB specific?

* On Linux, TUN/TAP already is included with the operating system, and OpenVisualizer configures it on the fly. See our TUN/TAP in Linux page for more information.

Download

PackageRoleInstallation Notes
openwsn-swOpenVisualizer softwareDownload zip or clone with Git. Typically, we use the develop branch as our common development base.
openwsn-fwFirmware header files required by openwsn-swDownload zip or clone with Git.
Must install in a sibling directory to openwsn-sw. So, if software is in C:\develop\openwsn-sw, then firmware must be in C:\develop\openwsn-fw.

Code Organization

Gliffy
size700
nameOpenVisualizerArch
The image to the left shows how the code is organized. Each rectangle represents a file in the OpenVisualizer directory:

Implementation modules

  • openVisualizerGui.py is the master module. It can be run in "real" or "simulator" mode. It lists all the connected nodes (real or emulated) through a serial port and, for each, spawns a different execution thread.
  • moteProbe.py contains the code which is executed by each thread. Whenever data is received from the mote, it is passed along to Parser.py.
  • Parser.py dispatch all the data it receives to respective parser module. In case a frame of Status/Error/ErrorCritical is received from the serial port, ParserInfoErrorCritical.py calls the corresponding display* function from moteState.py. In case it receives a request to send data from a mote (see Serial Format thread in this section), it asks the correct openSerial.py thread to answer accordingly.
  • moteState.py handles everything which is related to the graphical user interface. It is solely based on TkInter, the graphical interface which ships by default with Python. A single semaphore is used to arbitrate the access to the graphic elements.
  • openType.py  lists the variables which need to be accessed by multiple modules, such as the handlers of the different threads.
  • StackDefines.py is used by ParserInfoErrorCritical.py to translate error and status code into human-readable text.