You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "piotrnarajowski (via GitHub)" <gi...@apache.org> on 2026/08/17 11:55:11 UTC
[PR] apps/bttester: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
piotrnarajowski opened a new pull request, #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284
gap_conn_find_by_addr lookup relied on the global peer_id_addr variable to perform address matching. In test cases with multiple concurrent connections, peer_id_addr was overwritten by the most recent event (e.g. connected, identity resolved) causing comparison with address command parameter in BTP cmds to fail.
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "codecoup-tester (via GitHub)" <gi...@apache.org>.
codecoup-tester commented on PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5600384519
AutoPTS Bot results:
<details><summary>Failed tests (1)</summary>GAP GAP/BROB/BCST/BV-04-C BTP ERROR - ERRATA https://github.com/apache/mynewt-nimble/issues/1029</details>
<details><summary>Successful tests (9)</summary>GAP GAP/BROB/BCST/BV-01-C PASS<br>GAP GAP/BROB/BCST/BV-02-C PASS<br>GAP GAP/BROB/BCST/BV-03-C PASS<br>GAP GAP/BROB/BCST/BV-05-C PASS<br>GAP GAP/BROB/OBSV/BV-01-C PASS<br>GAP GAP/BROB/OBSV/BV-02-C PASS<br>GAP GAP/BROB/OBSV/BV-05-C PASS<br>GAP GAP/BROB/OBSV/BV-06-C PASS<br>GAP GAP/DISC/NONM/BV-01-C PASS</details>
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#discussion_r3805588466
##########
apps/bttester/src/btp_gap.c:
##########
@@ -94,29 +94,19 @@ gap_conn_find_by_addr(const ble_addr_t *dev_addr,
struct ble_gap_conn_desc *out_desc)
{
ble_addr_t addr = *dev_addr;
+ int rc;
- if (memcmp(BLE_ADDR_ANY, &peer_id_addr, 6) == 0) {
- return ble_gap_conn_find_by_addr(&addr, out_desc);
+ rc = ble_gap_conn_find_by_addr(&addr, out_desc);
+ if (rc == 0) {
+ return 0;
}
- if (BLE_ADDR_IS_RPA(&addr)) {
- if (ble_addr_cmp(&peer_ota_addr, &addr) != 0) {
- return -1;
- }
-
- return ble_gap_conn_find_by_addr(&addr, out_desc);
- } else {
- if (ble_addr_cmp(&peer_id_addr, &addr) != 0) {
- return -1;
- }
-
- if (BLE_ADDR_IS_RPA(&peer_ota_addr)) {
- /* Change addr type to ID addr */
- addr.type |= 2;
- }
-
- return ble_gap_conn_find_by_addr(&addr, out_desc);
+ if ((addr.type & 2) == 0) {
+ addr.type |= 2;
Review Comment:
Maybe instead of "2" we can use the definitions of this number? (BLE_ADDR_PUBLIC_ID if I'm not mistaken).
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "piotrnarajowski (via GitHub)" <gi...@apache.org>.
piotrnarajowski commented on PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5600094346
> shouldn't those global peer_ota_addr and peer_id_addr be also removed from code?
Yes, it is safe to remove them.
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "codecoup-tester (via GitHub)" <gi...@apache.org>.
codecoup-tester commented on PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5352637430
Scheduled PR https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5352614379, board: nrf52, estimated start time: 09:13:38, test case count: 1, estimated duration: 0:11:14<details><summary>Test cases to be run</summary>GATT/SR/GAN/BV-02-C</details>
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "codecoup-tester (via GitHub)" <gi...@apache.org>.
codecoup-tester commented on PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5600141925
Scheduled PR https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5600115967, board: nrf52, estimated start time: 12:09:55, test case count: 10, estimated duration: 0:13:45<details><summary>Test cases to be run</summary>GAP/BROB/BCST/BV-01-C<br>GAP/BROB/BCST/BV-02-C<br>GAP/BROB/BCST/BV-03-C<br>GAP/BROB/BCST/BV-04-C<br>GAP/BROB/BCST/BV-05-C<br>GAP/BROB/OBSV/BV-01-C<br>GAP/BROB/OBSV/BV-02-C<br>GAP/BROB/OBSV/BV-05-C<br>GAP/BROB/OBSV/BV-06-C<br>GAP/DISC/NONM/BV-01-C</details>
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "codecoup-tester (via GitHub)" <gi...@apache.org>.
codecoup-tester commented on PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5352757676
AutoPTS Bot results:
No failed test found.
<details><summary>Successful tests (1)</summary>GATT GATT/SR/GAN/BV-02-C PASS</details>
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "sjanc (via GitHub)" <gi...@apache.org>.
sjanc merged PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "piotrnarajowski (via GitHub)" <gi...@apache.org>.
piotrnarajowski commented on PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5600115967
#AutoPTS run mynewt GAP --test_case_limit 10
--
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: fix address lookup in gap_conn_find_by_addr [mynewt-nimble]
Posted by "piotrnarajowski (via GitHub)" <gi...@apache.org>.
piotrnarajowski commented on PR #2284:
URL: https://github.com/apache/mynewt-nimble/pull/2284#issuecomment-5352614379
#AutoPTS run mynewt GATT/SR/GAN/BV-02-C
--
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