Skip to content

Commit

Permalink
Add SSID and password to chip-tool pairing (#4054)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpschoedel authored Dec 2, 2020
1 parent cb21694 commit cb4fa9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/chip-tool/commands/pairing/PairingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void PairingCommand::OnStatusUpdate(RendezvousSessionDelegate::Status status)
void PairingCommand::OnNetworkCredentialsRequested(RendezvousDeviceCredentialsDelegate * callback)
{
ChipLogProgress(chipTool, "OnNetworkCredentialsRequested");
callback->SendNetworkCredentials(mSSID, mPassword);
}

void PairingCommand::OnOperationalCredentialsRequested(const char * csr, size_t csr_length,
Expand Down
2 changes: 2 additions & 0 deletions examples/chip-tool/commands/pairing/PairingCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class PairingCommand : public Command, public chip::Controller::DevicePairingDel
AddArgument("device-remote-port", 0, UINT16_MAX, &mRemotePort);
break;
case PairingMode::Ble:
AddArgument("ssid", &mSSID);
AddArgument("password", &mPassword);
AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode);
AddArgument("discriminator", 0, 4096, &mDiscriminator);
break;
Expand Down

0 comments on commit cb4fa9a

Please sign in to comment.