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 开发板下的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: js 点击button切换颜色_Thin
- 下一篇: dll可以在linux下使用吗_Linu