All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitriy Paliy <dmitriy.paliy@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Antti Julku <antti.julku@nokia.com>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Add mgmt command for fast connectable mode
Date: Mon, 25 Jul 2011 14:34:50 +0300	[thread overview]
Message-ID: <CAHMBquWSLjzKKyM2xuMUakHeBb-FMLUWXLj2_Tz4Ye1MWj37qw@mail.gmail.com> (raw)
In-Reply-To: <1309309092.2208.25.camel@aeonflux>

Hi Marcel,

On Wed, Jun 29, 2011 at 3:58 AM, Marcel Holtmann <marcel@holtmann.org> wrot=
e:
> Hi Antti,
>
>> Add command to management interface for enabling/disabling the
>> fast connectable mode.
>>
>> Signed-off-by: Antti Julku <antti.julku@nokia.com>
>> ---
>> =A0include/net/bluetooth/hci.h =A0| =A0 10 +++++++
>> =A0include/net/bluetooth/mgmt.h | =A0 =A05 +++
>> =A0net/bluetooth/mgmt.c =A0 =A0 =A0 =A0 | =A0 60 +++++++++++++++++++++++=
+++++++++++++++++++
>> =A03 files changed, 75 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
>> index 65345cd..d7b9600 100644
>> --- a/include/net/bluetooth/hci.h
>> +++ b/include/net/bluetooth/hci.h
>> @@ -698,6 +698,16 @@ struct hci_rp_read_bd_addr {
>> =A0 =A0 =A0 bdaddr_t bdaddr;
>> =A0} __packed;
>>
>> +#define HCI_OP_WRITE_PAGE_SCAN_ACTIVITY =A0 =A0 =A00x0c1c
>> +struct hci_cp_write_page_scan_activity {
>> + =A0 =A0 __le16 =A0 interval;
>> + =A0 =A0 __le16 =A0 window;
>> +} __packed;
>> +
>> +#define HCI_OP_WRITE_PAGE_SCAN_TYPE =A00x0c47
>> + =A0 =A0 #define PAGE_SCAN_TYPE_STANDARD =A0 =A0 =A0 =A0 0x00
>> + =A0 =A0 #define PAGE_SCAN_TYPE_INTERLACED =A0 =A0 =A0 0x01
>> +
>> =A0#define HCI_OP_LE_SET_EVENT_MASK =A0 =A0 0x2001
>> =A0struct hci_cp_le_set_event_mask {
>> =A0 =A0 =A0 __u8 =A0 =A0 mask[8];
>> diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
>> index 45bea25..7196d04 100644
>> --- a/include/net/bluetooth/mgmt.h
>> +++ b/include/net/bluetooth/mgmt.h
>> @@ -209,6 +209,11 @@ struct mgmt_cp_unblock_device {
>> =A0 =A0 =A0 bdaddr_t bdaddr;
>> =A0} __packed;
>>
>> +#define MGMT_OP_SET_FAST_CONNECTABLE 0x001F
>> +struct mgmt_cp_set_fast_connectable {
>> + =A0 =A0 __u8 enable;
>> +} __packed;
>> +
>
> so I am not 100% sure that doing it this way is the best way.
>
> What is the down side of just enabling interlaced page scan all the
> time? And then maybe allow tuning of the timeout via debugfs for testing
> purposes.

This mode changes two parameters: page scan type and page scan
interval. There two downsides to have those changed all the time:
1) power consumption
2) re-transmissions on eSCO channel (see BT Core v4.0, Vol. 2, p. 159)

In this configuration page scanning happening during all dedicated
slots and much more frequently. This is why probably it is not very
good idea to have it enabled all the time, but only during short time
interval when there are benefits out of such changes.

> If we really wanna differentiate between connectable and fast
> connectable, then we need to fix up also the controller information to
> export this kind of detail. That will get pretty messy right now. So I
> would really just prefer to go with interlaced page scan by default and
> see what downside this gives us.

This is the way how fast connectable implementation is done currently
for hci_ops. It is disabled by default and default values for page
scan type and page scan interval are used. If one wishes to enable it,
audio.conf is used for that purpose. In that case, fast connectable
configuration is enabled during incoming/outgoing call alerting only.
In this case, connection initiated from headset side can be performed
much faster during that specific time interval.

Hope this clarifies the questions. What do you think? Could you
elaborate more on 'then we need to fix up also the controller
information to export this kind of detail.'? Why that is needed?

BR,
Dmitriy

  reply	other threads:[~2011-07-25 11:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 10:11 [PATCH] Bluetooth: Add mgmt command for fast connectable mode Antti Julku
2011-06-29  0:58 ` Marcel Holtmann
2011-07-25 11:34   ` Dmitriy Paliy [this message]
2011-07-25 12:46     ` Claudio Takahasi
2011-08-04  8:44       ` Antti Julku
2011-08-10  9:33         ` Antti Julku
2011-08-10 13:55           ` Marcel Holtmann
2011-08-19 12:38             ` Antti Julku
2011-08-22 18:01               ` Gustavo Padovan
2011-08-22 18:40                 ` Claudio Takahasi
2011-08-22 19:48                   ` Gustavo Padovan
2011-08-23  6:03                     ` Antti Julku
2011-07-25 13:38     ` Marcel Holtmann
2011-07-25 14:48       ` Dmitriy Paliy
  -- strict thread matches above, loose matches on Subject: below --
2011-06-22  9:18 Antti Julku
2011-06-17  9:43 Antti Julku
2011-06-21 18:01 ` Gustavo F. Padovan
2011-06-16 11:54 Antti Julku

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=CAHMBquWSLjzKKyM2xuMUakHeBb-FMLUWXLj2_Tz4Ye1MWj37qw@mail.gmail.com \
    --to=dmitriy.paliy@gmail.com \
    --cc=antti.julku@nokia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --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.