You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "szymon-czapracki (via GitHub)" <gi...@apache.org> on 2025/05/09 12:43:41 UTC
[PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
szymon-czapracki opened a new pull request, #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035
Introduce setting filter policy when accept list is used.
Fix for improper loop initialization during advertising setup.
Those fixes are related to GAP/BROB/BCST/BV-05-C test failing.
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#discussion_r2082022456
##########
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:
This will need to be further discussed, as there are situations where sd_len is actually 0, but we don't want to set scannable to 0. TBD
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#issuecomment-2866408231
https://github.com/apache/mynewt-nimble/issues/2007
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#discussion_r2084233484
##########
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:
Changed condition to check for sd_len & legacy_pdu, as we don't always want to set scannable to 0 if no sd data is present (ble_gap_ext_adv_configure will result in an error).
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "sjanc (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#discussion_r2082021241
##########
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:
Done, check is now related to sum of the sets from cp.
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#discussion_r2082022945
##########
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:
Done
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "sjanc (via GitHub)" <gi...@apache.org>.
sjanc merged PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#discussion_r2082022456
##########
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:
This will need to be further discussed, as there are situations where sd_len is actually 0, but we don't want to set scannable to 0. TBD
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] apps/bttester: Filter policy setup & advertising data fix [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #2035:
URL: https://github.com/apache/mynewt-nimble/pull/2035#discussion_r2082023425
##########
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:
Used the definition from hci_common.h (already existed) done.
--
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: notifications-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org