天嵌 ARM开发社区

 找回密码
 注册
查看: 3920|回复: 3

蓝牙移植问题

[复制链接]
传奇 发表于 2012-5-15 20:20:00 | 显示全部楼层 |阅读模式
最近做了蓝牙适配器的移植,下面是我的蓝牙Bluez协议的移植过程
1,编译安装bluez-lib-3.36.tar.gz
  #tar zxvf bluez-lib-3.36.tar.gz
  #./configure --profix=/opt/libs --host=arm-linux --target=arm-linux CC=arm-linux-gcc
  #make
  #make install
2,编译安装
  这个库是后面的dbus依赖的,你也可以用expat来代替libxml2,官方网站上说dbus必须依赖于他们中的一个。
  #tar zxvflibxml2-2.7.4.tar.gz
  #./configure --profix=/opt/libs --host=arm-linux --target=arm-linux     CC=arm-linux-gcc
  #make
  #make install

3,编译安装dbus-1.0.2.tar.gz
  #tar zxvf dbus-1.2.16.tar.gz
  #echo ac_cv_have_abstract_sockets=yes>arm-linux.cache
  #./configure --profix=/opt/libs --host=arm-linux --target=arm-linux     CC="arm-linux-gcc -I/opt/libs/include -L/opt/libs/lib" --cache-file=arm-linux.cache --with-x=no
  #make
  #make install

4,编译安装glib-2.16.5
  #tar  -zxjf  glib-2.16.5.tar.bz2
#echo ac_cv_type_long_long=yes>arm-linux.cache
#echo glib_cv_stack_grows=no>>arm-linux.cache
#echo glib_cv_uscore=no>>arm-linux.cache
#echo c_cv_func_posix_getpwuid_r=yes>>arm-linux.cache
#echo ac_cv_func_posix_getgrgid_r=yes>>
#./configure --profix=/opt/libs --host=arm-linux --target=arm-linux   
CC="arm-linux-gcc -I/opt/libs/include -L/opt/libs/lib" --cache-file=arm-linux.cache
#make
#make install

5,编译安装libusb-0.1.12.tar.gz
   #tar zxvf  libusb-0.1.12.tar.gz
  #./configure --profix=/opt/libs --host=arm-linux --target=arm-linux CC="arm-linux-gcc -I/opt/libs/include -L/opt/libs/lib"
  #make
  #make install

6,编译安装bluez-utils-3.36.tar.gz
  #tar zxvf bluez-utils-3.36.tar.gz
  #./configure --profix=/opt/libs --host=arm-linux --target=arm-linux     CC="arm-linux-gcc -I/opt/libs/include -L/opt/libs/lib" --disable-audio
  #make
  #make install
以上部分成功编译且将所需文件加入到了文件系统里,相应的内核配置,
把 networking下 ---
Bluetooth subsystem support 里的以下几项全部选上:

L2CAP protocol support
SCO links support
RFCOMM protocol support
RFCOMM TTY support
BNEP protocol support
HIDP protocol support


BCSP protocol support

因为我是通过usb接口使用蓝牙适配器,所以选择 了
HCI USB driver
编译内核烧写到开发板,但是我的开发板上蓝牙适配器却没办法和其他蓝牙设备相连
下面是我执行命令的输出:hciconfig hci0 up 输出:
hci0:       Type: BR/EDR  Bus: USB
       BD Address: 00:1F:81:00:02:DD  ACL MTU: 1021:4  SCO MTU: 180:1
       UP RUNNING
       RX bytes:342 acl:0 sco:0 events:10 errors:0
       TX bytes:33 acl:0 sco:0 commands:11 errors:0
执行hcid -f /etc/bluetooth/hcid.conf
hciconfig hciO Im accept,master
Sdpd
pand-Iisten--role NAP
但是用其他终端却无法连接上,我用
hciconfig hciO up
Hcid -f /etc/bluetooth/hcid.conf
sdpd
pand--Connect 00:06:6E:12:8E:97
相应终端也没有任何反应,有没有做过相应应用的大牛啊,求解决方法,比较急,谢谢啦。



翔鹰科技 发表于 2012-5-15 22:25:00 | 显示全部楼层
:D帮顶一下
chgh1306 发表于 2012-6-12 23:05:34 | 显示全部楼层
这驱动是内核里自带的吗
 楼主| 传奇 发表于 2012-6-13 20:31:23 | 显示全部楼层
chgh1306 发表于 2012-6-12 23:05
这驱动是内核里自带的吗

是的,但是还有以上这么多要加载的用户空间工具。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-4-29 08:07 , Processed in 1.078125 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表