Skip to content

Commit 503ade4

Browse files
[Telink] Add BLE layer re-initialization if BLE was previously shut down (project-chip#42451)
1 parent ee3a6a1 commit 503ade4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/platform/telink/BLEManagerImpl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,12 @@ CHIP_ERROR BLEManagerImpl::StartAdvertisingProcess(void)
335335
ThreadStackMgrImpl().SetRadioBlocked(true);
336336
#endif
337337

338+
if (!BleLayer::IsInitialized())
339+
{
340+
// Re-initializing the BLE layer after shutdown
341+
ReturnErrorOnFailure(BleLayer::Init(this, this, &DeviceLayer::SystemLayer()));
342+
}
343+
338344
// Init BLE
339345
err = bt_enable(NULL);
340346
VerifyOrReturnError(err == 0, MapErrorZephyr(err));

0 commit comments

Comments
 (0)