From: Stefan Seyfried <stefan.seyfried@googlemail.com>
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, 3 Feb 2010 14:58:33 +0100 [thread overview]
Message-ID: <20100203145833.2c370c51@strolchi> (raw)
In-Reply-To: <4B6961A4.5040503@videam.com.br>
On Wed, 03 Feb 2010 09:44:36 -0200
"Daniel T. Cobra" <dcobra@videam.com.br> wrote:
> For me, this is going to be a shot in the dark, not being familiar with
> the Bluetooth protocol, but could one of you developers please say if
> any of what follows makes sense?
[Disclaimer: I'm neither a bluez develper, nor am I familiar with the
protocols etc ;)]
Yee, I think this makes sense. Maybe we can make bluez just cache the
data instead of re-requesting it at wakeup (I'm not sure if it should
do that actually, because the spec says so, or if the mouse just has a
broken implementation and we just should do it for convenience). After
all I don't expect the extended features to change all the time while
the mouse is asleep ;)
>
> Comparing the hci dumps from my mouse's reconnection and Stefan's, I am
> suspicious of the first line below:
>
> [...]
> 2010-01-08 00:15:03.136170 < ACL data: handle 42 flags 0x02 dlen 10
> L2CAP(s): Info req: type 2
> 2010-01-08 00:15:03.144090 > HCI Event: Command Status (0x0f) plen 4
> Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> 2010-01-08 00:15:03.144103 < HCI Command: Remote Name Request
> (0x01|0x0019) plen 10
> bdaddr 00:16:38:E2:A5:57 mode 2 clkoffset 0x0000
> 2010-01-08 00:15:03.146089 > HCI Event: Number of Completed Packets
> (0x13) plen 5
> handle 42 packets 2
> 2010-01-08 00:15:03.149092 > HCI Event: Read Remote Supported Features
> (0x0b) plen 11
> status 0x00 handle 42
> Features: 0xbc 0x02 0x04 0x28 0x08 0x08 0x00 0x00
> 2010-01-08 00:15:03.155089 > HCI Event: Command Status (0x0f) plen 4
> Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> 2010-01-08 00:15:03.227093 > HCI Event: Remote Name Req Complete (0x07)
> plen 255
> status 0x00 bdaddr 00:16:38:E2:A5:57 name 'Targus Bluetooth Media
> Mouse for Notebook'
> 2010-01-08 00:15:07.135253 < ACL data: handle 42 flags 0x02 dlen 16
> L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0042 result 0 status 0
> Connection successful
> [...]
>
> In Stefan's hci dump we have:
>
> [...]
> 2010-01-05 11:36:51.517876 < ACL data: handle 11 flags 0x02 dlen 10
> L2CAP(s): Info req: type 2
> 2010-01-05 11:36:51.525808 > ACL data: handle 11 flags 0x02 dlen 16
> L2CAP(s): Info rsp: type 2 result 0
> Extended feature mask 0x0004
> Bi-directional QoS
> 2010-01-05 11:36:51.525853 < ACL data: handle 11 flags 0x02 dlen 16
> L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0042 result 0 status 0
> Connection successful
> [...]
>
> What is happening here? Is bluez making a request to read the device's
> extended features and Stefan's mouse replies while mine doesn't (and the
> 4 sec delay I experience is bluez waiting for the reply until it times out)?
>
> If it helps, here's the output of "hcitool info" for my mouse:
>
> Requesting information ...
> BD Address: 00:16:38:A2:C5:56
> Device Name: Targus Bluetooth Media Mouse for Notebook
> LMP Version: 1.1 (0x1) LMP Subversion: 0x100
> Manufacturer: Broadcom Corporation (15)
> Features: 0xbc 0x02 0x04 0x28 0x08 0x08 0x00 0x00
> <encryption> <slot offset> <timing accuracy> <role switch>
> <sniff mode> <RSSI> <power control> <enhanced iscan>
> <interlaced pscan> <AFH cap. slave> <AFH cap. master>
>
> So, am I going in the right direction or am I totally off the mark? I'd
> really appreciate some comment from you guys who know how this works.
I don't know how it works, but your conclusion seems logical to me.
Which, of course, says nothing about its correctness ;)
Have fun,
seife
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
next prev parent reply other threads:[~2010-02-03 13:58 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 [this message]
2010-02-03 14:12 ` Marcel Holtmann
2010-02-03 14:34 ` Daniel T. Cobra
2010-02-03 14:37 ` Marcel Holtmann
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=20100203145833.2c370c51@strolchi \
--to=stefan.seyfried@googlemail.com \
--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).