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

[bluetooth-dev] L2cap connected, but not rfcomm



Hi all,

I use the stack in generic mode (the hardware is from TI). I want to make a connection.
On the other side, I 've the "HCI commander" of TI with their stack (on windows).
I try to initiate the connection from openBT. I got the message "HCI: process_event: CONNECTION_COMPLETE: Success!", but at the end of the process, the btcon doesn't kill, and in the file /proc/bt_internal, I've no line connected (neither upper-connected, nor lower-connected).

The problem seems to be in the function "l2ca_connect_req". In this function, the stack has a loop with a while :

do {
		/* baseband is up, now initiate send connect req */
		if((retval = l2cap_connect_req(con, con->psm)) < 0) { 
			/* This can be a result of insufficient memory and it's the  
			   callers responsibility to take proper action */
			D_ERR(__FUNCTION__ ": failed (status %d)\n", retval);
			if(!tmpcon) {
				lp_disconnect(con->hci_hdl);
			}
			ENTERSTATE(con, CLOSED);
			delete_con(con);
			return retval;
		}
		/* wait until we received a response or after timeout */
		l2ca_wait(__FUNCTION__ ": wait rsp", con);
	} while (con->c_status == CSTATUS_RTX_TIMEOUT);


but it never get out of this loop. And it never display the D_ERR function...

Can someone help me ? What does it means ? Is it that the remote RFCOMM layer doesn't respond ? Could it be a server channel number problem (I tried 1 to 4) ?

Thank you for any help.

--- Here are logs for the connection ----

