OpenVisualizer is the primary tool for plugging your OpenWSN network into the Internet.
Features
- Connects your OpenWSN network to the Internet over a virtual interface (both Windows and Linux).
- portable across popular operating systems.
- Shows the internal state (neighbor table, scheduling table, queue, etc.) of each node physically connected to the OpenVisualizer.
- Displays errors reported by motes.
- can run with either physical motes, or emulated motes (for details, see OpenSim)
Installation
Prerequisites
Package | Role | Installation Notes |
---|---|---|
Python | implementation language | Using v2.7. v3.x not supported yet. |
PySerial | serial to mote | Using v2.6. |
PyWin32 | tunnel dependency (Windows only) | Using Build 218. Be sure to review README.txt at the download site to retrieve the proper version. |
SCons | tool execution | Using v2.3. |
TAP for Windows | IPv6 tunnel driver (Windows only *) | Using 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). |
serial to mote | ||
Silicon Labs CP2102 UART-to-USB bridge | serial to mote (e.g. GINA) | For Windows, download CP210x VCP Windows driver. Use the default options. If successful, Windows shows two new programs (Control Panel > Programs > Programs and Features):Silicon Laboratories CP320x USB to UART Bridge (Driver Removal) Silicon Laboratories CP320x VCP Drivers for Windows XP/2003 Server/Vista/7 |
* 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.
The --trace
option provides internal memory profiling of OpenVisualizer itself, and requires yappi.
Download
Package | Role | Installation Notes |
---|---|---|
openwsn-sw | OpenVisualizer software | Download zip or clone with Git. Typically, we use the develop branch as our common development base. |
openwsn-fw | Firmware header files required by openwsn-sw | Download 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 . |
Running it
The OpenVisualizer consists of core modules, and several types of user interfaces:
- a graphical user interface (GUI)
- a command-line interface (CLI)
- a web interface
You can use whichever user interface suits you best. The choice of user interface does not impact the function of the core module.
You start the OpenVisualizer in several ways:
- by invoking the Python script directly (or double-clicking on it)
- by using SCons
graphical user interface
You have two options to start it:
- double-click on
openwsn-sw/software/openvisualizer/bin/openVisualizerApp/openVisualizerGui.py
enter the following command from
openwsn-sw/software/openvisualizer/
:scons rungui
The user interface looks like this:
Code Organization
Modules
- openVisualizerGui.py is the master module. It can be run against real or simulated motes (see OpenSim). It lists all the connected motes 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 dispatches 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. - openVisualizerGui.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. - StackDefines.py is used by ParserInfoErrorCritical.py to translate error and status code into human-readable text.