linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] Slow connect time for devices
@ 2006-02-16  0:28 Gareth Bradley
  2006-02-16  6:07 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Gareth Bradley @ 2006-02-16  0:28 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]

Hello. I'm working on a project on a Intel XScale processor, connecting to
bluetooth heart rate monitors and headsets. Connections currently have 7
attempts to work, though leaving a debug flag on (which slows the handshake
down) gets a near-instant connection. I would like to get the connections
normal without slowing down the BT device after the connection is made.

Any normal connection, regardless of whether there's an authorization
segment, will fail (errors 104 & 110 - 'Connection timed out' and
'Connection reset by peer') 7 times before connecting. It'll usually
alternate between the two errors, and the 7 is fairly constant.

I have found that I can get the total connection time by reducing these two
variables down to 2 seconds each. It still takes seven attempts. Once the
first device is connected, any others will either be instant or have one
timeout/reset.

(rfcomm.h)
#define RFCOMM_CONN_TIMEOUT (HZ * 2)
#define RFCOMM_DISC_TIMEOUT (HZ * 2)

I later found that enabling a debug flag will give me instant connections
(how I assume things should be), because it is slowing down the process. The
flag is HCI_CORE_DEBUG in bluetooth.h, which affects the fines hci_core.c,
hci_conn.c and hci_event.c. I have isolated it to the hci_core.c file that
needs to be slowed down.

I can't, however, leave the prints on or a loop to slow it down or sleep, as
the SCO voice connection becomes unusable with them on once it is connected.

Can someone please suggest an approach to targeting and slowing down the
handshake and the not the resulting connection?

gjb.

[-- Attachment #2: Type: text/html, Size: 1681 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-16  6:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-16  0:28 [Bluez-devel] Slow connect time for devices Gareth Bradley
2006-02-16  6:07 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).