Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan with transport=auto delivers unreliable scan results. #573

Open
dezi opened this issue Aug 12, 2023 · 3 comments
Open

Scan with transport=auto delivers unreliable scan results. #573

dezi opened this issue Aug 12, 2023 · 3 comments

Comments

@dezi
Copy link

dezi commented Aug 12, 2023

Hi,

i had trouble connecting a ble thermometer to my app under ubuntu/linux.

The device did not reliable show up in the discovery.

Changing the scan parameters from transport=auto to transport=le fixed the problem.

Problem now: I also have to discover br/edr devices at the same time.

Workaround solution:

Switching the DiscoveryFilter-Set from transport=le to transport=bredr
every 250 ms while the discovery is still active.

Interestingly, this workaround also fixes my problem from issue

#572

Regards, dezi

Excerpt from btmon log:

@ MGMT Command: Start Service Di.. (0x003a) plen 4 {0x0001} [hci0] 2463.114751
Address type: 0x06
LE Public
LE Random
RSSI: invalid (0x7f)

@ MGMT Command: Stop Discovery (0x0024) plen 1 {0x0001} [hci0] 2463.511880
Address type: 0x06
LE Public
LE Random
< HCI Command: LE Set Extend.. (0x08|0x0042) plen 6 #134809 [hci0] 2463.511920

@ MGMT Command: Start Service Di.. (0x003a) plen 4 {0x0001} [hci0] 2463.516787
Address type: 0x01
BR/EDR
RSSI: invalid (0x7f)
UUIDs: 0

@ MGMT Command: Stop Discovery (0x0024) plen 1 {0x0001} [hci0] 2463.613490
Address type: 0x01
BR/EDR
< HCI Command: Inquiry Cancel (0x01|0x0002) plen 0 #134813 [hci0] 2463.613537

HCI Event: Command Complete (0x0e) plen 4 #134814 [hci0] 2463.618589

@jsmif
Copy link

jsmif commented Sep 3, 2023

@dezi how specifically did you do this workaround?

Workaround solution:

Switching the DiscoveryFilter-Set from transport=le to transport=bredr
every 250 ms while the discovery is still active.

Based on my observations which I posted in #572 I suspect the workaround is working because although bluetoothctl dies, you're effectively restarting it every 250ms. So I am interested in using that workaround for now too until #572 is fixed, if it's something easily scriptable from the CLI.

@dezi
Copy link
Author

dezi commented Sep 4, 2023

@jsmif

I have a self developed long term go process running, which uses the go-package github.com/muka/go-bluetooth.

The package is based on the bluez dBus interfaces and has api methods to start/stop scanning.

@Vudentz
Copy link
Contributor

Vudentz commented Sep 6, 2023

Looks like a duplicated of #510, try with the following change: bluez/bluetooth-next@52bf4fd

intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Sep 14, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
github-actions bot pushed a commit to tedd-an/bluetooth-next that referenced this issue Sep 14, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
github-actions bot pushed a commit to BluezTestBot/bluetooth-next that referenced this issue Sep 14, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
github-actions bot pushed a commit to BluezTestBot/bluetooth-next that referenced this issue Nov 22, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
github-actions bot pushed a commit to tedd-an/bluetooth-next that referenced this issue Nov 22, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Nov 23, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
BluezTestBot pushed a commit to bluez/bluetooth-next that referenced this issue Nov 27, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
srcres258 pushed a commit to srcres258/linux-doc that referenced this issue Dec 18, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
BluezTestBot pushed a commit to bluez/bluetooth-next that referenced this issue Dec 19, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
BluezTestBot pushed a commit to bluez/bluetooth-next that referenced this issue Dec 22, 2023
This removes le_restart_scan work and instead just disables controller
duplicate filtering when discovery result_filtering is enabled and
HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

Link: bluez/bluez#573
Link: bluez/bluez#572
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
bella485 pushed a commit to bella485/centos-stream-9 that referenced this issue May 1, 2024
JIRA: https://issues.redhat.com/browse/RHEL-30099

commit 78db544b5d276b70c6ea2c2909ffed96b10229a3
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Wed Sep 6 14:13:35 2023 -0700

    Bluetooth: hci_core: Remove le_restart_scan work

    This removes le_restart_scan work and instead just disables controller
    duplicate filtering when discovery result_filtering is enabled and
    HCI_QUIRK_STRICT_DUPLICATE_FILTER is set.

    Link: bluez/bluez#573
    Link: bluez/bluez#572
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Signed-off-by: David Marlin <dmarlin@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants