破案了,bluez缺少对xradio的支持,即便是D1 SDK里面的bluez 5.55也不包含xradio,需要从全志官网D1 tina中,把bluez的patch抠出来加上来。
hciattach -n ttyS1 xradio
Unknown device type or id
Unknown device type or id指的即是hciattach中不支持xradio,检查方法如下:
# hciattach -l
any 0x0000,0x0000
ericsson 0x0000,0x0000
digi 0x0000,0x0000
bcsp 0x0000,0x0000
xircom 0x0105,0x080a
csr 0x0000,0x0000
bboxes 0x0160,0x0002
swave 0x0000,0x0000
texas 0x0000,0x0000
texasalt 0x0000,0x0000
st 0x0000,0x0000
stlc2500 0x0000,0x0000
philips 0x0000,0x0000
bgb2xx 0x0000,0x0000
picocard 0x025e,0x1000
inventel 0x0000,0x0000
comone 0xffff,0x0101
tdk 0x0105,0x4254
socket 0x0104,0x0096
3com 0x0101,0x0041
bt2000c 0x022d,0x2000
zoom 0x0279,0x950b
sitecom 0x0279,0x950b
billionton0x0279,0x950b
bcm2035 0x0a5c,0x2035
bcm43xx 0x0000,0x0000
xradio 0x0000,0x0000
xr829 0x0000,0x0000
xr819s 0x0000,0x0000
ath3k 0x0000,0x0000
qualcomm 0x0000,0x0000
intel 0x0000,0x0000
3wire 0x0000,0x0000
amp 0x0000,0x0000
aic 0x0000,0x0000
hciattach_xradio.c等文件也不一定加入编译,这个时候需要在buildroot configure后,去makefile检查一下。一个简单的检查办法:
搜索tools/hciattach_bcm43xx.c,观察其上下是否有tools/hciattach_xradio.c,tools/hciattach_xradio.c,tools/hciattach_aic.c,以及output/buildroot,是否有对应的.o文件,若没有,手动加上。