linux开发板作为蓝牙音箱,USB 蓝牙适配器在ARM 开发板下的使用

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]#0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值