问题描述
在Raspberry Pi上运行leJOS pc程序时遇到一些困难.它可以在我的PC上运行.
I'm having some difficulty running a leJOS pc program on my Raspberry Pi. It works on my PC.
我收到一条错误消息:本地库bluecove_arm不可用"
I get an error stating: "Native Library bluecove_arm not available"
蓝牙可以正常工作,否则可以使用:"hcitool scan"
Bluetooth works fine otherwise using: "hcitool scan"
我找不到用于ARMv6/Raspberry Pi的Bluecove的编译版本.
I can't find a compiled version of Bluecove for ARMv6 / Raspberry Pi.
我已经在PC上安装了Maven并安装了Maven Eclipse插件,试图从源文件编译Bluecove:尽管我看不到如何选择要定位的平台(ARM11).
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?
推荐答案
您要:
- 将Apache Ant安装到您的Raspi-
sudo apt-get install ant
- 下载"bluecove-gpl-src.zip"并使用命令"unzip"将其解压缩到您的Pi上的目录中
- 导航到"bluecove-gpl-src.zip"中的文件夹,它应该类似于"bluecove-gpl-2.1.0"
- 在此文件夹中应该有一个"build.xml"文件,运行命令
ant all
- 让魔术和中提琴发生.构建项目后,您现在应该在某个位置生成一个"bluecove-gpl.jar"(或类似名称)文件,它应该从构建脚本的输出中告诉您可以找到它的地方.
- 然后,此"bluecove-gpl.jar"与"bluecove-2.1.1.jar"(或类似名称)文件一起包含在Java应用程序的类路径中.
- 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.
其他步骤
在所有这些操作之前,我做了一个额外的步骤,就是在pi上安装"Maven":sudo apt-get install maven
:然后从包含"build.xml"文件的目录中运行命令mvn eclipse:clean eclipse:eclipse -DdownloadSources=true
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
-
我还安装了软件包"bluez","bluez-util"和"blueman":使用"sudo apt-get install".
I also have the packages "bluez" "bluez-util" and "blueman" installed: using "sudo apt-get install".
"bluecove-gpl-src/bluecove-gpl-2.1.0/"文件夹中有一个.txt文件,名为"developer-read-me.txt",其中包含一些有用的信息.
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.
'build.xml'文件期望您将bluecove.jar放置在相对于其自身的文件夹位置:'../bluecove/target/'
the 'build.xml' file expects you to have bluecove.jar in a folder position relative to it's own: '../bluecove/target/'
结束其他步骤
我现在不在我的Pi上,所以我无法准确地告诉您我对该文件的处理方式:我确定我将其包含在我的项目的类路径中:但是我不认为它实际上是很重要.
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!
这篇关于蓝牙错误:本机库bluecove_arm不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!