The Java Compiler Compiler JavaCC, version 4.1 or higher.
The GNU development toolchain for the AVR architecture (avr-binutils, avr-gcc, avr-libc).
For the demo application, you additionally need a tool for performing conversations
on a TCP/IP connection such as netcat or telnet.
On Ubuntu 12.04, these can be installed by running
To prepare KESO for being used, you need to extract the tarball and
setup the environment. The following example commands and the setup
script provided with KESO require a bash shell.
Download the demo bundle
and store it to a directory that you want to extract KESO to.
Open a shell, change to the directory and extract the package:
Unpack the downloaded archive, which will create the directory keso:
$ tar xzf keso_demobundle.tar.gz
$ cd keso
The contents of the archive well be unpacked to a new subdirectory keso.
Set your JDK path variable, if using a system setup different from Ubuntu Linux/OpenJDK 6.
$ export JDK={your JDK path}
To setup the needed environment variables inside the active shell, source the
script and ensure that the script does not report any errors:
To compile jino and run it to translate the Java sources of the
demo application to C code, change to the src directory and run GNU make
$ cd src
$ make
The created C sources will be stored in the subdirectory tmp/TrafficLight_Mica2.
Change to that directory and run GNU make to compile the C source code to a binary image that is ready to be loaded onto a MICA2 sensor node.
avrora waits for a TCP connection on port 2390 which will be the remote for the serial port of the MICA2 node.
Open up another shell window and connect (example used netcat):
$ nc localhost 2390
You should now see the greeting of the demo application output by the netcat
command and can now send commands to the application by typing to the netcat
window.
The only supported command is the request for a signal switch, which is issued by typing the character S and the enter key.
The switch request is either accepted or rejected by the control application, depending on whether the traffic light is currently in the red state or not. In either case, the application will give feedback on the serial port.