btTools / avetanaBluetooth HOWTO

Google

This is an unofficial HOWTO, any mistakes or errors are purely by me and nothing to do with the guys at avetana. This guide will help you compile and install the avetana libraries for Linux. Thank you avetana for providing us with a free library to play with. You can visit them here.

First, you need to get the source codes from their Sourceforge site or CVS. If you're getting the CVS version you're on your own, ^.^. Get the source codes from here.

Extract the file to a temporary directory.

Compiling the C library.
Change to the sources, then c directory. Edit the Makefile and change the JDK_HOME and compiler settings to your system. Here are my settings:

# C Compiler to use
CC             = g++

# Location of the JDK, since we require files in the java/include directory.
JDK_HOME       = /opt/sun-jdk-1.4.2.08/

# Platform. This is the name of the folder in the java/include directory.
JDK_PLATFORM   = linux

Then just run the make command.

Compiling the Java library.
I assume (and hope, ^.^) you're using Eclipse. It only speeds up this process by about a 100 times.

Start a new project, name it anything, say avetanaBluetooth. Import all the sources from sources/de and sources/javax. Next you need to import the C library that you've compiled just now.

Finally export your project into jar. A good tutorial can be found here.

Done.
To use the library, right click on your project. Click on properties and select Java Build Path. Click on Libraries tab. If you're imported the library, then click on Add JARs or if its still somewhere in your harddisk, click on Add External JARs.




[ BACK ]



by renyi