[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] problem while connecting



Hi,

I'm playing with the stack and I think it works fine to set up a l2cap
connection but then something fails. I use a slightly modified stack on the
server side and an original stack on the client side (stack 000814 in user
mode). When I do con 88:88:88:88:88:88 0 on the client I got this debug
messages, can anyone say why the error "couldn't find l2cap connection
occurs"?

Any hints are appreciated?

/Andreas

client side:

> con 88:88:88:88:88:88 0

Connecting to bd: 88:88:88:88:88:88

using profile: 0

    L2CAP l2cap_connect_req



l2ca_connect_req : sent to bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 

    L2CAP get_con : look for connections in state ANY_STATE (7)



get_con : bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 

    L2CAP get_con : connection not found

    L2CAP get_lcon : lcid 64 con_list.count = 0

    L2CAP get_lcon : connection lcid : 64 not found

    L2CAP Create_con rcid 0

    L2CAP init_flow

    L2CAP insert_con() (64:0) [CLOSED] [SDP] r_mtu[672] C[yes] link_up[no]

    L2CAP insert_con : now 1 connections

    L2CAP l2ca_connect_req : create new baseband link



lp_connect_req to : bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 

HCI: create_connection

HCI: send_cmd : cmd_num 1

HCI: send_cmd_queue: start (cmd_num:1)

HCI: send_cmd_queue : 0 cmds left in queue

HCI: send_cmd: Sucessfully sent HCI command

connecting SDP

hci_receive_data :  (7)

   0x04 0x0f 0x04 0x00 0x01 0x05 0x04 

hci-7

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH



process_event:  (4)

   0x00 0x01 0x05 0x04 

HCI: process_event: COMMAND_STATUS (status:0x0)

HCI: now cmd_num = 1

 HCI: send_cmd_queue: start (cmd_num:1)

HCI: send_cmd_queue : 0 cmds left in queue

.................

hci_receive_data :  (8)

   0x04 0x03 0x0b 0x00 0x01 0x00 0x88 0x88 

hci-8

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH

HCI: hci_receive_data: WAIT_FOR_EVENT_PARAM



hci_receive_data :  (6)

   0x88 0x88 0x88 0x88 0x01 0x00 

hci-6

HCI: hci_receive_data: WAIT_FOR_EVENT_PARAM



process_event:  (11)

   0x00 0x01 0x00 0x88 0x88 0x88 0x88 0x88 0x88 0x01 0x00 

HCI: process_event: CONNECTION_COMPLETE: Success!



CONNECTION_COMPLETE  (11)

   0x00 0x01 0x00 0x88 0x88 0x88 0x88 0x88 0x88 0x01 0x00 

    L2CAP lp_connect_cfm: Success! (hci_handle : 1)

    L2CAP get_con : look for connections in state CLOSED (0)



get_con : bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 



get_con : con_list bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 

    L2CAP we are client



lp_connect_cfm : HCI connected to  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 

Current state of (64:0) is W4_L2CAP_CONNECT_RSP

sleeping 2 sec... (3com fix)

..................    L2CAP l2cap_connect_req: Connecting SDP (rcid:0)

    BTMEM subscribe_bt_buf : buf_len 41

    BTMEM get_bt_buf : no data in buffer

    BTMEM Buffer empty, reset buffer and subsc at 0

 HCI: hci_send_data: 12 bytes 

HCI: hci_send_data: send one packet immediately 

HCI: hci_send_data : (buf 41) (acl_num:10)

HCI: send_acl_packet: send 12 bytes (excl HCI header) out of 12

HCI: send_acl_packet: There are 5 bytes space for the headers



send_acl_packet: (17)

   0x02 0x01 0x20 0x0c 0x00 0x08 0x00 0x01 0x00 0x02 0x01 0x04 0x00 0x01
0x00 0x40 

   0x00 

HCI: send_acl_packet: unsubscribing tx_buf.

    BTMEM unsubscribe_bt_buf : 17 bytes (not incl hdrs) at pos 0

HCI: change_connection_packet_type: for connnection handle 0x1

HCI: send_cmd : cmd_num 1

HCI: send_cmd_queue: start (cmd_num:1)

HCI: send_cmd_queue : 0 cmds left in queue

HCI: send_cmd: Sucessfully sent HCI command



hci_receive_data :  (7)

   0x04 0x0f 0x04 0x00 0x00 0x0f 0x04 

hci-7

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH



process_event:  (4)

   0x00 0x00 0x0f 0x04 

HCI: process_event: COMMAND_STATUS (status:0x0)

HCI: now cmd_num = 0

 HCI: send_cmd_queue: start (cmd_num:0)

HCI: send_cmd_queue : 0 cmds left in queue



hci_receive_data :  (15)

   0x04 0x1d 0x05 0x00 0x01 0x00 0x18 0xcc 0x04 0x0e 0x04 0x01 0x00 0x00
0x00 

hci-15

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH



process_event:  (5)

   0x00 0x01 0x00 0x18 0xcc 

HCI: process_event: CHANGE_CONNECTION_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH



process_event:  (4)

   0x01 0x00 0x00 0x00 

HCI: process_event: COMMAND_COMPLETE

 HCI: <CC>

HCI: process_event: now cmd_num = 1

 HCI: process_return_param: Not recognised! 

