Skip to content

Commit

Permalink
samples: matter: allow matter samples to retry BT advertising
Browse files Browse the repository at this point in the history
* bump Matter manifest to pull BLEMgr fixes
* allow matter samples to retry to start advertising when
  the previous request failed

Signed-off-by: Marcin Kajor <[email protected]>
  • Loading branch information
markaj-nordic authored and rlubos committed Feb 21, 2024
1 parent 0814d9b commit b8e601f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion samples/matter/common/src/board/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,14 @@ void Board::StartBLEAdvertisement()
}

if (chip::DeviceLayer::ConnectivityMgr().IsBLEAdvertisingEnabled()) {
LOG_INF("BLE advertising is already enabled");
if (!chip::DeviceLayer::ConnectivityMgr().IsBLEAdvertising()) {
LOG_INF("BLE advertising is already enabled but not active - restarting");
/* Kick the BLEMgr state machine to retry to start advertising one more time. */
CHIP_ERROR err = chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(true);
VerifyOrReturn(CHIP_NO_ERROR == err, LOG_ERR("Could not restart Matter advertisement"));
} else {
LOG_INF("BLE advertising is already enabled and active");
}
return;
}

Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ manifest:
- name: matter
repo-path: sdk-connectedhomeip
path: modules/lib/matter
revision: a4d48b7c8b55cbe6c27665cd90e33ceba2e78615
revision: 623ef0a639167458d86ae83414aa78285e90b34d
submodules:
- name: nlio
path: third_party/nlio/repo
Expand Down

0 comments on commit b8e601f

Please sign in to comment.