Installing and configuring SAL
How to install and setup SAL on a sensor gateway
Installing SAL
Make sure a jvm is installed (see this page).
Download SAL
Download SALv1 using Subversion as sensor_user
Build SAL
...
Setup SAL
Support for Serial ports
Download JavaComm API from here. Unpack.
Copy commapi/lib/*.so to //usr/lib/jvm/java-6-sun-X-Y-Z/jre/lib/i386/
Copy commapi/jar/comm.jar to SALv1/lib
Copy commapi/docs/javax.comm.properties to SALv1/lib
Edit SALv1/lib/javax.comm.properties and make sure it matches the hardware
Test with "java -cp SALv1/bin:SALv1/lib/comm.jar jcu.sal.Components.EndPoints.SerialEndPoint". The recognised serial ports should be listed.
Setup DBUS JAVA bindings
Make sure DBus and HAL are installed. Otherwise install with: (may need to add "testing" to the list of repos)sudo apt-get install dbus halDownload the helper libraries from this website.
Compile & install using:
makeBy default, this install JAR files in /usr/local/share/java and JNI libs in /usr/local/lib/jni
sudo sh -c 'CFLAGS="-std=c99 -I/usr/lib/jvm/java-6-sun/include/ -I/usr/lib/jvm/java-6-sun/include/linux" JCFLAGS="-source 6" make install'
Download the DBUS java bindings from the DBUS website.
Install the docbook-to-man and gettext packages
sudo apt-get install docbook-to-man gettextEdit the Makefile and change "JAVAUNIXLIBDIR" and "JAVAUNIXJARDIR" to /usr/local/...
# Installation directory of the java-unix libraries
JAVAUNIXLIBDIR?=/usr/local/lib/jni
# Installation directory of the java-unix jars
JAVAUNIXJARDIR?=/usr/local/share/java
Compile and install libdbus-java with
make
sudo sh -c 'JAVAUNIXLIBDIR=/usr/local/lib/jni JAVAUNIXJARDIR=/usr/local/share/java make install'