All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Subject: BTLE scanning - requesting duplicates
Date: Sat, 29 Oct 2022 18:08:19 +0100	[thread overview]
Message-ID: <Y11eA1+dXINIpfn1@shell.armlinux.org.uk> (raw)

Hi,

I'm aware that in the bluetooth dbus API, there is the facility to
request duplicate filtering to be enabled or disabled. I wish to
disable duplicates, as some BTLE devices I have publish data rapidly
in their manufacturer data which I would like to capture.

However, it seems that setting a filter specifying the state of
DuplicateData in a filter does nothing - I get an update from the
MyNewt NumBLE based device about once every scan (so once every 10
seconds) which is way too slow.

I haven't found a way to speed this up. However, what I have noticed
is that no matter what I do, btmon says:

< HCI Command: LE Set Scan Parame.. (0x08|0x000b) plen 7  #88 [hci0] 149.394365
        Type: Active (0x01)
        Interval: 11.250 msec (0x0012)
        Window: 11.250 msec (0x0012)
        Own address type: Random (0x01)
        Filter policy: Accept all advertisement (0x00)
> HCI Event: Command Complete (0x0e) plen 4               #89 [hci0] 149.395217
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2    #90 [hci0] 149.395313
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The hardware is always told to filter duplicates no matter what I do.

Looking at the kernel code, net/bluetooth/hci_sync.c,
hci_active_scan_sync(), it seems that the facility _not_ to filter
duplicate data has never been implemented, except if we have
an "advertisement monitor" attached (what's one of those?)

Is there a reason why bluetoothd doesn't pass the request for
duplicate data to the adapter? Can it be made to do so? How would
that be achieved - can the management commands be modified to do
this?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

                 reply	other threads:[~2022-10-29 17:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Y11eA1+dXINIpfn1@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --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.