dariuszseweryn / RxAndroidBle

An Android Bluetooth Low Energy (BLE) Library with RxJava3 interface
http://polidea.github.io/RxAndroidBle/
Apache License 2.0
3.44k stars 583 forks source link

ScanFilter is not working #860

Open piotrek-dosell opened 1 month ago

piotrek-dosell commented 1 month ago

Describe the bug ScanFilter is not working Tested with setDeviceName() only Tested with setServiceUuid() only

To Reproduce Look at this branch: https://github.com/piotrek-dosell/RxAndroidBle/tree/scanfilter_issue

  1. Change lookFor to a Ble name present in your environment Line 73 val lookFor = "Dosell"

Expected behavior

  1. Now comment Line 75: .setDeviceName(lookFor) https://github.com/dariuszseweryn/RxAndroidBle/commit/e1e2f64145e772732f269d27c16a54a9662d0648#diff-180e9e7bbbb041e547483ad7c95469f2010828f143aaf3643a82fe4fd3bf72e6R75 Smartphone (please complete the following information):
    • Device: Samsung SM-G398FN (and another Sony device)
    • OS: Android 11
    • Library version: e35ae86 - (origin/master, origin/HEAD, master) Migrated BleCannotSetCharacteristicNotificationExceptionTest. (3 months ago)

Logs from the application when bug occurs (this will greatly help in quick understanding the problem) Just run the sample and try with and without setDeviceName() Screenshot from 2024-09-20 07-52-50

Additional context Add any other context about the problem here.

dariuszseweryn commented 1 month ago

As discussed offline: