各位大侠,路过请留步。
目前在调试android2.1中蓝牙部分的功能。但是蓝牙老是与其他蓝牙配对绑定不成功。现象如下:
使用蓝牙耳机与android1.6的手机进行配对时,能够正常进行配对连接。
用s3c6410开发板上的蓝牙芯片[88W8688]与蓝牙耳机配对时,linux内核蓝牙协议栈老是报超时,并且与蓝牙耳机进行进行认证时,蓝牙耳机返回“认证失败”,调试了好久,都不知道是什么原因引起的,急!!!!请各位大侠帮忙看看,谢谢了。
配对信令交互流程如下:
HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13   
> HCI Event: Command Status (0x0f) plen 4   
> HCI Event: Connect Complete (0x03) plen 11     
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2   
> HCI Event: Command Status (0x0f) plen 4     
> HCI Event: Read Remote Supported Features (0x0b) plen 11  
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3   
> HCI Event: Max Slots Change (0x1b) plen 3      
> HCI Event: Command Status (0x0f) plen 4     
< HCI Command: Remote Name Request (0x01|0x0019) plen 10  
> HCI Event: Command Status (0x0f) plen 4        
> HCI Event: Read Remote Extended Features (0x23) plen 13
> HCI Event: Command Status (0x0f) plen 4   
< HCI Command: Authentication Requested (0x01|0x0011) plen 2  
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Remote Name Req Complete (0x07) plen 255  
> HCI Event: Command Status (0x0f) plen 4
< HCI Command: Authentication Requested (0x01|0x0011) plen 2   
> HCI Event: Link Key Request (0x17) plen 6   
> HCI Event: Command Status (0x0f) plen 4
request_suspend_state: wakeup (0->0) at 1168260541000 (1970-01-01 00:19:28.260534000 UTC)
> HCI Event: IO Capability Request (0x31) plen 6   
hci_cmd_task: hci0 command tx timeout
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6  
> HCI Event: Command Complete (0x0e) plen 10   
> HCI Event: Simple Pairing Complete (0x36) plen 7  
> HCI Event: Auth Complete (0x06) plen 3      
> HCI Event: Command Status (0x0f) plen 4
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9   
> HCI Event: Command Complete (0x0e) plen 10   
< HCI Command: Disconnect (0x01|0x0006) plen 3   
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Disconn Complete (0x05) plen 4   另附自己在linux内核代码里打印的一些日志:[与蓝牙耳机配对时的日志]
#
GHJ_enter func l2cap_sock_bind
GHJ_enter func l2cap_sock_connect
GHJ_l2cap_sock_connect:sk->sk_state=3GHJ_l2cap_sock_connect:la->l2_psm=0
GHJ_enter func l2cap_do_connect
GHJ_enter fun hci_get_routeGHJ_hci_get_route:18:84:1D:23:24:00 -> 58:23:00:09:10:09
GHJ_l2cap_do_connect:l2cap_pi(sk)->link_mode=38
GHJ_l2cap_do_connect:auth_type = HCI_AT_GENERAL_BONDING_MITM
GHJ_l2cap_do_connect:begin to hci_connect
GHJ_begin to enter func hci_connect:Create ACL connection
GHJ_begin to enter func hci_conn_add
GHJ_hci_conn_add:hdev->pkt_type=52408GHJ_hci_conn_add:is ACL_LINK
GHJ_hci_conn_add:utemp=3431971840
GHJ_hci_conn_add:begin to leave func hci_conn_add
GHJ_hci_connect:begin to enter func hci_acl_connect
GHJ_hci_acl_connect:enter func hci_acl_connect
GHJ_hci_acl_connect:conn->attempt=1
GHJ_hci_acl_connect:conn->link_policy=7
GHJ_hci_acl_connect:cp.pscan_rep_mode=1,cp.pscan_mode=0,cp.clock_offset=44274
GHJ_hci_acl_connect:conn->ssp_mode=1
GHJ_hci_acl_connect:cp.pkt_type=52248
GHJ_hci_acl_connect:hdev->link_mode=32768
GHJ_hci_acl_connect:cp.role_switch = 0x01
GHJ_enter func hci_send_cmd
GHJ_hci_send_cmd:hci0 opcode 0x405 plen 13
GHJ_hci_send_cmd:leave func hci_send_cmd
GHJ_hci_acl_connect:leave func hci_acl_connect
GHJ_hci_connect:type == ACL_LINK
GHJ_hci_cmd_task:jiffies=51222,HZ=200,illast_tx=50644
GHJ_l2cap_sock_connect:bt_sock_wait_state
GHJ_l2cap_sock_connect:_release_sock
GHJ_enter func hci_conn_complete_evt
GHJ_hci_conn_complete_evt:hdev->name=hci0
GHJ_hci_conn_complete_evt:ev->status=0,ev->handle=1,ev->link_type=1
GHJ_hci_conn_complete_ev:conn->handle=1
GHJ_hci_conn_complete_evt:conn->state = BT_CONFIG
GHJ_hci_conn_complete_evt:conn->link_mode = 1
GHJ_hci_conn_complete_evt:Get remote features
GHJ_enter func hci_send_cmd
GHJ_hci_send_cmd:hci0 opcode 0x41b plen 2
GHJ_hci_send_cmd:leave func hci_send_cmd
GHJ_hci_conn_complete_evt:conn->state=7
GHJ_enter func l2cap_connect_cfm
GHJ_l2cap_connect_cfm:enter func l2cap_conn_add
GHJ_l2cap_connect_cfm:enter func l2cap_conn_ready
GHJ_hci_cmd_task:jiffies=51404,HZ=200,illast_tx=51223
GHJ_enter func hci_remote_features_evt
GHJ_enter func hci_send_cmd
GHJ_hci_send_cmd:hci0 opcode 0x41c plen 3
GHJ_hci_send_cmd:leave func hci_send_cmd
GHJ_hci_cmd_task:jiffies=51410,HZ=200,illast_tx=51405
GHJ_enter func hci_remote_ext_features_evt
GHJ_enter func hci_send_cmd
GHJ_hci_send_cmd:hci0 opcode 0x411 plen 2
GHJ_hci_send_cmd:leave func hci_send_cmd
GHJ_hci_cmd_task:jiffies=51415,HZ=200,illast_tx=51411
GHJ_hci_cmd_task:jiffies=51424,HZ=200,illast_tx=51416
GHJ_hci_cmd_task:jiffies=51427,HZ=200,illast_tx=51424
GHJ_hci_cmd_task:jiffies=51427,HZ=200,illast_tx=51424
GHJ_hci_cmd_task:jiffies=51442,HZ=200,illast_tx=51424
GHJ_hci_cmd_task:jiffies=51444,HZ=200,illast_tx=51442
GHJ_hci_cmd_task:jiffies=51447,HZ=200,illast_tx=51444
request_suspend_state: wakeup (0->0) at 615915520000 (1970-01-01 00:10:15.915513000 UTC)
GHJ_enter func hci_auth_complete_evt
GHJ_ hci_auth_complete_evt:conn->state = BT_CONNECTED
GHJ_ hci_auth_complete_evt:ev->status = 5
GHJ_enter func l2cap_connect_cfm
GHJ_l2cap_connect_cfm:enter func l2cap_conn_del
GHJ_hci_cmd_task:jiffies=63508,HZ=200,illast_tx=51444
GHJ_enter func hci_conn_timeout
GHJ_hci_conn_timeout:conn cc8fbc00 state 1
GHJ_hci_conn_timeout:conn->state=1
GHJ_hci_conn_timeout:conn->state=1
GHJ_hci_conn_timeout:enter func hci_acl_disconn2
GHJ_enter func hci_acl_disconn
GHJ_hci_acl_disconn:conn->state = BT_DISCONN
GHJ_hci_acl_disconn:send cmd HCI_OP_DISCONNECT
GHJ_enter func hci_send_cmd
GHJ_hci_send_cmd:hci0 opcode 0x406 plen 3
GHJ_hci_send_cmd:leave func hci_send_cmd
GHJ_hci_cmd_task:jiffies=63914,HZ=200,illast_tx=63509
GHJ_enter func hci_auth_complete_evt另外,请问android2.1中蓝牙模块有那些配置文件,并且怎么配置?