bluetooth: ble_scan: add manufacturer data filter support#783
Open
PizzaAllTheWay wants to merge 3 commits into
Open
bluetooth: ble_scan: add manufacturer data filter support#783PizzaAllTheWay wants to merge 3 commits into
PizzaAllTheWay wants to merge 3 commits into
Conversation
71e578f to
db6182f
Compare
|
You can find the documentation preview for this PR here. |
db6182f to
991a6e7
Compare
991a6e7 to
4dcd5d0
Compare
peknis
requested changes
May 5, 2026
4dcd5d0 to
e3f6b95
Compare
peknis
approved these changes
May 5, 2026
e3f6b95 to
356109f
Compare
b-gent
approved these changes
May 6, 2026
5380769 to
4799e8a
Compare
eivindj-nordic
approved these changes
May 26, 2026
|
|
||
| * Added: | ||
|
|
||
| * The :c:struct:`ble_scan_filter_data` structure as input to the :c:func:`ble_scan_filter_add` function. |
Contributor
There was a problem hiding this comment.
Mmm, this is not part of this PR, right?
Contributor
Author
There was a problem hiding this comment.
That's true, fixed now.
4799e8a to
7ea2315
Compare
Add ble_adv_data_manufacturer_data_find() to locate manufacturer-specific data in an advertising payload and prefix-match it against a target value. Follows the pattern of existing _find helpers for name, uuid and appearance. Modified unit tests to align with changes. Added changelog. Signed-off-by: Martynas Smilingis <martynas.smilingis@nordicsemi.no>
Expand the comment around the match_all cache logic to explain the on-air ADV → SCAN_REQ → SCAN_RSP exchange and why the paired SCAN_RSP is guaranteed to arrive before an ADV from another device. Also clarify the purpose of the buffer swap. No functional changes. Signed-off-by: Martynas Smilingis <martynas.smilingis@nordicsemi.no>
Port the manufacturer data scan filter from NCS to Bare Metal. Adds BLE_SCAN_MANUFACTURER_DATA_FILTER type, manufacturer_data_filter_match flag in ble_scan_filter_match, and plumbing through ble_scan_filter_add, ble_scan_filters_enable, ble_scan_filters_disable, ble_scan_all_filter_remove and the adv report event handler. New Kconfig options: - CONFIG_BLE_SCAN_MANUFACTURER_DATA_COUNT - CONFIG_BLE_SCAN_MANUFACTURER_DATA_MAX_LEN Modified unit tests to align with changes. Added changelog. Signed-off-by: Martynas Smilingis <martynas.smilingis@nordicsemi.no>
7ea2315 to
d71f75f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port the manufacturer data scan filter from NCS to Bare Metal.
ble_adv_data: newble_adv_data_manufacturer_data_find()helper.ble_scan: newBLE_SCAN_MANUFACTURER_DATA_FILTERfilter type withCONFIG_BLE_SCAN_MANUFACTURER_DATA_COUNTandCONFIG_BLE_SCAN_MANUFACTURER_DATA_MAX_LENKconfig options. Wired through filter add/enable/disable/remove and the adv report handler.Unit tests added for the new find helper, filter-add paths and event handler, plus regression guards in existing tests.
Changelog entries added under
lib_ble_advandlib_ble_scan.Clarified the comment around the
match_allADV/SCAN_RSP cache logic.Feature verified end-to-end using locally modified
ble_hrsandble_hrs_centralsamples (peripheral advertising Nordic company ID0x0059and central configured with a manufacturer data filter). Sample changes are not included in this PR.