...
Although the LBR is the messaging client, the GUI must make the initial contact to the LBR to establish a tunnel for communication. It simply is not feasible to expect a PC user to open a port for access, even ports 80/443. However, we plan to use a reverse SSH tunnel, as shown in the diagram above. The reverse nature of the tunnel allows the LBR to access the server port on the GUI host.
We implement messaging with the bi-directional WebSockets (RFC 6455) , as a bi-directional messaging protocol, supports our requirements. As a standard, it also supports OpenWSN's implementation approach. The LBR includes a UI Proxy component that pushes mote status reports and event counts, and receives notification of UI events. We encapsulate this messaging in JSON, as described in detail later on this page.
Implementation Tools
LBR
Role | Tool | Notes |
---|---|---|
WebSocket client | websocket-client | v0.11; Installed with pip. |
...
For reference, installed on Windows 7 Home Professional. Also installed pip, v1.3.1 for component setup, which also required setuptools, and where we used v0.7.7.
JSON Messages
JSON provides a convenient and widely accepted mechanism for implementation of the structured messages we must pass between LBR and GUI host. Messages include:
Message | Description |
---|---|
mote-inventory | A list of the connected motes. Sent just after establishing the connection to the GUI host |
mote-status | A dictionary of the elements of a Mote Status report. Like OpenVisualizer, these reports are generated at some defined rate. |
event-count | A dictionary of the current count of events |
Messaging Between Processes
On As future work on an embedded LBR, we plan to use the native POSIX message queue for inter-process messaging, due to its built-in availability. The posix_ipc module for Python provides access to this functionality.
...