- To find out if e-AR lite sensor is detected
>lsusb
or for more details:
>lsusb -vv
Note: e-AR Lite will appears as "Nordic Semiconductor...."
- Need to install some software first before building the Java LibUSB library
- install the ant first
>sudo apt-get install ant
- download the libusb-1.0.8 from sourceforge.net/projects/libusb.files and extract it to /opt/.
> cd /opt/libusb-1.0.8
> ./configure (to configure the package for the system)
> sudo make install
- download the libusb-compat-0.1.3 and extract it to /opt/
> cd /opt/libusb-compat-0.1.3
> ./configure
> sudo make install
- download the libusb-legacy and extract it to /opt/
> cd /opt/libusb-0.1.12
> ./configure
> sudo make install
- need to install Java jdk as well
> sudo apt-get install openjdk-7-jdk
- find out the java update alternatives
> sudo update-java-alternatives -list
- set the update alternative
> sudo update-java-alternatives -set java-1.7.0.-openjdk-i386
- Modify the project.properties file:
- change the build.linux.includes3=... to build.linux.includes3=/usr/lib/jvm/java-1.7.0-openjdk-i386/include
- under linux section change \usr\lib to usr\local\lib
- Compile the Java Libusb library
> ant linux
- It will then create a file libusbJava.so.0.2.4.0
- copy the file to /usr/lib/jni
> sudo cp libusbJava.so.0.2.4.0 /usr/lib/jni/.
- Then create a link to that library
> sudo ln -s libusbJava.so.0.2.4.0 libusbJava.so
Note: in linux the LibusbJava function call