Upstream
Introduction
The Upstream application takes the SmartMesh IP Mote through the joining, service request, and socket binding state machines, and allows the user to enter dummy "sensor" data and send it to the SmartMesh IP Manager or any Internet host.
It connects to:
The SmartMesh IP Mote running in slave mode.
Running
You can run the Upstream application:
by double-clicking on the Windows executable at
/win/Upstream.exeby double-clicking on its source files at
/src/bin/Upstream/Upstream.py
Description
Upstream consists of three frames:
the mote connection frame allows you to connect the application to a SmartMesh IP Mote.
the join state machine frame shows the current state of the mote as it joins (states described below). The right-most column shows the time spent in each state.
the sensor data to send frame allows the user to choose a 16-bit value (mimicking a sensor), and to send that data to either the manager, or a host on the Internet.
Joining states
For the SmartMesh IP Mote to go to all following states, you need to reset it before connecting this Upstream application. You can do so by
sending a
resetcommand using the APIExplorer application, orusing the
resetCLI command, orpowering the SmartMesh IP Mote off, then on.
name of the state | description |
|---|---|
| Wait for possible notifications, such as a |
| Evaluate the current mote's state:
|
| A transition state. |
| Configure the join duty cycle to 100%. |
| A transition state. When reaching this state, the SmartMesh IP Mote is configured and ready to join the network. |
| Issue a |
| Wait for the SmartMesh IP Mote to become operational (an |
| Wait for the base bandwidth to be in place (a |
| A transition state. When reaching this state, the SmartMesh IP Mote is part of the network. |
| Request service to the manager. Wait to receive an indication that the service was installed (a |
| A transition state. When reaching this state, the SmartMesh IP Mote has obtained its service and can start sending data. |
| Open a UDP socket. |
| Bind that socket to UDP port 60000. |
| The final state of the joining process. |
Sending sensor data
The "sensor data to send" frame is only active when the mote has reached the READYTOSEND state. Once that state is reached, you can set a sensor value, and decide to send:
to the manager by pressing the sendto manager button.
to a host on the Internet by specifying its IPv6 address, and pressing the send to host button.
Sending to the manager simply means sending data to the manager's well-known IPv6 address (ff02::2, or ff020000000000000000000000000002 when written out).
This application is meant to be used in conjunction with the SensorDataReceiver application connected to the Manager.
For the data to be able to be sent into the Internet, the manager needs to be connected the Low-Power Border Router using the LBRConnection application.