From 0ea32c88c7309ae2e06affd7708cab539818d098 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 29 Apr 2025 12:09:42 +0530 Subject: [PATCH] fix(nimble): Expose adv_find_field API so application can parse specific AD types in adv reports --- nimble/host/include/host/ble_hs_adv.h | 3 +++ nimble/host/src/ble_hs_adv_priv.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nimble/host/include/host/ble_hs_adv.h b/nimble/host/include/host/ble_hs_adv.h index f05ec1e12..5d2ca2a6a 100644 --- a/nimble/host/include/host/ble_hs_adv.h +++ b/nimble/host/include/host/ble_hs_adv.h @@ -233,6 +233,9 @@ int ble_hs_adv_parse_fields(struct ble_hs_adv_fields *adv_fields, int ble_hs_adv_parse(const uint8_t *data, uint8_t length, ble_hs_adv_parse_func_t func, void *user_data); +int ble_hs_adv_find_field(uint8_t type, const uint8_t *data, uint8_t length, + const struct ble_hs_adv_field **out); + #ifdef __cplusplus } #endif diff --git a/nimble/host/src/ble_hs_adv_priv.h b/nimble/host/src/ble_hs_adv_priv.h index 5c8a6ecc9..669850fc5 100644 --- a/nimble/host/src/ble_hs_adv_priv.h +++ b/nimble/host/src/ble_hs_adv_priv.h @@ -26,8 +26,6 @@ extern "C" { int ble_hs_adv_set_flat(uint8_t type, int data_len, const void *data, uint8_t *dst, uint8_t *dst_len, uint8_t max_len); -int ble_hs_adv_find_field(uint8_t type, const uint8_t *data, uint8_t length, - const struct ble_hs_adv_field **out); #ifdef __cplusplus }