问题描述
我在 Raspberry Pi 上运行 leJOS 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).
我注意到另一个用户问了一个非常相似的问题,但没有提供任何有用的信息:我在 raspberry pi 上运行 debian wheezy 的 Java 蓝牙服务器需要 bluecove 本机库 - 我在哪里可以找到它?
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?
推荐答案
您想要:
- 在您的 Raspi 上安装 Apache Ant -
sudo apt-get install ant
- 下载bluecove-gpl-src.zip"并使用命令unzip"将其解压缩到您的树莓派上的目录
- 导航到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 应用程序的类路径中.
额外步骤
在这一切之前我做的一个额外步骤是在我的 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/"中有一个名为developer-read-me.txt"的.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 不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!