欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > linux >内容正文

linux

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

发布时间:2024/7/5 linux 43 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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]#

总结

以上是生活随笔为你收集整理的linux开发板作为蓝牙音箱,USB 蓝牙适配器在ARM 开发板下的使用的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。