sjanc commented on code in PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#discussion_r2081861178
##########
apps/bttester/src/btp_gap.c:
##########
@@ -1992,6 +2000,10 @@ set_filter_accept_list(const void *cmd, uint16_t cmd_len,
SYS_LOG_DBG("");
+ if (cp->list_len != 0) {
+ use_filter_policy = true;
Review Comment:
use_filter_policy = cp->list_len != 0;
##########
apps/bttester/src/btp_gap.c:
##########
@@ -496,7 +496,7 @@ start_advertising(const void *cmd, uint16_t cmd_len,
i += ad[adv_len].data_len;
}
- for (sd_len = 0U; i < cp->scan_rsp_len; sd_len++) {
+ for (i = 0, sd_len = 0U; i < cp->scan_rsp_len; sd_len++) {
Review Comment:
this will cause scan response to set from adv data... I think (not tested)
that correct fix would be to change loop end condition here to check for both
ad and sd len
##########
apps/bttester/src/btp_gap.c:
##########
@@ -515,6 +515,10 @@ 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) {
Review Comment:
we may also have to unset it so I'd suggest
adv_params.scannable = sd_len != 0;
##########
apps/bttester/src/btp_gap.c:
##########
@@ -64,6 +64,9 @@ static ble_addr_t peer_id_addr;
static ble_addr_t peer_ota_addr;
static bool encrypted = false;
+static bool use_filter_policy = false;
+#define FILTER_POLICY_SCAN_CONN_ONLY_FROM_LIST 0x03
Review Comment:
this should be in hci_common.h
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]