Introduction
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.exe
- by 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
Note |
---|
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
|
name of the state | description |
---|---|
WAITFORINITIALNOTIF | Wait for possible notifications, such as a BOOT notification is the SmartMesh IP Mote was just reset. This state is left after a given timeout, regardless of whether a notification was received. |
ASSESSMOTESTATE | Evaluate the current mote's state:
|
CONFIGURE | A transition state. |
CONFIGURING_DC | Configure the join duty cycle to 100%. |
CONFIGURED | A transition state. When reaching this state, the SmartMesh IP Mote is configured and ready to join the network. |
SEARCHING | Issue a join command. Wait to receive an advertisement from the network (a JOINSTART event notification). |
JOINREQUESTSENT | Wait for the SmartMesh IP Mote to become operational (an OPERATIONAL event notification). |
OPERATIONAL | Wait for the base bandwidth to be in place (a SVC_CHG event notification). |
JOINED | A transition state. When reaching this state, the SmartMesh IP Mote is part of the network. |
REQUESTINGSERVICE | Request service to the manager. Wait to receive an indication that the service was installed (a |
SERVICEGRANTED | A transition state. When reaching this state, the SmartMesh IP Mote has obtained its service and can start sending data. |
OPENSOCKET | Open a UDP socket. |
BINDSOCKET | Bind that socket to UDP port 60000. |
READYTOSEND | 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.
Tip |
---|
Sending to the manager simply means sending data to the manager's well-known IPv6 address (ff02::2 , or ff020000000000000000000000000002 when written out). |
Note |
---|
This application is meant to be used in conjunction with the SensorDataReceiver application connected to the Manager. |
Note |
---|
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. |