Command syntaxTo top
KSH commands are intended to have human-friendly syntax to easy manual execution by a user from a PC. The command syntax is structured in levels and is based in space separated ASCII arguments which specify down-level commands and parameters. It is represented as:
$ command < argument1 … argumentN > [ parameter1 … parameterN ]
Where command is the name of the first level command to execute also called System command. It could have arguments to execute a lower-level command up to a maximum of three arguments (three levels). Commands also could have parameters which are variable data required to a successful command execution.
To display a system command list type help in the serial terminal and press enter:
clear config debug ifdown ifup
ping reset show
Consult KSH User’s guide for Command Reference
If an unknown system command is entered KSH will respond Command not found.
Command not found ( ‘help’ or ‘?’ for list of commands )
If commands are not entered with the correct syntax KSH will respond Invalid syntax.
Commands are entered in the serial terminal by separating all arguments and parameters with spaces.
Arguments and parameters syntax depend on each command. There could be commands without any argument and two parameters, three arguments and no parameter or no arguments and no parameters at all.
Ping is a system command with no down-levels (no arguments) that sends a ping request to a remote node. It requires two parameters to be executed the destination IP address and the number of bytes to send:
System command: ping
[ param1: ff02::1 ] – IPv6 address of remote node.
[ param2: 10 ] – Decimal number of bytes to send.
Debug is a system command which allows to enable different debugging logs which are specified by up to three down-levels (arguments). No parameters are required for this command:
System command: debug
[ arg1: module ]
[ arg2: app ]
[ arg3: dtls ] – This down-level command enables the logs for the DTLS module only.
[ no params ]
Help is a system command with no arguments and no parameters that shows a list of all first level system commands:
System command: help
[ no args ]
[ no params ]
An example of configuration system command whose first argument specifies the setting to configure:
System commad: config
[ arg1: ipaddr ]
[ arg2: add ]
[ param1: ff02::1 ] – IPv6 addr