手机版
你好,游客 登录 注册
背景:
阅读新闻

USB 蓝牙适配器在ARM 开发板下的使用

[日期:2012-05-27] 来源:Linux社区  作者:acanoe [字体:大 中 小]

4、可能出现的问题和解决方案:

4.1 编译dbus 时出现:

1checking for accept4... yes
checking abstract socket namespace... no
checking for pkg-config... (cached) /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for XML_ParserCreate_MM in -lexpat... no
configure: error: Could not find expat.h, check config.log for failed attempts

解决方案:

export LDFLAGS=-Wl,-L/usr/local/lib,-lexpat
export CPPFLAGS=-I/usr/local/include


4.2 安装glib 时出现glib msgfmt.. no (这个问题极易出现在Ubuntu 上)

解决方案:apt-get install gettest

4.3 安装glib 时出现 error: Could not find a glib-genmarshal in your PATH,
解决方案:先在主机安装 apt-get install libglib2.0-dev

4.4 bluez-utils ./configure 时出现:BLUEZ no Bluetooth library is required

解决方案:sudo apt-get install libbluetooth-dev

4.5 bluez-utils ./configure 时出现:configure: error: D-Bus library is required

解决方案:sudo apt-get install libdbus-1-dev libdbus-glib-1-dev

4.5 bluez-utils 编译 make 时出现bluez libgmodule-2.0.so could not read symbols: File in wrong 等

解决方案: 查看 glib 配置时的 arm-linux.cache 和环境变量的配置,问题极有可能出现在这里

 


5 bluez 测试

5.1 测试准备

在自己配置 ./configure --prefix=/opt/libs 时 说明自己的库会被安装在/opt/libs 下

copy /opt/libs/sbin/* 到你的文件系统 /sbin

copy /opt/libs/bin/ 下的 hcitool,rfcomm,sdptool 到你的文件系统 /bin

copy /opt/libs/etc/bluetooth/* 到你的文件系统 /etc

5.2 测试命令

[root@FORLINX6410]# hciconfig hci0 up  启用蓝牙

[root@FORLINX6410]# hciconfig hci0 iscan配置开发板蓝牙可被查找
[root@FORLINX6410]# hcitool scan 查找蓝牙
Scanning ...
        00:22:A5:E2:85:AC       HTC click 这个是我手机的蓝牙设备
[root@FORLINX6410]#

linux
相关资讯       arm 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款