linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 4/7] Bluetooth: Add support for setting LE advertising data
Date: Wed, 24 Oct 2012 00:26:37 +0300	[thread overview]
Message-ID: <20121023212637.GA17404@x220.ger.corp.intel.com> (raw)
In-Reply-To: <CAJdJm_MhB79eQSAHUqOa7Xwf+ujrnQZtG_jqEgMfEFzuoqB9-w@mail.gmail.com>

Hi Lizardo,

On Tue, Oct 23, 2012, Anderson Lizardo wrote:
> On Tue, Oct 23, 2012 at 12:53 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> > +       if (hdev->adv_tx_power) {
> > +               ptr[0] = 2;
> > +               ptr[1] = EIR_TX_POWER;
> > +               ptr[2] = (u8) hdev->adv_tx_power;
> > +
> > +               ad_len += 3;
> > +               ptr += 3;
> > +       }
> 
> 0dBm is a valid TX power. Not sure the if() clause is valid here.

If it's not, we'd need to extend the storage size of hdev->adv_tx_power
(to have some invalid value) or add another variable to hdev to indicate
that we know the tx_power. FWIW, create_eir also uses the same test for
including the inq_tx_power, so either both or neither should be fixed.
For simplicity I'd just keep the 0-test unless 0 is a really common
value.

> Also, I'm worried how we are going to put other advertising data here,
> i.e. Manufacturer Specific data or Service Data. On last BlueZ meeting
> we proposed (and have been implementing) the Set Controller Data mgmt
> command to set them. Is this still an acceptable approach?

Yes, though we only have 31 bytes to play with here which is quite
little. Also, we might want to make this dependent on the LE GAP role.
E.g. we might be more interested in manufacturer specific data for
broadcaster role than for peripheral role (maybe a user space
application *only* wants its data for broadcaster role).

Johan

  reply	other threads:[~2012-10-23 21:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 16:53 [PATCH 0/7] Bluetooth: Improved single-mode and LE peripheral support Johan Hedberg
2012-10-23 16:53 ` [PATCH 1/7] Bluetooth: mgmt: Add support for switching to LE peripheral mode Johan Hedberg
2012-10-23 19:01   ` Marcel Holtmann
2012-10-23 20:26     ` Johan Hedberg
2012-10-23 21:49       ` Marcel Holtmann
2012-10-23 16:53 ` [PATCH 2/7] Bluetooth: mgmt: Restrict BR/EDR settings to BR/EDR-only adapters Johan Hedberg
2012-10-23 18:51   ` Anderson Lizardo
2012-10-23 19:03     ` Marcel Holtmann
2012-10-23 19:02   ` Marcel Holtmann
2012-10-23 19:31     ` Anderson Lizardo
2012-10-23 20:48       ` Johan Hedberg
2012-10-23 21:46         ` Marcel Holtmann
2012-10-24 12:11           ` Anderson Lizardo
2012-10-24 15:14             ` Marcel Holtmann
2012-10-23 16:53 ` [PATCH 3/7] Bluetooth: Disallow LE scanning and connecting in peripheral mode Johan Hedberg
2012-10-23 18:42   ` Anderson Lizardo
2012-10-23 20:59     ` Johan Hedberg
2012-10-23 21:37   ` Marcel Holtmann
2012-10-23 16:53 ` [PATCH 4/7] Bluetooth: Add support for setting LE advertising data Johan Hedberg
2012-10-23 18:30   ` Anderson Lizardo
2012-10-23 21:26     ` Johan Hedberg [this message]
2012-10-25  0:00       ` Anderson Lizardo
2012-10-23 16:53 ` [PATCH 5/7] Bluetooth: Fix updating host feature bits for LE Johan Hedberg
2012-10-23 19:04   ` Marcel Holtmann
2012-10-23 16:54 ` [PATCH 6/7] Bluetooth: Sort feature test macros by bitmask location Johan Hedberg
2012-10-23 19:06   ` Marcel Holtmann
2012-10-23 16:54 ` [PATCH 7/7] Bluetooth: Make use feature test macros Johan Hedberg
2012-10-23 19:06   ` 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=20121023212637.GA17404@x220.ger.corp.intel.com \
    --to=johan.hedberg@gmail.com \
    --cc=anderson.lizardo@openbossa.org \
    --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).