All of lore.kernel.org
 help / color / mirror / Atom feed
* BTLE scanning - requesting duplicates
@ 2022-10-29 17:08 Russell King (Oracle)
  0 siblings, 0 replies; only message in thread
From: Russell King (Oracle) @ 2022-10-29 17:08 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	linux-bluetooth

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!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-29 17:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-29 17:08 BTLE scanning - requesting duplicates Russell King (Oracle)

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.