Search code examples
linuxraspberry-pibluecovelejos-nxj

Bluetooth error: Native Library bluecove_arm not available


I'm having some difficulty running a leJOS pc program on my Raspberry Pi. It works on my PC.

I get an error stating: "Native Library bluecove_arm not available"

Bluetooth works fine otherwise using: "hcitool scan"

I can't find a compiled version of Bluecove for ARMv6 / Raspberry Pi.

I've installed Maven on my PC and installed the Maven Eclipse plug-in, in an attempt to compile Bluecove from the source files: though I can't see how to choose what platform I want to target (ARM11).

I noticed another user has asked a pretty similar question, but hasn't provided anything useful: My Java bluetooth server on raspberry pi running debian wheezy needs bluecove native library - where can I find it?


Solution

  • You want to:

    • Install Apache Ant onto your Raspi - sudo apt-get install ant
    • Download "bluecove-gpl-src.zip" and extract it to a directory on your Pi using command 'unzip'
    • Navigate to the folder inside "bluecove-gpl-src.zip", it should be something like "bluecove-gpl-2.1.0"
    • Inside this folder there should be a "build.xml" file, run the command ant all
    • Let the magic happen and viola. After it has built the project, you should now have a 'bluecove-gpl.jar' (or similarly named) file generated somewhere, it should tell you from the output of the build script where you can find it.
    • This "bluecove-gpl.jar" is then included in your Java application's classpath, along with a "bluecove-2.1.1.jar" (or similarly named) file.

    Extra steps

    One extra step I did before all of this was to install "Maven" on my pi: sudo apt-get install maven: then from the directory which contains the 'build.xml' file I run the command mvn eclipse:clean eclipse:eclipse -DdownloadSources=true

    • I also have the packages "bluez" "bluez-util" and "blueman" installed: using "sudo apt-get install".

    • There is a .txt file in the folder "bluecove-gpl-src/bluecove-gpl-2.1.0/" called "developer-read-me.txt" this has some useful information.

    • the 'build.xml' file expects you to have bluecove.jar in a folder position relative to it's own: '../bluecove/target/'

    end extra steps

    I'm not at my Pi right now, so I can't tell you precisely what I did with that file: I'm sure I included it in the classpath for my project: but I don't think it actually mattered.

    If you have any trouble with the steps above: let me know and I'll do my best to help and clarify!