Skip to content

Commit

Permalink
[chip-tool] Filter out non-commissionable devices (#16221)
Browse files Browse the repository at this point in the history
"pairing onnetwork" commands don't filter out devices with
CM=0 TXT entry indicating closed commissioning window.
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Apr 12, 2022
1 parent de3e43d commit 4024742
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/chip-tool/commands/pairing/PairingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ void PairingCommand::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err)

void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData)
{
// Ignore nodes with closed comissioning window
VerifyOrReturn(nodeData.commissioningMode != 0);

const uint16_t port = nodeData.port;
char buf[chip::Inet::IPAddress::kMaxStringLength];
nodeData.ipAddress[0].ToString(buf);
Expand Down

0 comments on commit 4024742

Please sign in to comment.