Skip to content

Commit

Permalink
[diag] Add new command to factory diags radoi command.
Browse files Browse the repository at this point in the history
Commit adds new command to factory diag called `radio`.
	- `enable` for enabling the interface to dfault mode,
	- `disable` for disabling the interface
  • Loading branch information
Przemyslaw Bida committed Dec 11, 2024
1 parent b92bd46 commit b504acc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/core/diags/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,24 @@ Return the state of the radio.
sleep
```

### diag radio enable

Enable radio interface and put it in receive mode.

```bash
> diag radio enable
Done
```

### diag radio disable

Disable radio interface.

```bash
> diag radio disable
Done
```

### diag rawpowersetting

Show the raw power setting for diagnostics module.
Expand Down
8 changes: 8 additions & 0 deletions src/core/diags/factory_diags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,14 @@ Error Diags::ProcessRadio(uint8_t aArgsLength, char *aArgs[])
break;
}
}
else if (StringMatch(aArgs[0], "enable"))
{
SuccessOrExit(error = Get<Radio>().Enable());
}
else if (StringMatch(aArgs[0], "disable"))
{
SuccessOrExit(error = Get<Radio>().Disable());
}

exit:
AppendErrorResult(error);
Expand Down

0 comments on commit b504acc

Please sign in to comment.