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

Workaround scan failure for non-default callback type and empty filters #612

Merged
merged 2 commits into from
Sep 20, 2019

Conversation

dariuszseweryn
Copy link
Owner

Android API may be requested to match first or the last appearance of peripherals. When ScanFilters are not specified or they are empty (match all advertisements) — the hardware/offloaded filtering will likely overwhelm the BT chip — this is why scan is not started with SCAN_FAILED_FEATURE_UNSUPPORTED or SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES error in the result.

This commit adds a workaround by falling back to emulated callback type in the described scenario — similarly as it is working on API 21 and API 18.

Closes #561

Android API may be requested to match first or the last appearance of peripherals. When `ScanFilter`s are not specified or they are empty (match all advertisements) — the hardware/offloaded filtering will likely overwhelm the BT chip — this is why scan is not started with `SCAN_FAILED_FEATURE_UNSUPPORTED` or `SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES` error in the result.

This commit adds a workaround by falling back to emulated callback type in the described scenario — similarily as it is working on API 21 and API 18.
@dariuszseweryn dariuszseweryn merged commit 25ce27e into develop Sep 20, 2019
@dariuszseweryn dariuszseweryn deleted the fix/unsupported_scan_options_no_filters branch September 20, 2019 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant