Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
nmtoan91 committed Nov 9, 2023
1 parent 02615b7 commit 967b97f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions examples/bridge-app/echonetlinux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,30 @@ void * bridge_polling_thread(void * context)
printf("\n\n ==================== Perform Exit ======== \n ");
exit(0);
}
else if (ch == 'P')
{
printf("\n\n ==================== Perform Pairing mode ======== \n ");
if (ConnectivityMgr().IsBLEAdvertisingEnabled())
{
ConnectivityMgr().SetBLEAdvertisingEnabled(false);
printf("Stopped BLE Advertising!\n");
}
else
{
ConnectivityMgr().SetBLEAdvertisingEnabled(true);
ConnectivityMgr().SetBLEAdvertisingMode(ConnectivityMgr().kFastAdvertising);

// if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() == CHIP_NO_ERROR)
// {
// printf("Started BLE Advertising!\n");
// }
// else
// {
// printf("OpenBasicCommissioningWindow() failed\n");
// }
}

}
else if(ch == 'e')
{
printf("\n\n\n================ List of current Matter endpoints ===============\n");
Expand Down

0 comments on commit 967b97f

Please sign in to comment.