From: Steven Singer <steven.singer@csr.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Florian Echtler <echtler@fs.tum.de>,
Olivier Bornet <Olivier.Bornet@smartdata.ch>,
BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] Re: [Bluez-users] bthid cvs question
Date: Mon, 05 Jan 2004 16:44:22 +0000 [thread overview]
Message-ID: <3FF99466.8080209@csr.com> (raw)
In-Reply-To: <1071969925.2684.5.camel@pegasus>
Marcel Holtmann wrote:
> [Florian Echtler wrote:]
>>Great work! Right now, I am typing this with my MS Bluetooth keyboard
>>and I haven't noticed any glitches so far (connecting to the devices
>>still is kind of a hassle, but I guess MS is to blame for that).
>
> this is easy to solve. The problem is that if we don't have the device
> in our inquiry cache we use a pscan_rep_mode with the value 0x01 for
> connection setup, but Microsoft uses 0x02 by default. To solve the
> glitches with the initial connection is to do an inquiry first.
A lot of devices use page scan repetition mode R2 by default as it's the
lowest power mode.
BlueZ's behaviour is wrong. If you do not know the page scan repetition
mode of the device you're going to connect to then you must use R2. The
1.1 spec does not state this explicitly, but it can be implied.
The wording has been tightened in the 1.2 spec, unfortunately, the note
is in the baseband spec so it's not surprising that host stack authors
miss it. Even then it's stated in a slightly unusual way. The BT 1.2
spec states in volume 2, part B, section 8.3.2, page 137:
If the slave scan interval corresponds to R1, the repetition number is
at least 128; if the slave scan interval corresponds to R2 or if the
master has not previously read the slave's SR mode, the repetition
number is at least 256. If the master has not previously read the
slave's SR mode it shall use Npage >= 256.
[It looks like an erratum has been applied incorrectly as a point has
been repeated - or maybe they wanted to stress it :-).]
The spec states that the master must use at least 256 repetitions if it
doesn't know the slave's SR mode and that this is the same as R2 mode.
However, the baseband doesn't know whether the master has read the
slave's SR mode. The baseband is told the slave's SR mode by the PSRM
parameter of the HCI_Create_Connection command and chooses an
appropriate number of repetitions. There isn't a PSRM parameter value
for "unknown SR mode". This implies that the only way to obey this part
of the spec is for the host to specify PSRM = 0x02 if it doesn't know
the SR mode of the slave.
The fastest way (on average) to connect to a device whose Bluetooth
address you know but whose SR mode you don't know is just to page it in
R2 mode. This is much faster than inquiring and then connecting with
the right parameters.
- 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-01-05 16:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-09 17:28 [Bluez-users] bthid cvs question Jeffrey Arbuckle
2003-12-10 1:43 ` Marcel Holtmann
2003-12-10 8:02 ` Olivier Bornet
2003-12-10 14:18 ` Marcel Holtmann
2003-12-20 23:01 ` Florian Echtler
2003-12-21 1:25 ` [Bluez-devel] " Marcel Holtmann
2003-12-21 10:52 ` Florian Echtler
2003-12-21 11:56 ` [Bluez-devel] " Marcel Holtmann
2003-12-21 12:48 ` Florian Echtler
2003-12-21 13:14 ` [Bluez-devel] " Marcel Holtmann
2004-01-05 16:44 ` Steven Singer [this message]
2004-01-05 19:02 ` [Bluez-devel] " Marcel Holtmann
2004-01-05 21:21 ` Steven Singer
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=3FF99466.8080209@csr.com \
--to=steven.singer@csr.com \
--cc=Olivier.Bornet@smartdata.ch \
--cc=bluez-devel@lists.sourceforge.net \
--cc=echtler@fs.tum.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.