linux开发板作为蓝牙音箱,USB 蓝牙适配器在ARM 开发板下的使用
4、可能出現(xiàn)的問(wèn)題和解決方案:
4.1 編譯dbus 時(shí)出現(xiàn):
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 時(shí)出現(xiàn)glib msgfmt.. no (這個(gè)問(wèn)題極易出現(xiàn)在Ubuntu 上)
解決方案:apt-get install gettest
4.3 安裝glib 時(shí)出現(xiàn) error: Could not find a glib-genmarshal in your PATH,
解決方案:先在主機(jī)安裝 apt-get install libglib2.0-dev
4.4 bluez-utils ./configure 時(shí)出現(xiàn):BLUEZ no Bluetooth library is required
解決方案:sudo apt-get install libbluetooth-dev
4.5 bluez-utils ./configure 時(shí)出現(xiàn):configure: error: D-Bus library is required
解決方案:sudo apt-get install libdbus-1-dev libdbus-glib-1-dev
4.5 bluez-utils 編譯 make 時(shí)出現(xiàn)bluez libgmodule-2.0.so could not read symbols: File in wrong 等
解決方案: 查看 glib 配置時(shí)的 arm-linux.cache 和環(huán)境變量的配置,問(wèn)題極有可能出現(xiàn)在這里
5 bluez 測(cè)試
5.1 測(cè)試準(zhǔn)備
在自己配置 ./configure --prefix=/opt/libs 時(shí) 說(shuō)明自己的庫(kù)會(huì)被安裝在/opt/libs 下
copy /opt/libs/sbin/* 到你的文件系統(tǒng) /sbin
copy /opt/libs/bin/ 下的 hcitool,rfcomm,sdptool 到你的文件系統(tǒng) /bin
copy /opt/libs/etc/bluetooth/* 到你的文件系統(tǒng) /etc
5.2 測(cè)試命令
[root@FORLINX6410]# hciconfig hci0 up? 啟用藍(lán)牙
[root@FORLINX6410]# hciconfig hci0 iscan配置開(kāi)發(fā)板藍(lán)牙可被查找
[root@FORLINX6410]# hcitool scan 查找藍(lán)牙
Scanning ...
00:22:A5:E2:85:AC?????? HTC click 這個(gè)是我手機(jī)的藍(lán)牙設(shè)備
[root@FORLINX6410]#
總結(jié)
以上是生活随笔為你收集整理的linux开发板作为蓝牙音箱,USB 蓝牙适配器在ARM 开发板下的使用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: js 点击button切换颜色_Thin
- 下一篇: CNN+RNN