diff --git a/examples/camera-controller/commands/interactive/InteractiveCommands.cpp b/examples/camera-controller/commands/interactive/InteractiveCommands.cpp index 279de777d5ee34..5ff21fe5d6d4f3 100644 --- a/examples/camera-controller/commands/interactive/InteractiveCommands.cpp +++ b/examples/camera-controller/commands/interactive/InteractiveCommands.cpp @@ -29,11 +29,6 @@ #include #include -#if defined(PW_RPC_ENABLED) -#include -#include -#endif - using namespace chip; namespace { @@ -42,10 +37,6 @@ constexpr char kInteractiveModePrompt[] = ">>> "; constexpr char kInteractiveModeHistoryFileName[] = "chip_tool_history"; constexpr char kInteractiveModeStopCommand[] = "quit()"; -#if defined(PW_RPC_ENABLED) -constexpr uint16_t kRetryIntervalS = 3; -#endif - // File pointer for the log file FILE * sLogFile = nullptr; @@ -114,28 +105,6 @@ void ENFORCE_FORMAT(3, 0) LoggingCallback(const char * module, uint8_t category, funlockfile(sLogFile); } -#if defined(PW_RPC_ENABLED) -void AttemptRpcClientConnect(System::Layer * systemLayer, void * appState) -{ - if (admin::StartRpcClient() == CHIP_NO_ERROR) - { - // print to console - fprintf(stderr, "Connected to Fabric-Bridge\n"); - } - else - { - // print to console - fprintf(stderr, "Failed to connect to Fabric-Bridge, retry in %d seconds....\n", kRetryIntervalS); - systemLayer->StartTimer(System::Clock::Seconds16(kRetryIntervalS), AttemptRpcClientConnect, nullptr); - } -} - -void ExecuteDeferredConnect(intptr_t ignored) -{ - AttemptRpcClientConnect(&DeviceLayer::SystemLayer(), nullptr); -} -#endif - } // namespace char * InteractiveStartCommand::GetCommand(char * command) @@ -198,13 +167,6 @@ CHIP_ERROR InteractiveStartCommand::RunCommand() Logging::SetLogRedirectCallback(LoggingCallback); } -#if defined(PW_RPC_ENABLED) - admin::SetRpcRemoteServerPort(mFabricBridgeServerPort.Value()); - admin::InitRpcServer(mLocalServerPort.Value()); - ChipLogProgress(NotSpecified, "PW_RPC initialized."); - DeviceLayer::PlatformMgr().ScheduleWork(ExecuteDeferredConnect, 0); -#endif - std::thread readCommands(ReadCommandThread); readCommands.detach();