From: Marcel Holtmann <marcel@holtmann.org>
To: "Daniel T. Cobra" <dcobra@videam.com.br>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Long delay to (re)connect a bluetooth mouse
Date: Wed, 03 Feb 2010 06:37:57 -0800 [thread overview]
Message-ID: <1265207877.31341.115.camel@localhost.localdomain> (raw)
In-Reply-To: <4B69898E.1070001@videam.com.br>
Hi Daniel,
> Great! It is starting to make sense. Next, let me ask two questions:
>
> 1) You say the information request is needed, but do you mean it is
> needed at every reconnection with the device or, as Stefan suggested,
> would it make sense to request it only when the connection is first
> established and cache the result?
>
> 2) Is there a way to know that the device does not support extended
> features, to avoid sending a request that is going to time out without a
> reply? In net/bluetooth/hci_event.c I found this:
>
> 1171 if (conn->state == BT_CONFIG) {
> 1172 if (!ev->status && lmp_ssp_capable(hdev) &&
> 1173 lmp_ssp_capable(conn)) {
> 1174 struct
> hci_cp_read_remote_ext_features cp;
> 1175 cp.handle = ev->handle;
> 1176 cp.page = 0x01;
> 1177 hci_send_cmd(hdev,
> 1178 HCI_OP_READ_REMOTE_EXT_FEATURES,
> 1179 sizeof(cp),
> &cp);
> 1180 } else {
> 1181 conn->state = BT_CONNECTED;
> 1182 hci_proto_connect_cfm(conn, ev->status);
> 1183 hci_conn_put(conn);
> 1184 }
> 1185 }
>
> Is this the right place to look? It seems SSP capability is used as a
> test for whether to read the device's extended features. Is this really
> the best way, or could there be a more suitable indicator of whether the
> device supports extended features, thus avoiding the timeout?
that is the wrong place. You need to look into net/bluetooth/l2cap.c.
The LMP features are mandatory at all costs. Otherwise hell breaks loose
if you don't do the right.
Regards
Marcel
next prev parent reply other threads:[~2010-02-03 14:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 19:43 Long delay to (re)connect a bluetooth mouse dcobra
2009-12-17 15:17 ` Daniel T. Cobra
2009-12-18 17:43 ` Daniel T. Cobra
2009-12-18 22:04 ` Marcel Holtmann
2009-12-18 22:49 ` dcobra
2009-12-18 22:58 ` Marcel Holtmann
2009-12-19 1:21 ` dcobra
2009-12-22 12:02 ` Daniel T. Cobra
2009-12-22 12:09 ` Daniel T. Cobra
[not found] ` <53ea87da0912222033y530c83dci41bb6d9b99ece6c@mail.gmail.com>
2009-12-23 11:01 ` Daniel T. Cobra
2009-12-23 15:19 ` Daniel T. Cobra
[not found] ` <4B32336C.8080806@videam.com.br>
[not found] ` <53ea87da0912230727q617dce1axe5053cd32d03bbf5@mail.gmail.com>
2009-12-23 15:38 ` Daniel T. Cobra
2009-12-23 15:48 ` Stefan Seyfried
2009-12-23 16:00 ` venu
2009-12-23 17:53 ` Daniel T. Cobra
2009-12-29 15:01 ` Stefan Seyfried
2010-01-04 18:48 ` Daniel T. Cobra
2010-01-05 10:51 ` Stefan Seyfried
2010-02-03 11:44 ` Daniel T. Cobra
2010-02-03 13:58 ` Stefan Seyfried
2010-02-03 14:12 ` Marcel Holtmann
2010-02-03 14:34 ` Daniel T. Cobra
2010-02-03 14:37 ` Marcel Holtmann [this message]
2010-02-03 17:13 ` Daniel T. Cobra
2010-02-03 18:04 ` Iain Hibbert
2010-02-04 16:19 ` Daniel T. Cobra
2010-02-04 18:13 ` Iain Hibbert
2010-02-05 11:24 ` Daniel T. Cobra
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=1265207877.31341.115.camel@localhost.localdomain \
--to=marcel@holtmann.org \
--cc=dcobra@videam.com.br \
--cc=linux-bluetooth@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).