May  6 17:41:53 danube kernel: BT (driver) bt_open: Line 7 
May  6 17:41:53 danube kernel: BT (driver) Registering tty on line 7 (btcon) 
May  6 17:41:53 danube kernel: BT (driver) Now 2 open fd:s for ttyBTC [btcon] 
May  6 17:41:53 danube kernel: BT (driver) __bt_ioctl: BTCONNECT 
May  6 17:41:53 danube kernel: BT (driver) bt_connect: Connecting srv ch 4 on line 0 
May  6 17:41:53 danube kernel:  
May  6 17:41:53 danube kernel: Remote BD:  (6): 
May  6 17:41:53 danube kernel: 0x44 0x59 0xe1 0x04 0x26 0x03  
May  6 17:41:53 danube kernel:           RFCOMM rfcomm_connect_req: server channel:4, line:0 
May  6 17:41:53 danube kernel:  
May  6 17:41:53 danube kernel: bd (6): 
May  6 17:41:53 danube kernel: 0x03 0x26 0x04 0xe1 0x59 0x44  
May  6 17:41:53 danube kernel: HCI: create_connection 
May  6 17:41:53 danube kernel: l2ca_connect_req: wait baseband, sleep on wq 0xc757df3c 
May  6 17:41:53 danube kernel: BT DATA <--|X|     17 
May  6 17:41:53 danube kernel:  
May  6 17:41:53 danube kernel: <--|X| (17): 
May  6 17:41:53 danube kernel: 0x01 0x05 0x04 0x0d 0x03 0x26 0x04 0xe1 0x59 0x44 0x18 0xcc 0x00 0x00 0x00 0x00  
May  6 17:41:53 danube kernel: 0x00  
May  6 17:41:53 danube kernel: BT DATA -->|X|      7 
May  6 17:41:53 danube kernel:  
May  6 17:41:53 danube kernel: -->|X| (7): 
May  6 17:41:53 danube kernel: 0x04 0x0f 0x04 0x00 0x0a 0x05 0x04  
May  6 17:41:53 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:53 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:53 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:53 danube kernel: HCI: release_cmd_timer 
May  6 17:41:53 danube kernel: HCI: process_event: COMMAND_STATUS 
May  6 17:41:55 danube kernel: BT DATA -->|X|     14 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: -->|X| (14): 
May  6 17:41:55 danube kernel: 0x04 0x03 0x0b 0x00 0x01 0x00 0x03 0x26 0x04 0xe1 0x59 0x44 0x01 0x00  
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:55 danube kernel: HCI: process_event: CONNECTION_COMPLETE: Success! 
May  6 17:41:55 danube kernel: lp_connect_cfm (pos), wake up wq 0xc757df3c 
May  6 17:41:55 danube kernel: HCI: hci_update_load_factor: Load factor changed from 0 to 1 
May  6 17:41:55 danube kernel: BT SYS: process_event: ACL link is up 
May  6 17:41:55 danube kernel: HCI: change_connection_packet_type: for connnection handle 0x1 
May  6 17:41:55 danube kernel: HCI: write_link_policy_settings 
May  6 17:41:55 danube kernel: HCI: hci_write_link_supervision_to 
May  6 17:41:55 danube kernel: BT DATA <--|X|      7 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: <--|X| (7): 
May  6 17:41:55 danube kernel: 0x01 0x24 0x0c 0x03 0x20 0x03 0x02  
May  6 17:41:55 danube kernel: BT DATA <--|X|      8 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: <--|X| (8): 
May  6 17:41:55 danube kernel: 0x01 0x0f 0x04 0x04 0x01 0x00 0x18 0xcc  
May  6 17:41:55 danube kernel: BT DATA <--|X|      8 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: <--|X| (8): 
May  6 17:41:55 danube kernel: 0x01 0x0d 0x08 0x04 0x01 0x00 0x01 0x00  
May  6 17:41:55 danube kernel: BT DATA <--|X|      8 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: <--|X| (8): 
May  6 17:41:55 danube kernel: 0x01 0x37 0x0c 0x04 0x01 0x00 0x40 0x1f  
May  6 17:41:55 danube kernel: l2ca_connect_req: wait baseband, woke up ! 
May  6 17:41:55 danube kernel: PAL - l2ca_connect_req : state 1 
May  6 17:41:55 danube kernel:     L2CAP l2cap_connect_req: Connecting RFCOMM (rcid:0) 
May  6 17:41:55 danube kernel: PAL - l2cap_connect_req : before to call hci_send_data 
May  6 17:41:55 danube kernel: PAL - l2ca_connect_req : Error 1 
May  6 17:41:55 danube kernel: l2ca_connect_req: wait rsp, sleep on wq 0xc757df3c 
May  6 17:41:55 danube kernel: BT DATA <--|X|     17 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: <--|X| (17): 
May  6 17:41:55 danube kernel: 0x02 0x01 0x20 0x0c 0x00 0x08 0x00 0x01 0x00 0x02 0x01 0x04 0x00 0x03 0x00 0x40  
May  6 17:41:55 danube kernel: 0x00  
May  6 17:41:55 danube kernel: BT DATA -->|X|      7 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: -->|X| (7): 
May  6 17:41:55 danube kernel: 0x04 0x0e 0x04 0x0a 0x24 0x0c 0x00  
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:55 danube kernel: HCI: process_event: COMMAND_COMPLETE 
May  6 17:41:55 danube kernel: HCI: release_cmd_timer 
May  6 17:41:55 danube kernel: HCI: process_return_param: WRITE_CLASS_OF_DEVICE 
May  6 17:41:55 danube kernel: BT DATA -->|X|     31 
May  6 17:41:55 danube kernel:  
May  6 17:41:55 danube kernel: -->|X| (31): 
May  6 17:41:55 danube kernel: 0x04 0x1b 0x03 0x01 0x00 0x05 0x04 0x0f 0x04 0x00 0x08 0x0f 0x04 0x04 0x0e 0x06  
May  6 17:41:55 danube kernel: 0x09 0x0d 0x08 0x00 0x01 0x00 0x04 0x0e 0x06 0x0a 0x37 0x0c 0x00 0x01 0x00  
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:55 danube kernel: HCI: process_event: MAX_SLOTS_CHANGE to 5 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:55 danube kernel: HCI: release_cmd_timer 
May  6 17:41:55 danube kernel: HCI: process_event: COMMAND_STATUS 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:55 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:56 danube kernel: HCI: process_event: COMMAND_COMPLETE 
May  6 17:41:56 danube kernel: HCI: process_return_param: WRITE_LINK_POLICY_SETTINGS  
May  6 17:41:56 danube kernel:  HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:56 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:56 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:56 danube kernel: HCI: process_event: COMMAND_COMPLETE 
May  6 17:41:56 danube kernel: HCI: release_cmd_timer 
May  6 17:41:56 danube kernel: HCI: process_return_param: WRITE_LINK_SUPERVISION_TO (0) 
May  6 17:41:56 danube kernel: BT DATA -->|X|      8 
May  6 17:41:56 danube kernel:  
May  6 17:41:56 danube kernel: -->|X| (8): 
May  6 17:41:56 danube kernel: 0x04 0x1d 0x05 0x00 0x01 0x00 0x18 0xcc  
May  6 17:41:56 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:41:56 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:41:56 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:41:56 danube kernel: HCI: process_event: CHANGE_CONNECTION_PACKET_TYPE 
May  6 17:42:00 danube kernel: BT DATA -->|X|      8 
May  6 17:42:00 danube kernel:  
May  6 17:42:00 danube kernel: -->|X| (8): 
May  6 17:42:00 danube kernel: 0x04 0x13 0x05 0x01 0x01 0x00 0x01 0x00  
May  6 17:42:00 danube kernel: HCI: hci_receive_data: WAIT_FOR_PACKET_TYPE 
May  6 17:42:00 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_TYPE 
May  6 17:42:00 danube kernel: HCI: hci_receive_data: WAIT_FOR_EVENT_LENGTH 
May  6 17:42:00 danube kernel: HCI: process_event: NUMBER_OF_COMPLETED_PACKETS 
May  6 17:42:00 danube kernel: HCI: update_ncp: acl_num before: 8 
May  6 17:42:00 danube kernel: HCI: update_ncp: free 1 for handle 1 
May  6 17:42:00 danube kernel: HCI: update_ncp: acl_num after: 9 

-- 
Alain Paschoud                      SMARTDATA SA
alain.paschoud@xxxxxxx.ch         PSE-A
http://www.smartdata.ch             1015 Lausanne
Phone +41-21-693'84'98              
Fax   +41-27-693'84'91              
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com