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

[bluetooth-dev] Problem during connection estblishement



Hi all,

I use the stack from latest CVS, and I want to connect to an Ericsson T39m phone (with my own security manager). The connection works well if I wire the bluetooth module (made by TI) to the PC.
No I try to do the same thing on my embedded system (with uClinux) with the same sources. The problem is that am not able to make correctly the connection. I always recieve a disconnection message from remote host. Always, but one time the connection works...

Perhaps have someone already exerimented such behavior. I give the logs in both cases : when the connection worked, and when it failed :

-- Logs of connection that worked ---

# btcon -d /dev/ttyBT0 -a 00:80:37:16:b5:54 -S 2
btdev  /dev/ttyBT0
Connecting to bd:  0:80:37:16:b5:54
Using rfcomm server ch: 2
BT (driver) bt_open: Line 7
BT (driver) Registering tty on line 7 (btcon)
BT (driver) Now 2 open fd:s for ttyBTC [btcon]
Connecting to 00:80:37:16:B5:54 on line 0
BT (driver) __bt_ioctl: BTCONNECT
BT (driver) bt_connect: Connecting srv ch 2 on line 0

bd (6):
0x54 0xb5 0x16 0x37 0x80 0x00 
HCI: create_connection
l2ca_connect_req: wait baseband, sleep on wq 0x107511aa
HCI: release_cmd_timer
HCI: process_event: COMMAND_STATUS
HCI: process_event: PIN_CODE_REQUEST forwarding event to security manager

hci_pin_code_request_reply: New pin is
 (3):
0x31 0x32 0x33 

hci_pin_code_request_reply:  BD_addr (6):
0x54 0xb5 0x16 0x37 0x80 0x00 

hci_pin_code_request_reply:  pin (3):
0x31 0x32 0x33 
HCI: process_event: COMMAND_COMPLETE
HCI: release_cmd_timer
HCI: process_return_param: PIN_CODE_REQUEST_REPLY
HCI: process_return_param: PIN_CODE_REQUEST_REPLY  Success
HCI: process_event: LINK_KEY_NOTIFICATION forwarding event to security manager
HCI: process_event: CONNECTION_COMPLETE: Success!
lp_connect_cfm (pos), wake up wq 0x107511aa
HCI: hci_update_load_factor: Load factor changed from 0 to 1
BT SYS: process_event: ACL link is up
HCI: change_connection_packet_type: for connnection handle 0x3
HCI: write_link_policy_settings
HCI: hci_write_link_supervision_to
l2ca_connect_req: wait baseband, woke up !
l2ca_connect_req: wait rsp, sleep on wq 0x107511aa
HCI: process_event: COMMAND_COMPLETE
HCI: release_cmd_timer
HCI: process_return_param: WRITE_CLASS_OF_DEVICE
HCI: release_cmd_timer
HCI: process_event: COMMAND_STATUS
HCI: process_event: CHANGE_CONNECTION_PACKET_TYPE
HCI: process_event: COMMAND_COMPLETE
HCI: process_return_param: WRITE_LINK_POLICY_SETTINGS 
 HCI: process_event: COMMAND_COMPLETE
HCI: release_cmd_timer
HCI: process_return_param: WRITE_LINK_SUPERVISION_TO (0)
l2cap con rsp, wake up wq 0x107511aa

l2cap options:  (0):
l2ca_connect_req: wait rsp, woke up !
HCI: process_event: NUMBER_OF_COMPLETED_PACKETS
BT SYS: ERROR: update_ncp: completed packets > pending, hdl 3
BT SYS: rfcomm_config_cfm: : configuration not done yet
BT SYS: Setting remote mtu (64:71) to 251 bytes
BT SYS: l2cap channel (64,71) [RFCOMM] connected
BT SYS: rfcomm_config_cfm: l2cap is now open
BT SYS: rfcomm_config_ind: already ready with config req
HCI: process_event: NUMBER_OF_COMPLETED_PACKETS
BT SYS: ERROR: update_ncp: completed packets > pending, hdl 3
BT SYS: bt_register_rfcomm: dlci 4 on line 0
BT (driver) bt_connect_cfm: Line 0 [RCOMM]
Connected.
BT (driver) bt_close: Line 7
BT (driver) Unregistering tty on line 7
HCI: process_event: NUMBER_OF_COMPLETED_PACKETS
BT SYS: ERROR: update_ncp: completed packets > pending, hdl 3

--- End of logs when connection worked -----

--- Logs when connection failed ---

