2011-04-20 22:20:57

by Claudio Takahasi

[permalink] [raw]
Subject: Read RSSI through Management Interface?

Hi guys,

we need to read the RSSI of LE and basic rate connections to implement
the Proximity profile. RSSI included in the advertising packets can't
be used for Proximity, it requires an "active" connection.

Here are some suggestions:

1. Add a new command to mgmt interface to add a given address into a
RSSI "monitoring list".
When the connection is established the kernel will automatically
track the RSSI of the connection on regular intervals sending
HCI_Read_RSSI. Read RSSI value can be reported through a new event in
the management interface

Forgetting SMP, we can keep the hciops compatibility implementing the
same logic inside the hciops plugin.

2. Add a new command to mgmt interface to actively read the RSSI of a
given connection/address

Approach (1) seems to be more feasible: address multiple address
asynchronously. In my opinion, approach(2) will not be transparent
enough to our use cases.

Any other idea?

Cheers,
Claudio.


2011-04-26 02:18:28

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Read RSSI through Management Interface?

Hi Claudio,

> >> we need to read the RSSI of LE and basic rate connections to implement
> >> the Proximity profile. RSSI included in the advertising packets can't
> >> be used for Proximity, it requires an "active" connection.
> >>
> >> Here are some suggestions:
> >>
> >> 1. Add a new command to mgmt interface to add a given address into a
> >> RSSI "monitoring list".
> >> When the connection is established the kernel will automatically
> >> track the RSSI of the connection on regular intervals sending
> >> HCI_Read_RSSI. Read RSSI value can be reported through a new event in
> >> the management interface
> >
> > the HCI_Read_RSSI on basic rate is a useless command since it depends
> > highly on the power control. Especially since all Bluetooth chips try to
> > keep this one optimized.
> >
> > The RSSI from an active connection does not really give us much. And in
> > addition we have a lot of legacy BR chips just plain failing this
> > command and returning static data. How do you plan to address this?
>
> I don't expect to have an accurate measurement of the RSSI for basic
> rate, we are only trying to have the profile operational on both
> transports. If it is not feasible enable it for basic rate we can keep
> only Link Loss service running.
>
> For LE, I hope we get better results. The fact is: we need a way to
> get the RSSI value of an active connection on regular intervals.
> Any other suggestion to implement this service keeping transport abstraction?

the problem with RSSI is really that for basic rate, it is different
from the HCI_Read_RSSI command and Inquiry_Result_with_RSSI event. The
value from inquiry is most likely useful while the connected value is
rather pointless.

