linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
To: "Von Dentz, Luiz" <luiz.von.dentz@intel.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Bug: no PropertiesChanged signal for org.bluez.Device1.AdvertisingData
Date: Tue, 8 Jan 2019 20:00:49 +0100	[thread overview]
Message-ID: <5161f3b4-1c6b-6c53-4e6f-6f57ba12d3e5@invoxia.com> (raw)
In-Reply-To: <CACumGOJrN1LFBb6uuH1T92eirzQyUMuai1qQ8SeipzJb=bvHUg@mail.gmail.com>

Hello Luiz,

On 08/01/2019 17:12, Von Dentz, Luiz wrote:
> Hi Arnaud,
>
> On Tue, Jan 8, 2019 at 1:03 PM Arnaud Mouiche
> <arnaud.mouiche@invoxia.com> wrote:
>> Hello Luiz,
>>
>> I was playing with latest sources (git) and experimental features
>> enabled in order to:
>> - perform a BLE scan
>> - find AdvertisingData (in particularly the BT_AD_INDOOR_POSITIONING (0x25))
>>
>> I found that:
>> - once scanning is done org.bluez.Device1.AdvertisingData is correctly
>> set to the expected value (the one advertised)
>> - yet, there was no PropertiesChanged signal corresponding to this
>> AdvertisingData property update (despite I received PropertiesChanged
>> for RSSI)
> Is the Data changing? If you want to get informed of each
> advertisement regardless if it has changed you should set
> DuplicateData filter:
>
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt#n107
>
> If that doesn't work then perhaps we have a bug somewhere.

Yes "duplicate" is true

>
>> Indeed src/device.c:: add_data() performs a particular filtering to only
>> signal EIR_TRANSPORT_DISCOVERY data.
>>
>>> static void add_data(void *data, void *user_data)
>>> {
>>>      struct eir_ad *ad = data;
>>>      struct btd_device *dev = user_data;
>>>
>>>      if (!bt_ad_add_data(dev->ad, ad->type, ad->data, ad->len))
>>>          return;
>>>
>>>      if (ad->type == EIR_TRANSPORT_DISCOVERY)
>>>          g_dbus_emit_property_changed(dbus_conn, dev->path,
>>>                          DEVICE_INTERFACE,
>>>                          "AdvertisingData");
>>> }
>> Is there a particular reason for this behavior ?
> If I recall this is not to spam the bus if we are not actively discovery.

I did some tracing and the "ad->type == EIR_TRANSPORT_DISCOVERY" test is 
the one filtering the property change signal.

Should we set a white/black list for this kind of filtering ? or 
something else... ?

Regards,
Arnaud


      reply	other threads:[~2019-01-08 19:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 16:03 Bug: no PropertiesChanged signal for org.bluez.Device1.AdvertisingData Arnaud Mouiche
2019-01-08 16:12 ` Von Dentz, Luiz
2019-01-08 19:00   ` Arnaud Mouiche [this message]

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=5161f3b4-1c6b-6c53-4e6f-6f57ba12d3e5@invoxia.com \
    --to=arnaud.mouiche@invoxia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.von.dentz@intel.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 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).