HCI: send_cmd_queue: start (cmd_num:1)

HCI: send_cmd_queue : 0 cmds left in queue

............................................................................
............................................................................
............................................................................
.....................................

got RFCOMM server channel : -1 from SDP

          RFCOMM rfcomm_connect_req: server channel:-1, line:0

    L2CAP l2cap_connect_req



l2ca_connect_req : sent to bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 

    L2CAP get_con : look for connections in state ANY_STATE (7)



get_con : bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 



get_con : con_list bd  (6)

   0x88 0x88 0x88 0x88 0x88 0x88 

    L2CAP get_lcon : lcid 65 con_list.count = 1

    L2CAP get_lcon : connection lcid : 65 not found

    L2CAP Create_con rcid 0

    L2CAP init_flow

    L2CAP insert_con() (65:0) [CLOSED] [RFCOMM] r_mtu[672] C[yes]
link_up[no]

    L2CAP insert_con : now 2 connections

    L2CAP l2ca_connect_req : hci handle already exist.

Current state of (65:0) is W4_L2CAP_CONNECT_RSP

    L2CAP l2cap_connect_req: Connecting RFCOMM (rcid:0)

    BTMEM subscribe_bt_buf : buf_len 41

    BTMEM get_bt_buf : no data in buffer

    BTMEM Buffer empty, reset buffer and subsc at 0

 HCI: hci_send_data: 12 bytes 

HCI: hci_send_data: send one packet immediately 

HCI: hci_send_data : (buf 41) (acl_num:9)

HCI: send_acl_packet: send 12 bytes (excl HCI header) out of 12

HCI: send_acl_packet: There are 5 bytes space for the headers



send_acl_packet: (17)

   0x02 0x01 0x20 0x0c 0x00 0x08 0x00 0x01 0x00 0x02 0x02 0x04 0x00 0x03
0x00 0x41 

   0x00 

HCI: send_acl_packet: unsubscribing tx_buf.

    BTMEM unsubscribe_bt_buf : 17 bytes (not incl hdrs) at pos 0



********************************************************************

Server side:

********************************************************************

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH

HCI: process_event: CONNECTION_REQUEST



CONNECTION_REQUEST  (10)

   0x44 0x44 0x44 0x44 0x44 0x44 0x00 0x00 0x00 0x01 

    L2CAP lp_connect_ind: Accepting connection

    L2CAP l2cap_create_con

    L2CAP get_lcon : lcid 64 con_list.count = 0

    L2CAP get_lcon : connection lcid : 64 not found

    L2CAP Create_con rcid 0

    L2CAP insert_con() (64:0) [CLOSED] [unknown] r_mtu[672] C[no]
link_up[yes]

    L2CAP insert_con : now 1 connections

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE

HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH

HCI: process_event: COMMAND_STATUS (status:0x0)

HCI: now cmd_num = 1

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_ACL_HDR

HCI: hci_receive_data: new frame

HCI: hci_receive_data: WAIT_FOR_ACL_DATA

HCI: hci_receive_data: in_buf->count = 12

HCI: hci_receive_data: Copied 12 bytes into inbuffer

HCI: process_acl_data: in_buf->count:12, in_buf->l2cap_len:0

    L2CAP l2cap_receive_data :  got 12 bytes on hci_handle : 1

    L2CAP l2cap_receive_data : New frame len:8 cid:1

    L2CAP l2cap_receive_data : Signal data !

    L2CAP signal_handler : received 8 bytes

    L2CAP signal_handler : Single command

    L2CAP signal_handler : got packet (4 bytes) with ID : 1

    L2CAP process_request : Got request : 0x2 id:1

    L2CAP process_request : Connection request

    L2CAP process_request : id:1 len:4 PSM 0x1 src_cid:64

    L2CAP check_remote_cid : hdl 1 remote_cid 64

    L2CAP check_remote_cid : con_list.cur->hci_con_handle : 0

    L2CAP check_remote_cid : connection not found

BT SYS:  ERROR :process_request : couldn't find l2cap connection

HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE

HCI: hci_receive_data: WAIT_FOR_ACL_HDR

HCI: hci_receive_data: new frame

HCI: hci_receive_data: WAIT_FOR_ACL_DATA

HCI: hci_receive_data: in_buf->count = 12

HCI: hci_receive_data: Copied 12 bytes into inbuffer

HCI: process_acl_data: in_buf->count:12, in_buf->l2cap_len:0

    L2CAP l2cap_receive_data :  got 12 bytes on hci_handle : 1

    L2CAP l2cap_receive_data : New frame len:8 cid:1

    L2CAP l2cap_receive_data : Signal data !

    L2CAP signal_handler : received 8 bytes

    L2CAP signal_handler : Single command

    L2CAP signal_handler : got packet (4 bytes) with ID : 2

    L2CAP process_request : Got request : 0x2 id:2

    L2CAP process_request : Connection request

    L2CAP process_request : id:2 len:4 PSM 0x3 src_cid:65

    L2CAP check_remote_cid : hdl 1 remote_cid 65

    L2CAP check_remote_cid : con_list.cur->hci_con_handle : 0

    L2CAP check_remote_cid : connection not found

BT SYS:  ERROR :process_request : couldn't find l2cap connection
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com