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 takes forever and no timeout #285

Open
terrancewong opened this issue Sep 30, 2024 · 0 comments
Open

scan takes forever and no timeout #285

terrancewong opened this issue Sep 30, 2024 · 0 comments

Comments

@terrancewong
Copy link

terrancewong commented Sep 30, 2024

  • gattlib version: Release 0.7.2
  • Debian testing (trixie)
  • bluez: 5.77-1
  • 8087:0032 Intel Corp. AX210 Bluetooth

examples/notification/notification sometimes scan discovers nothing, and never timeout, just stuck there. Ececuting examples/ble_scan/ble_scan or notification again and again occasionally triggers something, then notification can find my device.

#define BLE_SCAN_TIMEOUT 10
...
gattlib_adapter_scan_enable(adapter, ble_discovered_device, BLE_SCAN_TIMEOUT, addr);

command log

 % ./examples/notification/notification 5C:53:10:B7:D9:4B ffe4
[22797.607] Scanning...
^C  # waited for more than 1min
 % ./examples/notification/notification 5C:53:10:B7:D9:4B ffe4
[22883.581] Scanning...
^C # waited for more than 1min
 % ./examples/notification/notification 5C:53:10:B7:D9:4B ffe4
[22948.065] Scanning...
gattlib_notification: Found bluetooth device '5C:53:10:B7:D9:4B' with RSSI:-60
gattlib_notification: Wait for notification for 30 seconds...
[22968.614] Notification Handler: 00 97 7e 74 00 ab 0a 2b 15 2c 00 00 18 9c 39 
...
 % ./examples/notification/notification 5C:53:10:B7:D9:4B ffe4
[23060.784] Scanning...
# stuck again
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

1 participant