Tutorial
From REM
Run SerialForwarder.
Change directories into your TinyOS Java tools and start the Serial Forwarder using the following commands:
cd $TOSROOT/tools/java java net.tinyos.sf.SerialForwarder -port 9009 –comm serial@COM3:telos &
Note the port is set to 9009, the default REM port, rather than the default SerialForwarder port 9001. Note your COM port value may be different. To find out which COM port your mote connects to, use the motelist application. Note the ‘&’ executes the SerialForwarder as a background process in the shell, allowing you to keep use the shell for other purposes.
Run REM.
REM is intended to be initialized from the command line using the local Java VM. The REM Java software currently is in the net.rem package. The two supported platforms (PC and NSLU2 w/ OpenSlug) have different virtual machines and require different command line calls.
Run on PC Platform using Cygwin or Command Prompt Move into the directory in your Java classpath that contains the REM java sub-directory. For example, if you place the REM java files into the TinyOS $TOSROOT/tools/java/net/tinyos/ directory, you would go $TOSROOT/tools/java by using the command
cd $TOSROOT/tools/java
Start the REM environment using your Java VM to invoke the ResidentialEnergyManager class file by typing the following command line.
java net.rem.ResidentialEnergyManager -h
Run using JamVM (for NSLU2 platform with OpenSlug). Move into the directory in your Java classpath that contains the REM java sub-directory. For example, if you place the REM java files into the TinyOS /home/java/net/tinyos/ directory, you would go /home/java by using the command
cd /home/java
Start the REM environment using your Java VM call to the ResidentialEnergyManager class file by typing in the command line:
/opt/bin/jamvm net.rem.ResidentialEnergyManager -h
Parameters and Optional Flags
The previous call will default to printing out help information. The REM system expects certain flags for basic operation. The user can flag –h for help to get specific flag options. Each operational flag requires a value and are separated by spaces. The deployment name, platform type, thermostat type, and thermostat control algorithm are flags. See the supported platform types, thermostat types, and thermostat algorithms. For example, the following command line input will start a REM environment called “Test” that is on a PC platform, using the Lux1500 thermostat with the Standard strategy:
Java net.rem.ResidentialEnergyManager –d Test –p PC –t Lux1500 –s Standard
