现在的位置: 首页 > 综合 > 正文

csr8811蓝牙芯片porting总结

2014年09月05日 ⁄ 综合 ⁄ 共 1071字 ⁄ 字号 评论关闭

1.添加BT电源driver,提供给android接口,android文件目录是:system/Bluetooth/bluedroid、bluetooth.c文件

2.在drivers/bluetooth目录下查看是否有hci_bcsp.o hci_ldisc.o hci_uart.o,如果没有要查看时候是kconfig没有在driver/kconfig目录下添加。我们需要这三个.o文件

3.把 networking下 --- Bluetooth subsystem support 里的以下几项全部选上即可:

L2CAP protocol support

SCO links support

RFCOMM protocol support

RFCOMM TTY support

BNEP protocol support

HIDP protocol support

用csr的chip要注意把HCI UART driver/BCSP protocol support选择上

I/bluedroid( 1152): bt_enable: ret: -1, errno: 19

此error log是打印出来是

For CSR's bluetooth

service hciattach /system/bin/hciattach -s 921600 -n /dev/ttyS2 bcsp 921600

disabled

oneshot

service bccmd /system/bin/bccmd -t bcsp -d /dev/ttyS2 psload -r /etc/csr/ps.psr

disabled

oneshot

4.没有生成bccmd工具

Android4.0.4对于bccmd加了开关,需要把开关打开

ifeq ($(BOARD_HAVE_BLUETOOTH_CSR),true)

在BoardConfig.mk文件加一个开关。

5.bccmd不能下pskey。

由于csr启动初始化芯片是通过pskey实现,所以下pskey是第一步。

(1)首先检查硬件电路是否是OK。(csr硬件工程师帮忙check)

(2)检查设置的baud rate是否是有效的。-cfsetospeed/cfsetispeed

(3)查看时序和可以强制设置baud rate

6.遇到hciattach tool不能启动(initialization timed out)

要特备注意参数,hciattach /dev/ttyS2 bcsp 115200

7.hciconfig可以找到hci0

8.hciconfig不能激活hci0,log:can’t init device hci0:connection timed out

抱歉!评论已关闭.