diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 3844d695e..b159577d1 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -262,7 +262,7 @@ void Interpreter::ProcessLine(char *aBuf) LogInput(args); #if OPENTHREAD_CONFIG_DIAG_ENABLE - if (otDiagIsEnabled(GetInstancePtr()) && (args[0] != "diag")) + if (otDiagIsEnabled(GetInstancePtr()) && (args[0] != "diag") && (args[0] != "factoryreset")) { OutputLine("under diagnostics mode, execute 'diag stop' before running any other commands."); ExitNow(error = OT_ERROR_INVALID_STATE);