All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH 6/9] android/bluetooth: Add support for remote device RSSI
Date: Thu, 12 Dec 2013 09:03:29 -0200	[thread overview]
Message-ID: <CAJdJm_P9Y2XU=X98c-hBTDz40HPXLtu3Q-8U9uQdQT2KXXrLXw@mail.gmail.com> (raw)
In-Reply-To: <3353914.oihVPgriBc@uw000953>

Hi Szymon,

On Thu, Dec 12, 2013 at 5:58 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
>> On Wed, Dec 11, 2013 at 7:31 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
>> \> @@ -2306,11 +2309,13 @@ static uint8_t
>> get_device_friendly_name(struct device *dev)
>> >
>> >  static uint8_t get_device_rssi(struct device *dev)
>> >  {
>> > -       DBG("Not implemented");
>> > +       if (!dev->rssi)
>> > +               return HAL_STATUS_FAILED;
>>
>> 0 dBm is a valid RSSI value, so I suppose this code needs some other
>> way to identify an uninitialized value (e.g. a second boolean field.)
>
> Kernel sends rssi==0 if rssi info was not present on inquiry so I used this
> value, but maybe it should use 127 for that.. ? (yet, this might cause trouble
> as linux bluetoothd is checking 0 as well)

I remember commenting on this when mgmt API (it was for TX Power,
which is more common to be 0 dBm, but I can't remember what was the
result of the discussion). In any case, I think handling this way will
make devices that use TX Power higher than 0 dBm (and thus can make a
0dBm RSSI possible) not report their RSSI. It is not common IMHO, but
it is possible.

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

  reply	other threads:[~2013-12-12 11:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 10:31 [PATCH 1/9] android/bluetooth: Add support for reporting adapter type property Szymon Janc
2013-12-11 10:31 ` [PATCH 2/9] android/bluetooth: Add support for adapter bonded devices property Szymon Janc
2013-12-11 10:31 ` [PATCH 3/9] android/bluetooth: Add support for remote device friendly name Szymon Janc
2013-12-11 10:31 ` [PATCH 4/9] android/bluetooth: Free devices on service unregister Szymon Janc
2013-12-11 10:31 ` [PATCH 5/9] android/bluetooth: Add support for remote device class Szymon Janc
2013-12-11 10:31 ` [PATCH 6/9] android/bluetooth: Add support for remote device RSSI Szymon Janc
2013-12-12  0:04   ` Anderson Lizardo
2013-12-12  8:58     ` Szymon Janc
2013-12-12 11:03       ` Anderson Lizardo [this message]
2013-12-11 10:31 ` [PATCH 7/9] android/bluetooth: Add support for get remote device properties command Szymon Janc
2013-12-11 10:31 ` [PATCH 8/9] android/bluetooth: Add support for remote device type property Szymon Janc
2013-12-11 10:31 ` [PATCH 9/9] android/bluetooth: Code style and whitespace cleanup Szymon Janc
2013-12-11 13:50 ` [PATCH 1/9] android/bluetooth: Add support for reporting adapter type property Johan Hedberg

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='CAJdJm_P9Y2XU=X98c-hBTDz40HPXLtu3Q-8U9uQdQT2KXXrLXw@mail.gmail.com' \
    --to=anderson.lizardo@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=szymon.janc@tieto.com \
    /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.