Versions Compared

Key

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

...

Gliffy
imageAttachmentIdatt287899649
baseUrlhttps://openwsn.atlassian.net/wiki
nameopenvisualizer_interfaces Copy Copy Copy
migration1
diagramAttachmentIdatt287932417
containerId688200

Gliffy
imageAttachmentIdatt145781104
baseUrlhttps://openwsn.atlassian.net/wiki
nameopenvisualizer_interfaces Copy Copy
migration1
diagramAttachmentIdatt145781100
containerId688200

Gliffy
imageAttachmentIdatt144677929
baseUrlhttps://openwsn.atlassian.net/wiki
nameopenvisualizer_interfaces Copy
migration1
diagramAttachmentIdatt144677933
containerId688200

OpenVisualizer is the OpenWSN primary tool for visualization, debugging and simulation of the motes. It's a set of python scripts designed to aid in the debugging process, or simply serve as a visualization platform. OpenVisualizer supports the following features:

...

plugging your OpenWSN network into the Internet.

Table of Contents

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

Image Removed

To 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

...

  • 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

Gliffy
nameopenvisualizer_interfaces

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/:

    Code Block
    scons rungui
    Expand
    titleFull output...
    Code Block
    C:\Users\Thomas\Desktop\openwsn-sw\software\openvisualizer>scons rungui
    scons: Reading SConscript files ...
     ___                 _ _ _  ___  _ _
    | . | ___  ___ ._ _ | | | |/ __>| \ |
    | | || . \/ ._>| ' || | | |\__ \|   |
    `___'|  _/\___.|_|_||__/_/ <___/|_\_|
         |_|                  openwsn.org
    scons: done reading SConscript files.
    scons: Building targets ...
    uiRunner(["bin\openVisualizerApp\openVisualizerGui"], ["bin\openVisualizerApp\openVisualizerGui.py"])
    scons: done building targets.

usage

The "motes" top menu lists all the motes connected to the OpenVisualizer (either physically over a serial port, or as emulated motes):

Image Added

Info

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/:

    Code Block
    scons runcli
    Expand
    titleFull output...
    Code Block
    C:\Users\Thomas\Desktop\openwsn-sw\software\openvisualizer>scons runcli
    scons: Reading SConscript files ...
     ___                 _ _ _  ___  _ _
    | . | ___  ___ ._ _ | | | |/ __>| \ |
    | | || . \/ ._>| ' || | | |\__ \|   |
    `___'|  _/\___.|_|_||__/_/ <___/|_\_|
         |_|                  openwsn.org
    scons: done reading SConscript files.
    scons: Building targets ...
    uiRunner(["bin\openVisualizerApp\openVisualizerCli"], ["bin\openVisualizerApp\openVisualizerCli.py"])
    OpenVisualizer  (type "help" for commands)
    >

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/:

    Code Block
    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):

Image Added

Info

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

Gliffy
size700
nameOpenVisualizerArch

...

Modules

  • openVisualizerGui.py is  is the master module. It can be run in "against real " or "simulator" modeor simulated motes (see OpenSim). It lists all the connected nodes (real or emulated) through a serial port 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 dispatch  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. 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
  • openVisualizerGui.py handles  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.