OpenVisualizer
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
See the Installation and Dependencies page to download and install OpenVisualizer. The page also describes required libraries and tools.
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 (GUI)
starting
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
usage
The "motes" top menu lists all the motes connected to the OpenVisualizer (either physically over a serial port, or as emulated motes):
By default, none of the motes act as the DAG root. The DAGroot (see RFC6550) is the gateway of your OpenWSN network. It is both the root of the routing and synchronization Directed Acyclic Graphs (DAGs). You need exactly one DAGroot in your OpenWSN network, and it can be any OpenWSN node.
From the "motes" top menu, select the mote to be used as a DAG root and the "toggle" button. The other motes will now synchronize to it and form a DAG.
command line interface (CLI)
starting
You have two options to start it:
- double-click on
openwsn-sw/software/openvisualizer/bin/openVisualizerApp/openVisualizerCli.py
enter the following command from
openwsn-sw/software/openvisualizer/
:scons runcli
usage
The following commands are available:
- TODO
web interface
The web interface is provided by a server application, and of course a browser to view the UI. At present, both server and browser must be on the same host computer.
starting
You have two options to start it:
- double-click on
openwsn-sw/software/openvisualizer/bin/openVisualizerApp/openVisualizerWeb.py
enter the following command from
openwsn-sw/software/openvisualizer/
:scons runweb
By default, the server listens on port 8080 on all network interfaces. The command line accepts options for alternate values. Run
scons --help
for details.
usage
To get started, point your browser to the following URL: http://localhost:8080. The web user interface includes the same information as the GUI described above; however, most of the information is grouped under three tabs. See the screenshot below.
The "motes" dropdown lists all the motes connected to the OpenVisualizer (either physically over a serial port, or as emulated motes):
By default, none of the motes act as the DAG root. The DAGroot (see RFC6550) is the gateway of your OpenWSN network. It is both the root of the routing and synchronization Directed Acyclic Graphs (DAGs). You need exactly one DAGroot in your OpenWSN network, and it can be any OpenWSN node.
From the "motes" top menu, select the mote to be used as a DAG root and the "toggle" button. The other motes will now synchronize to it and form a DAG.
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.