This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit cc1418744e867888c0eef48606a1b7d1aa8b0b66
Author: Szymon Czapracki <[email protected]>
AuthorDate: Fri May 9 18:15:51 2025 +0200

    apps/bttester: Set scannable flag if data is present
    
    Set scannable option for adv_params when scan
    response data is provided.
    Ensure extended advertising is configured correctly.
---
 apps/bttester/src/btp_gap.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/apps/bttester/src/btp_gap.c b/apps/bttester/src/btp_gap.c
index b7f7090e8..0f0fcb31f 100644
--- a/apps/bttester/src/btp_gap.c
+++ b/apps/bttester/src/btp_gap.c
@@ -455,7 +455,7 @@ start_advertising(const void *cmd, uint16_t cmd_len,
     struct btp_gap_start_advertising_rp *rp = rsp;
     uint8_t buf[BLE_HS_ADV_MAX_SZ];
     uint8_t buf_len = 0;
-    uint8_t adv_len, sd_len;
+    uint8_t adv_len, sd_len = 0;
     uint8_t addr_type;
     uint32_t duration;
     int err;
@@ -517,6 +517,11 @@ start_advertising(const void *cmd, uint16_t cmd_len,
 
 #if MYNEWT_VAL(BLE_EXT_ADV)
     adv_params.own_addr_type = own_addr_type;
+
+    if (sd_len != 0 && adv_params.legacy_pdu) {
+        adv_params.scannable = 1;
+    }
+
     if (use_filter_policy) {
         adv_params.filter_policy = BLE_HCI_ADV_FILT_BOTH;
     }

Reply via email to