The HCI_Read_Link_Quality is way better, but the problem is that its
implementation is vendor specific :(

Regards

Marcel



2011-04-22 02:58:40

by Claudio Takahasi

[permalink] [raw]
Subject: Re: Read RSSI through Management Interface?

Hi Marcel,

On Thu, Apr 21, 2011 at 12:36 AM, Marcel Holtmann <[email protected]> wro=
te:
> Hi Claudio,
>
>> we need to read the RSSI of LE and basic rate connections to implement
>> the Proximity profile. RSSI included in the advertising packets can't
>> be used for Proximity, it requires an "active" connection.
>>
>> Here are some suggestions:
>>
>> 1. Add a new command to mgmt interface to add a given address into a
>> RSSI "monitoring list".
>> =C2=A0 =C2=A0When the connection is established the kernel will automati=
cally
>> track the RSSI of the connection on regular intervals sending
>> HCI_Read_RSSI. Read RSSI value can be reported through a new event in
>> the management interface
>
> the HCI_Read_RSSI on basic rate is a useless command since it depends
> highly on the power control. Especially since all Bluetooth chips try to
> keep this one optimized.
>
> The RSSI from an active connection does not really give us much. And in
> addition we have a lot of legacy BR chips just plain failing this
> command and returning static data. How do you plan to address this?
>
> Regards
>
> Marcel

I don't expect to have an accurate measurement of the RSSI for basic
rate, we are only trying to have the profile operational on both
transports. If it is not feasible enable it for basic rate we can keep
only Link Loss service running.

For LE, I hope we get better results. The fact is: we need a way to
get the RSSI value of an active connection on regular intervals.
Any other suggestion to implement this service keeping transport abstractio=
n?

Regards,
Claudio

2011-04-22 02:45:29

by Claudio Takahasi

[permalink] [raw]
Subject: Re: Read RSSI through Management Interface?

Hi Gustavo,

On Wed, Apr 20, 2011 at 10:18 PM, Gustavo F. Padovan
<[email protected]> wrote:
> Hi Claudio,
>
> * Claudio Takahasi <[email protected]> [2011-04-20 19:20:57 =
-0300]:
>
>> Hi guys,
>>
>> we need to read the RSSI of LE and basic rate connections to implement
>> the Proximity profile. RSSI included in the advertising packets can't
>> be used for Proximity, it requires an "active" connection.
>>
>> Here are some suggestions:
>>
>> 1. Add a new command to mgmt interface to add a given address into a
>> RSSI "monitoring list".
>> =C2=A0 =C2=A0When the connection is established the kernel will automati=
cally
>> track the RSSI of the connection on regular intervals sending
>> HCI_Read_RSSI. Read RSSI value can be reported through a new event in
>> the management interface
>>
>> Forgetting SMP, we can keep the hciops compatibility implementing the
>> same logic inside the hciops plugin.
>
> I'm against this in hciops. Let's add the new features only to mgmtopts, =
so we
> force people to use it and deprecate hciops.

We need to keep both "interfaces" working, the same way that we are
trying to do for discovery.
When hciops will be removed?

Anyway, if someone wants to use LE Security Manager/Pairing it is
necessary to use the Management Interface. If security is not
essential for LE, hciops can be used. For basic rate, it will be
functional on both "interfaces".

Claudio.
>
>>
>> 2. Add a new command to mgmt interface to actively read the RSSI of a
>> given connection/address
>
> If the user use this in the wrong way it will waste power. Let's
> do (1) and not give him this option to actively read RSSI.
>
> --
> Gustavo F. Padovan
> http://profusion.mobi
>

2011-04-21 03:36:35

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Read RSSI through Management Interface?

Hi Claudio,

> we need to read the RSSI of LE and basic rate connections to implement
> the Proximity profile. RSSI included in the advertising packets can't
> be used for Proximity, it requires an "active" connection.
>
> Here are some suggestions:
>
> 1. Add a new command to mgmt interface to add a given address into a
> RSSI "monitoring list".
> When the connection is established the kernel will automatically
> track the RSSI of the connection on regular intervals sending
> HCI_Read_RSSI. Read RSSI value can be reported through a new event in
> the management interface

the HCI_Read_RSSI on basic rate is a useless command since it depends
highly on the power control. Especially since all Bluetooth chips try to
keep this one optimized.

The RSSI from an active connection does not really give us much. And in
addition we have a lot of legacy BR chips just plain failing this
command and returning static data. How do you plan to address this?

Regards

Marcel



2011-04-21 01:18:52

by Gustavo Padovan

[permalink] [raw]
Subject: Re: Read RSSI through Management Interface?

Hi Claudio,

* Claudio Takahasi <[email protected]> [2011-04-20 19:20:57 -0300]:

> Hi guys,
>
> we need to read the RSSI of LE and basic rate connections to implement
> the Proximity profile. RSSI included in the advertising packets can't
> be used for Proximity, it requires an "active" connection.
>
> Here are some suggestions:
>
> 1. Add a new command to mgmt interface to add a given address into a
> RSSI "monitoring list".
> When the connection is established the kernel will automatically
> track the RSSI of the connection on regular intervals sending
> HCI_Read_RSSI. Read RSSI value can be reported through a new event in
> the management interface
>
> Forgetting SMP, we can keep the hciops compatibility implementing the
> same logic inside the hciops plugin.

I'm against this in hciops. Let's add the new features only to mgmtopts, so we
force people to use it and deprecate hciops.

>
> 2. Add a new command to mgmt interface to actively read the RSSI of a
> given connection/address

If the user use this in the wrong way it will waste power. Let's
do (1) and not give him this option to actively read RSSI.

--
Gustavo F. Padovan
http://profusion.mobi

2011-05-11 11:22:15

by Arun Kumar SINGH

[permalink] [raw]
Subject: RE: Read RSSI through Management Interface?

SGkgQ2xhdWRpbywgR3VzdGF2bywNCg0KPj4+IDEuIEFkZCBhIG5ldyBjb21tYW5kIHRvDQo+bWdt
dCBpbnRlcmZhY2UgdG8gYWRkIGENCj5naXZlbiBhZGRyZXNzIGludG8gYQ0KPj4+IFJTU0kgIm1v
bml0b3JpbmcgbGlzdCIuDQo+Pj4gwqAgwqBXaGVuIHRoZSBjb25uZWN0aW9uIGlzDQo+ZXN0YWJs
aXNoZWQgdGhlIGtlcm5lbCB3aWxsDQo+YXV0b21hdGljYWxseQ0KPj4+IHRyYWNrIHRoZSBSU1NJ
IG9mIHRoZQ0KPmNvbm5lY3Rpb24gb24gcmVndWxhcg0KPmludGVydmFscyBzZW5kaW5nDQo+Pj4g
SENJX1JlYWRfUlNTSS4gUmVhZCBSU1NJDQo+dmFsdWUgY2FuIGJlIHJlcG9ydGVkDQo+dGhyb3Vn
aCBhIG5ldyBldmVudCBpbg0KPj4+IHRoZSBtYW5hZ2VtZW50IGludGVyZmFjZQ0KPj4+DQo+Pj4g
Rm9yZ2V0dGluZyBTTVAsIHdlIGNhbg0KPmtlZXAgdGhlIGhjaW9wcw0KPmNvbXBhdGliaWxpdHkg
aW1wbGVtZW50aW5nDQo+dGhlDQo+Pj4gc2FtZSBsb2dpYyBpbnNpZGUgdGhlDQo+aGNpb3BzIHBs
dWdpbi4NCj4+DQo+PiBJJ20gYW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