Note |
---|
This application was feature complete in SMSDK 1.3.0.1. It appears in earlier SMSDK releases with some features not fully functional. |
Introduction
SeeTheMesh is a graphical tool that allows you to visualize the active connections in your mesh network. By viewing a webpage, you can see all the motes in the network, all the parent-child relationships, and how many hops away a particular mote is from the manager. If you wish, you can position the motes by dragging and dropping them on a world map. To be clear, this application does not handle any sensor data; it is purely a network-topology visualization tool.
The SeeTheMesh application connects to the SmartMesh IP Manager and retrieves the topology using Manager API calls.
Running
You can run the SeeTheMesh application by either:
- double-clicking on the Windows executable at
/win/SeeTheMesh.exe
- double-clicking on its source files at
/src/
app/SeeTheMesh/SeeTheMesh.py
(may require additional steps on non-windows OSes)
When the SeeTheMesh application is run, a terminal window will open that says: Web interface started at http://127.0.0.1:8081
By default, the application will search for the IP Manager connected to a serial port. After some time, it should indicate that it has found and connected with a manager (if you have one connected). Open the SeeTheMesh web view by navigating to the URL displayed in the terminal.
Depending on the details of your Python installation, you may need to use pip to install other packages. On a fresh installation, I needed to do:
Code Block |
---|
> pip install requests
> pip install bottle |
Using an existing JsonServer
The SeeTheMesh application uses the JsonServer internally to expose the Manager API. If you have the JsonServer already running, the SeeTheMesh application can use the existing JsonServer instead of starting its own.
To start SeeTheMesh with a running JsonServer:
- edit the
/src/
app/SeeTheMesh/SeeTheMesh.py
file and replace the default "serial" connection on (or near) line 1277 with "JsonServer" - double-click on the source file
Info |
---|
If you are familiar with running the SmartMesh SDK Python applications from the command line, you can use the SeeTheMesh command line option without editing the source file:
|
Description
The SeeTheMesh application connects to the Manager, and iteratively executes API commands to get all the motes and all the over the air paths connecting motes to their parents in the mesh. This data is used to draw a graphical representation of those connections on a webpage, with the default URL of http://127.0.0.1:8081.
The map does not color or otherwise qualify the paths connecting motes, although the data obtainable from the Manager API could be used to do things like that. For example, you might decide to draw strong paths GREEN, and weak paths RED, and medium-quality paths YELLOW. The intent of this application is to illustrate a starting point for an open-source, free topology viewer tool that visualizes the SmartMesh network.