Skip to content

Commit

Permalink
Run command failure: CHIP Error 4003 (0x00000FA3): Incorrect state wh…
Browse files Browse the repository at this point in the history
…en running 'chip-tool discover resolve' (#6339)
  • Loading branch information
vivien-apple authored and pull[bot] committed May 12, 2021
1 parent 3236791 commit afcc8fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/chip-tool/commands/discover/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ class Resolve : public DiscoverCommand, public chip::Mdns::ResolverDelegate
/////////// DiscoverCommand Interface /////////
CHIP_ERROR RunCommand(NodeId remoteId, uint64_t fabricId) override
{
ReturnErrorOnFailure(chip::Mdns::Resolver::Instance().SetResolverDelegate(nullptr));
ReturnErrorOnFailure(chip::Mdns::Resolver::Instance().SetResolverDelegate(this));
ChipLogProgress(chipTool, "Mdns: Searching for NodeId: %" PRIx64 " FabricId: %" PRIx64 " ...", remoteId, fabricId);
return chip::Mdns::Resolver::Instance().ResolveNodeId(chip::PeerId().SetNodeId(remoteId).SetFabricId(fabricId),
chip::Inet::kIPAddressType_Any);
}
Expand Down Expand Up @@ -61,6 +63,7 @@ class Update : public DiscoverCommand
{
ChipDevice * device;
ReturnErrorOnFailure(mCommissioner.GetDevice(remoteId, &device));
ChipLogProgress(chipTool, "Mdns: Updating NodeId: %" PRIx64 " FabricId: %" PRIx64 " ...", remoteId, fabricId);
return mCommissioner.UpdateDevice(device, fabricId);
}

Expand Down
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 @@ -325,6 +325,7 @@ void PairingCommand::OnEnableNetworkResponse(void * context, uint8_t errorCode,
CHIP_ERROR PairingCommand::UpdateNetworkAddress()
{
ReturnErrorOnFailure(mCommissioner.GetDevice(mRemoteId, &mDevice));
ChipLogProgress(chipTool, "Mdns: Updating NodeId: %" PRIx64 " FabricId: %" PRIx64 " ...", mRemoteId, mFabricId);
return mCommissioner.UpdateDevice(mDevice, mFabricId);
}

Expand Down

0 comments on commit afcc8fc

Please sign in to comment.