From: Steven Singer <steven.singer@csr.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Andreas Gaufer <andreas.gaufer@blue-cell-networks.com>,
Bluez Devel <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] hci_create_connection assuming timeout too soon
Date: Mon, 14 Jun 2004 14:24:29 +0100 [thread overview]
Message-ID: <40CDA70D.7010008@csr.com> (raw)
In-Reply-To: <1087033515.4306.0.camel@pegasus>
Marcel Holtmann wrote:
>Andreas Gaufer wrote:
>> To catch a condition where the chip is stalled in some way i think the best
>> approach would be to time out on host side after the chips
>> page time out * 1,5 or so.
Even that might not be sufficient.
There are two potentially large delays, you've identified just one - the
page timeout. By default this is just over 5 seconds, but it could be
raised as high as 41 seconds.
The page timeout, however, is applied only over the initial baseband
connection. Before the connection complete event can be reported to the
host, the LMP negotiation also has to take place. This can include
authentication and pairing. In theory, the whole LMP negotiation should
be bounded by a 30 second timeout, but, in practice I suspect it's better
to err on the cautious side.
Normally, this isn't a problem as you just wait for the connection
complete event and it'll give a success or failure code. However, I
understand that you want to detect non-responsive host controllers.
> your change is me too much at the moment. I simply changed the timeout
> to 25000 for the hcitool cc command.
If you want just a rough figure that'll probably work, I'd suggest
assuming that the page timeout is about 10 seconds and allow the full
30 seconds LMP timeout. That'd give a 40 second timeout.
If you wanted to be sure, then somwhere above 71 seconds is better, but
to be really, really sure I suspect 2 minutes is better still.
If this is too long, then I suggest a shorter timeout on the command
status event. This event should always be reported promptly. You
could get away with a one second timeout on that followed by a two
minute timeout on the connection complete event.
- Steven
--
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
next prev parent reply other threads:[~2004-06-14 13:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-09 13:48 [Bluez-devel] hci_create_connection assuming timeout too soon Andreas Gaufer
2004-06-12 9:45 ` Marcel Holtmann
2004-06-14 13:24 ` Steven Singer [this message]
2004-06-14 16:23 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40CDA70D.7010008@csr.com \
--to=steven.singer@csr.com \
--cc=andreas.gaufer@blue-cell-networks.com \
--cc=bluez-devel@lists.sourceforge.net \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox