1. 配置linux 2.6.15.6 内核
[*] Networking support
Networking options --->
[ ] Amateur Radio support --->
< > IrDA (infrared) subsystem support --->
<*> Bluetooth subsystem support --->
< > Generic IEEE 802.11 Networking Stack
--- Bluetooth subsystem support
<*> L2CAP protocol support
<*> SCO links support
<*> RFCOMM protocol support
[*] RFCOMM TTY support
<*> BNEP protocol support
[*] Multicast filter support
[*] Protocol filter support
<*> HIDP protocol support
Bluetooth device drivers --->
<*> HCI UART driver
[*] UART (H4) protocol support
[*] BCSP protocol support
< > HCI VHCI (Virtual HCI device) driver (NEW)
在Richad 的帮助下改了 linux-2.6.15.6/net/bluetooth/hci-sock.c 的代码
所有 return -EACCES 都注掉了.
要不然 hciattack 会"permisiton denied".
make ARCH=arm CROSS_COMPILE=/opt/gcc-4.1.2-glibc-2.4/arm-xscale-linux-gnu/bin/arm-xscale-linux-gnu-
make modules
make install
2.
BCSP protocol: CSR 的 BlueCore 串口通讯协议,只适用于Csr非USB芯片,也可用于PCMCIA and CF cards.
UART (H4) protocol: 蓝牙串口通讯协议,适合于所有非USB的蓝牙芯片,也可用于PCMCIA and CF cards.
3.hciattach 命令
common chipsets
hciattach -s 115200 /dev/ttyS1 any 115200
csr using bcsp protocol
hciattach -s 115200 /dev/ttyS1 bcsp 115200
csr using H4 protocol
hciattach -s 115200 /dev/ttyS1 csr 115200 <-- need to set PSKEY_HOST_INTERFACE first
list all support chipsets
hciattach -l
4.
hciconfig hci0 up
hciconfig hci0 down
hciconfig hci0 reset
hciconfig -a