btcon -d /dev/ttyBT0 -a 00:80:37:16:b5:54 -S 2
btdev  /dev/ttyBT0
Connecting to bd:  0:80:37:16:b5:54
Using rfcomm server ch: 2
BT (driver) bt_open: Line 7
BT (driver) Registering tty on line 7 (btcon)
BT (driver) Now 2 open fd:s for ttyBTC [btcon]
Connecting to 00:80:37:16:B5:54 on line 0
BT (driver) __bt_ioctl: BTCONNECT
BT (driver) bt_connect: Connecting srv ch 2 on line 0

bd (6):
0x54 0xb5 0x16 0x37 0x80 0x00 
HCI: create_connection
l2ca_connect_req: wait baseband, sleep on wq 0x107511aa
HCI: release_cmd_timer
HCI: process_event: COMMAND_STATUS
HCI: process_event: LINK_KEY_REQUEST

hci_link_key_request_reply:  BD_addr (6):
0x54 0xb5 0x16 0x37 0x80 0x00 

hci_link_key_request_reply:  Link Key (16):
0xf1 0xd2 0x06 0x44 0x53 0x24 0xec 0x07 0x25 0x80 0xe6 0x80 0xc5 0x1a 0x37 0xf0 
HCI: process_event: COMMAND_COMPLETE
HCI: release_cmd_timer
HCI: process_return_param: LINK_KEY_REQUEST_REPLY
HCI: process_return_param: LINK_KEY_REQUEST_REPLY Success
HCI: process_event: CONNECTION_COMPLETE: Success!
lp_connect_cfm (pos), wake up wq 0x107511aa
HCI: hci_update_load_factor: Load factor changed from 1 to 2
BT SYS: process_event: ACL link is up
HCI: change_connection_packet_type: for connnection handle 0x4
HCI: write_link_policy_settings
HCI: hci_write_link_supervision_to
l2ca_connect_req: wait baseband, woke up !
l2ca_connect_req: wait rsp, sleep on wq 0x107511aa
l2cap con rsp, wake up wq 0x107511aa

l2cap options:  (0):
l2ca_connect_req: wait rsp, woke up !
HCI: process_event: COMMAND_COMPLETE
HCI: release_cmd_timer
HCI: process_return_param: WRITE_CLASS_OF_DEVICE
HCI: release_cmd_timer
HCI: process_event: COMMAND_STATUS
HCI: process_event: CHANGE_CONNECTION_PACKET_TYPE
HCI: process_event: COMMAND_COMPLETE
HCI: process_return_param: WRITE_LINK_POLICY_SETTINGS 
 HCI: process_event: COMMAND_COMPLETE
HCI: release_cmd_timer
HCI: process_return_param: WRITE_LINK_SUPERVISION_TO (0)
HCI: process_event: NUMBER_OF_COMPLETED_PACKETS
BT SYS: ERROR: update_ncp: completed packets > pending, hdl 4
BT SYS: rfcomm_config_cfm: : configuration not done yet
BT SYS: Setting remote mtu (65:72) to 251 bytes
BT SYS: l2cap channel (65,72) [RFCOMM] connected
BT SYS: rfcomm_config_cfm: l2cap is now open
BT SYS: rfcomm_config_ind: already ready with config req
BT SYS: rfcomm_disconnect_ind: remote cid 72
BT SYS: l2cap channel (65,72) [RFCOMM] disconnected
HCI: process_event: NUMBER_OF_COMPLETED_PACKETS
BT SYS: ERROR: update_ncp: completed packets > pending, hdl 4
BT SYS: process_event: DISCONNECTION_COMPLETE Other End Terminated Connection: User Ended Connection
HCI: release_cmd_timer
BT SYS: lp_disconnect_ind: Connection handle 4 disconnected
HCI: hci_update_load_factor: Load factor changed from 2 to 1
HCI: process_event: COMMAND_COMPLETE
HCI: release_cmd_timer
HCI: process_return_param: WRITE_CLASS_OF_DEVICE
BT SYS: wq_timeout
Connect failed [General Failure (1)]
BT (driver) bt_close: Line 7
BT (driver) Unregistering tty on line 7

-- End of logs when connection failed --

We can see that when it failed, it never recieve the logs :

BT SYS: bt_register_rfcomm: dlci 4 on line 0
BT (driver) bt_connect_cfm: Line 0 [RCOMM]

Any help or knowledge about this behavior will be appreciated.

Note : the stack is compiled with "Generic" hardware option.

Best regards.

-- 
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