Friedrich-Alexander-Universität UnivisSearch FAU-Logo
Techn. Fakultšt Willkommen am Department Informatik FAU-Logo
Logo I4
Department of Computer Science 4
Documentation
  Hello World: First Steps
  Toolchain
  Raw Memory Access
  Inter-Domain Comm.
  Service Protection
  CiAO backend
  core module API

first steps
  System Requirements
  Setup Environment
  Compile Demo
  Run Demo
Dept. of Computer Science  >  CS 4  >  Research  >  KESO  >  Documentation  >  first steps
Getting started with KESO

This guide provides help to get started using KESO running the TrafficLight Demo Application.

This guide may not be complete. If you find something missing in this guide, please notify us.

The demo package is available here. The package contains the source code of KESO and tested binary versions of JOSEK and avrora.

Install Required Software

A Linux system with common development utilities is assumed (tested on Ubuntu 12.04 Desktop Edition):
  • GNU make, which is used as build system for KESO.
  • A Sun-compatible Java Development Kit (JDK), version 6 or higher (tested with OpenJDK 6 and 7).
  • 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

$ sudo apt-get install openjdk-6-jdk javacc binutils-avr gcc-avr avr-libc netcat-openbsd

Set Up the Environment

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:

$ source bin/setup.bash

Compile the Demo Application

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.

$ cd tmp/TrafficLights_Mica2/ $ make

Run the Demo Application

To run the demo application in the avrora simulator, type:

$ avrora -platform=mica2 -monitors=real-time,leds,serial,c-print -VariableName=keso_avrora_cprint_buf -max=64 keso_main_g.elf

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.

  Imprint   Privacy Last modified: 2014-01-15 12:24   CPE