Skip to content

Command Line Interface (CLI)

The CLI provides access to the gateway's features through the UART or USB serial port via local or remote terminal. The CLI is a good choice for users who prefer to work in command line mode or want to use scripts to automate the configuration. You use the CLI to view and export status, make configuration changes, perform device maintenance operations, and to import and export XML configuration.

The CLI Reference provides descriptions of the supported commands as well as useful shortcuts for navigating the CLI.

To use the CLI to export and import the XML configuration records, see XML Configuration.

Accessing the CLI

To access the CLI, connect your PC to the UART on the gateway. Make sure that the corresponding Line protocol is set to "Command Line". You can set this in Web Manager.

The default configuration boots the gateway to Command Line mode. If the Line protocol is set to some other mode, use one of the following options to access command line:

Open a terminal emulator such as Tera Term and make a connection to the serial COM port on the gateway. Configure the serial port settings for the connection to associate with the gateway. These include the baud rate (typically 9600 or 115200), 8-bit, No parity, 1 stop bit, no flow control.

Type any character in the terminal window to display the command line prompt >. The following message may also be displayed: "Command Line started." This is the root level.

Command Line started.
>  
  • At the command prompt, type ? to view a list of the root level commands.
  • Type a command, such as config to enter the configuration command level. The prompt displays the name of the current command level.
>config<enter>

config>

The CLI is organized hierarchically into groups. For more information about navigating CLI and using the shortcuts and editing keys, refer to the CLI Reference.

Using the CLI

To view configuration status through the CLI, navigate to the status command level and then enter the group name. Enter show to view current configuration.

To make a configuration change through the CLI, navigate to the config command level and enter the desired command and value. You must write the configuration changes in order to save them to flash (nonvolatile memory). The CLI displays a message about the changes that were made.

Some configuration changes require a reboot in order for the change to take effect. To reboot, navigate to the "status Device" level and enter the Reboot command.

status Device>Reboot
CONFIRM: Reboot this device? (okay/cancel)okay
WARNING: Rebooting...

Command Line started.

>

Example config command

This simple example changes the clock setting from NTP to Manual. To try out this example, start from the root level of the command line and issue the commands as shown below:

What you type Result
config<enter> Enter the configuration level from root level
clock<enter> Enter the clock level
show View the current clock configuration
source Manual Change the source from NTP to Manual
> config

config> clock

config Clock> show
Clock Configuration:
  Source    : NTP
  UTC Offset: 0 minutes

config Clock> source manual
Changed Clock Source to "Manual".
WARNING: Change will not persist after reboot unless you "write".

Note

The result message describes the configuration change and a WARNING message that you must "write" in order to save the configuration change to flash.

At the command prompt, enter write to save the changes. You will see the following message:

config Clock>write
The changes have been saved permanently.

The CLI is organized hierarchically, and provides help and shortcuts for ease of use. It is comprised of levels, with each level having a group of commands for a specific purpose.

Root Level Commands

The command line is started at the root (top) level. At the root level, you see the basic command prompt >.

Type ? to view the root level commands.

Command Description
config Enters the configuration level
documentation Writes the CLI documentation to the console output
file system Enters the file system level
help Writes the shortcut keys to the console output
status Enters the status level
tlog Writes the trouble log to the command line output
wlan scan [network-name] Scans for available Wi-Fi access points or scans for the specified Wi-Fi network
xml Enters the XML level
exit Stops the command line. Press any key to start it again.

CLI Command Levels

To navigate to a different command level, enter the command name at the prompt:

>config <enter>

The command level displays before the prompt:

config>

To navigate up one level, type exit or the abbreviation ex.

CLI Navigation Tips

What you type Result
help Type this at the root level to view the editing and shortcut keys.
? View the list of commands for that level.
* View available commands and help explanations for the current level.
show View the current configuration for that level.
exit Exit and return to one level higher. At the root level, this command stops the command line. Press any key to start the command line again.
<command-name> Enter the command level for that command.
Abbreviations Type the first few letters of the command and press Enter. For example, enter co for config.
Autofill Type the first few letters of a command and then press the Tab key to run through the possible commands.