MOXA CLI Configuration Tool User Manual

October 30, 2023
MOXA

MOXA CLI Configuration Tool

MOXA-CLI-Configuration-Tool-product

The Moxa CLI Configuration Tool (MCC_Tool) is a command line tool that provides the following functions to manage field devices. Management tasks can be performed according to a desired scale (1 for single device or 1 for multiple devices) and across different subnet networks.

System Requirements

The supported platforms for MCC_Tool are Windows and Linux. The following models and firmware versions are supported:

Product Series / Model Supporting Firmware
NPort 5100A Series All versions
NPort 5110 All versions
NPort 5130 All versions
NPort 5150 All versions
NPort P5150A Series Firmware v2.0 and later versions
NPort 5200A Series Firmware v3.0 and later versions
NPort 5200 Series Firmware v2.0 and later versions
NPort 5400 Series Firmware v2.1 and later versions
NPort 5600 Series Firmware v4.2 and later versions
NPort 5600-DT Series Firmware v2.2 and later versions
NPort 5600-DTL Series (EOL) Firmware v1.2 and later versions
NPort S9450I Series Firmware v1.2 and later versions
NPort S9650I Series Firmware v2.1 and later versions
NPort IA5100A Models Firmware v2.2 and later versions
NPort IA5200A Models Firmware v2.3 and later versions
NPort IA5400A Models Firmware v2.3 and later versions
NPort IA5000 Series All versions
NPort 5000AI-M12 Series All versions
NPort 6100/6200 Series Firmware v2.4 and later versions
NPort 6400/6600 Series All versions
MGate 5134 Series All versions
MGate 5135/5435 Series All versions
MGate 5217 Series All versions
MGate MB3180/MB3280/MB3480 Series Firmware v2.0 and later versions
MGate MB3170/MB3270 Series Firmware v2.1 and later versions
MGate MB3660 Series Firmware v2.1 and later versions
MGate 5101-PBM-MN Series All versions
MGate 5103 Series All versions
MGate 5105-MB-EIP Series Firmware v2.1 and later versions
MGate 5109 Series Firmware v2.2 and later versions
MGate 5111 Series Firmware v2.3 and later versions
MGate 5114 Series All versions
MGate 5118 Series All versions
MGate 5102-PBM-PN Series All versions
MGate W5108/W5208 Series (EOL) Firmware v2.1 and later versions
ioLogik E1200 Series Firmware v2.4 and later versions
ioThinx 4500 Series All versions

Installing MCC_Tool on Windows

To install MCC_Tool on Windows:

  1. Download MCC_Tool for Windows from the following URL: https://www.moxa.com/support/download.aspx?type=support&id=15923.
  2. Unzip the downloaded folder and execute the .exe file. The setup wizard will pop up to direct you to the next steps.
  3. Select the destination location of where MCC_Tool should be installed.
  4. Select the Start Menu Folder to create the program’s shortcuts.
  5. Select Additional Tasks if any and click Next.
  6. Confirm previous selections and prepare to install.
  7. Complete setup and check Launch mcc_tool if you want to use MCC_Tool after exiting the setup wizard.

Installing MCC_Tool on Linux

To install MCC_Tool on Linux:

  1. Download MCC_Tool for Linux from the following URLs: https://www.moxa.com/support/download.aspx?type=support&id=15925  (Linux x86) and https://www.moxa.com/support/download.aspx?type=support&id=15924 (Linux x64). Versions for x86 and x64 OS are available.

Please refer to the user manual for detailed instructions on how to use MCC_Tool.

Version 2.1, March 2023
www.moxa.com/products

Moxa CLI Configuration Tool User Manual
The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement.

Copyright Notice
© 2023 Moxa Inc. All rights reserved.

Trademarks
The MOXA logo is a registered trademark of Moxa Inc.
All other trademarks or registered marks in this manual belong to their respective manufacturers

Disclaimer

  • Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa.
  • Moxa provides this document as is, without warranty of any kind, either expressed or implied, including, but not limited to, its particular purpose. Moxa reserves the right to make improvements and/or changes to this manual, or to the products and/or the programs described in this manual, at any time.
  • Information provided in this manual is intended to be accurate and reliable. However, Moxa assumes no responsibility for its use, or for any infringements on the rights of third parties that may result from its use.
  • This product might include unintentional technical or typographical errors. Changes are periodically made to the information herein to correct such errors, and these changes are incorporated into new editions of the publication.

Technical Support Contact Information
www.moxa.com/support

Introduction

Moxa CLI Configuration Tool (MCC_Tool) is a command line tool that provides the following functions to manage field devices.

  • Report firmware versions
  • Upgrade firmware
  • Import/export configuration files
  • Password changes

Management tasks can be performed according to a desired scale (1 for single device or 1 for multiple devices) and across different subnet networks.

System Requirements

Supported Platforms

  • Windows 7 and later versions.
  • Linux kernel 2.6 and later versions.

Supported Models

Product Series / Model Supporting Firmware
NPort 5100A Series
NPort 5110
NPort 5130
NPort 5150
NPort P5150A Series
NPort 5200A Series
NPort 5200 Series
NPort 5400 Series
NPort 5600 Series
NPort 5600-DT Series
NPort 5600-DTL Series (EOL)
NPort S9450I Series
NPort S9650I Series
NPort IA5100A Models
NPort IA5200A Models
NPort IA5400A Models
NPort IA5000 Series
NPort 5000AI-M12 Series
NPort 6100/6200 Series
NPort 6400/6600 Series
Product Series / Model Supporting Firmware
--- ---
MGate 5134 Series
MGate 5135/5435 Series
MGate 5217 Series
MGate MB3180/MB3280/MB3480 Series
MGate MB3170/MB3270 Series
MGate MB3660 Series
MGate 5101-PBM-MN Series
MGate 5103 Series
MGate 5105-MB-EIP Series
MGate 5109 Series
MGate 5111 Series
MGate 5114 Series
MGate 5118 Series
MGate 5102-PBM-PN Series
MGate W5108/W5208 Series (EOL)
Product Series / Model Supporting Firmware
--- ---
ioLogik E1200 Series Firmware v2.4 and later versions
ioThinx 4500 Series All versions

Installing MCC_Tool on Windows

  • Step 1: Download MCC_Tool for Windows on URL: https://www.moxa.com/support/download.aspx?type=support&id=15923. Unzip the folder and execute the .exe file. The setup wizard will pop up to direct you to the next steps.
  • Step 2: Select destination location of where MCC_Tool should be installed.MOXA-CLI-Configuration-Tool-FIG- \(1\)
  • Step 3: Select Start Menu Folder to create the program’s shortcuts.MOXA-CLI-Configuration-Tool-FIG- \(2\)
  • Step 4: Select Additional Tasks if any and click Next.MOXA-CLI-Configuration-Tool-FIG- \(3\)
  • Step 5: Confirm previous selection and prepare to install.MOXA-CLI-Configuration-Tool-FIG- \(4\)
  • Step 6: Complete setup and check Launch mcc_tool if you want to use MCC_Tool after exiting the setup wizardMOXA-CLI-Configuration-Tool-FIG- \(5\)
  • Step 7: Use –h command to prompt help informationMOXA-CLI-Configuration-Tool-FIG- \(6\)

Installing MCC_Tool on Linux

Getting Started

This chapter covers what functions are supported by MCC_Tool and how users could use a combination of main and optional functions to manage Moxa’s edge devices

Overview
Supported Functions and Command Structure
Users will be able to achieve the following tasks by executing a set of command lines.

  1. Report firmware version through a device’s IP address or a range of devices specified by IP addresses.
  2. Upgrade firmware to a device through a device’s IP address or a range of devices specified by IP addresses.
  3. Export/Import device’s configuration through an IP address and or a range of devices specified by IP addresses.
  4. Restart command for:
  5. Restart a list of specific ports of multiple devices.
  6. Restart a device through a device’s IP address or a range of devices specified by IP addresses.
  7. Change password for an existing user of a device through the device’s IP address or a range of devices specified by IP addresses.

NOTE
Due to model and firmware differences, the following functions may NOT work:

  1. Restart multiple ports of a device
  2. Change the password for an existing user (expect the user ”admin”)
  3. Export configuration file with pre-shared key parameters You may refer to page 11 for Function Support Table to learn more details

The main functions are defined as below

Command Function
-fw Execute “Firmware related” action.
-cfg Execute “Configuration related” action.
-pw Execute “Password related” action.
-re Execute “Restart related” action.

Main functions must be used in conjunction with optional commands in order to perform management tasks. Optional commands are listed in the table below

Command Function
-r Report firmware version.
-up Upgrade firmware.
-ex Export the configuration file.
-im Import the configuration file.
-ch Change password.
-de Restart device.
-sp Restart port.
-i Device IP address.
-il IP address list containing 1 IP address per line.
Command Function
--- ---
-d Device list.
-f File to be imported or upgraded.
-nd The Device list with new password settings.
-u Device’s user account for login.
-p Device’s password for login.
-npw The new password for the specific user.
-dk Secret key for import/export configuration.
-ps Specific serial ports to be restarted.
-o Output file name.
-l Export result log file.
-n Keep network settings for configuration import.
-nr Don’t reboot device after finishing executing command.
-print Print process message for upgrade firmware command
-t Timeout(sec).

Device List
As mentioned in a previous section, MCC_Tool supports management tasks to a device or a range of devices. Managing multiple devices via MCC_Tool requires device list(s). MCC_Tool includes an example file of a device list, named DeviceList under Linux and DeviceList.txt under Windows. The format of the device list is:MOXA-CLI-Configuration-Tool-FIG- \(9\)

NOTE

  1. To import configuration, please identify the CfgFile and Key column.
  2. To export configuration, please input the pre-shared key under Key column (This function only works on NPort products).
  3. To upgrade firmware, please input the firmware name under FwFile column.
  4. To restart a specific port, please input the specific port under Port column (This function only works on the NPort device server products

Support Product Series
Because of easy maintenance, MCC Tool separates the device support list by independent product line plugin, which includes the E1200_model, I4500_model, MGate model, and NPort_model since version 1.1. In the future, you may update the plugin to support new product models.

Function Support Table
Due to firmware differences, some functions are not available for certain models; user may refer to the table below for function support coverage

NPort 6000

Series

| NPort IA5000A/5000A

Series

| MGate 3000

Series

| ioLogik E1200

Series

| ioThinx 4500

Series

---|---|---|---|---
Report firmware| P| P| P| P| P
versions
Upgrade firmware| P| ·         Does not support account management (-u)
Export device’s

configuration

| P| ·         Does not support account management (-u)

·         Does not support file decryption (-dk)

Import device’s configuration

|

P

| ·         Does not support account management (-u)

·         Does not support file decryption (-dk)

| ·         Does not support account management (-u)

·         Does not support file decryption (-dk)

·         Does not allow device to reject to restart (-nr)

NPort 6000

Series

| NPort IA5000A/5000A

Series

| MGate 3000         ioLogik E1200

Series Series

| ioThinx 4500

Series

---|---|---|---
Restart specific serial port(s)|

P

| ·         Does not support account management (-u)|

·         Does not support this command

Restart the| P| ·         Does not support account management (-u)|
devices

Set password

|

P

| ·         Does not support account management (-u)| ·         Does not support account management (-u)

·         Does not allow device to reject to restart (-nr)

|

Usage Examples of Supported Functions

Report Firmware Versions

Report firmware version of an individual device or a range of devices specified through an IP address list.
Output is directed to the screen, unless an output file is specified.

  • MCC_Tool –fw –r –i [ip_address] –o [output_file]
  • MCC_Tool –fw –r –il [IP_address_list] –o [output_file]
  • MCC_Tool –fw –r –il [IP_address_list] –o [output_file] –t [timeout_value]

Example of the IP address list file of Moxa devices:

  • 192.168.1.1;
  • 192.168.1.2;
  • 192.168.1.3;

Parameters Description

Command Function
-fw Execute actions for firmware related
-r Report firmware version
-i Device’s IP address (192.168.1.1)
-il IP address list containing 1 IP address per line
-o Output file name (can generate the Device List file)
-l Export result log file
-t Timeout (1~120 seconds)

Default value: 10 seconds

Example: Obtain firmware version of devices at IP.list and output to DeviceList file MCC_Tool –fw –r –il IP.list –o DeviceList

The result log should include the items below:MOXA-CLI-Configuration-
Tool-FIG- \(10\)

NOTE
You may use this command to generate the Device List for other function usage. The output value under the PWD and Key columns are dummy values, where user will need to input the password and key information of the device when executing other function commands with the device list. Other columns highlighted will need to be assigned values when executing specific commands, such as import configuration file or firmware upgrade.

Upgrade Firmware and Restart the Device
The password(s) must be specified by a command parameter or by the DeviceList file before upgrading the firmware and restarting a specific device (or multiple devices at the same time). After upgrading firmware, users should use search the command to check whether the device reboots successfully or not.

  • MCC_Tool –fw –up –i [ip_address] –u [user] –p [password] –f [firmware_file] –l [result_log]
  • MCC_Tool –fw –up –d [device_list] –l [result_log]
  • MCC_Tool –fw –up –d [device_list] –l [result_log] –t [timeout_value]

Parameters Description:

Command Function Remark
-fw Execute actions for firmware related  
-up Upgrade firmware version  
-i Device’s IP address (192.168.1.1)  

-u

| Device’s user account for login.

*This option may only work with the

models that have user account management.

| Only the NPort 6000 Series supports this

command function.

-p| Device’s password for login|  
-d| Device list|  
-f| Firmware file to be upgraded|  
-l| Export result log file|  
-t| Timeout (1~1200 seconds)

Default value: 800 seconds

|
-print| Print upgrade process status message|  

Example : Upgrade firmware using a device list and capture the results in an import log MCC_Tool –fw –u –d DeviceList –l result_log

The result_log should include the items below:MOXA-CLI-Configuration-
Tool-FIG- \(11\)

Export/Import Device’s Configuration

Export/Import the device configuration for a specific device or a range of devices through the device list file. The password must be specified by parameter or by the device list file. Device configurations are stored in individual files, using device type, IP address, and file create date as the filename. The result log is directly printed on the screen, or the user can specify a result_log file for it.

  • MCC_Tool –cfg –ex –i [ip_address] –u [user] –p [password] –dk [key] –l [result_log]
  • MCC_Tool –cfg –ex –d [device_list] –l [result_log]
  • MCC_Tool –cfg –ex –d [device_list] –l [result_log] –t [timeout_value]
  • MCC_Tool –cfg –im –i [ip_address] –u [user] –p [password] –dk [key] –f [cfg_file] –l [result_log] –n –nr
  • MCC_Tool –cfg –im –d [device_list] –l [result_log] –n –nr
  • MCC_Tool –cfg –im –d [device_list] –l [result_log] –t [timeout_value]

Parameters Description:

Command Function Remark
-cfg Execute actions for configuration related  
-ex Export the configuration file  
-im Import the configuration file  
-i Device IP address (192.168.1.1)
-d Device list
Command Function Remark
--- --- ---

-u

| Device’s user account for login

*This option may only work with the models that have user account management.

| Only the NPort 6000

Series supports this command function.

-p| Device’s password for login|  
 | When Exporting configuration:|
 | The command decrypts the exported file with|
 | the pre-shared key.|
 | ·         If this parameter is not used, the exported file will be encrypted by the pre-shared key set on the firmware of the device.

·         If this parameter is used, the exported file will be decrypted to a clear-txt file for editing.

When Importing configuration:

|
 | If the configuration file that needs to be|

-dk

| imported is encrypted, the command is needed with pre-shared key.

·         If the import configuration file is without -n, mcc tool will ignore -dk (won’t return -11).

·         If the import configuration file is with – n, mcc tool will use pre- shared key to decrypt the encrypted file. Therefore, if the key is wrong for decrypting the file, mcc tool will return -10. However, if the file is in plain text, and user inputs

pre-shared key, it will ignore the key (won’t return -10).*

(by parameter -dk or the key column in the device list file)

| Only the NPort 6000 Series supports this command function.
 | *This option may only work with the models|
 | that support encrypted configuration files.|
-f| The configuration file to be imported| Only for import

configuration function

-n| Keep original network parameters (includes

IP, subnet mask, gateway, and DNS)

| Only for import

configuration function

-nr

|

Do not reboot the device after importing the configuration file

| Only for import configuration function. MGate, ioLogik, and ioThinx devices do not

support this command.

-l| Export result log file|  

-t

| Timeout (1~120 seconds)

Export function Default value: 30 seconds

Import function Default value: 60 seconds

|

Example : Export the configuration using a device list and export the results to a result log
MCC_Tool –cfg –ex –d DeviceList –l result_log

The result_log should include the following itemsMOXA-CLI-Configuration-
Tool-FIG- \(12\)

Example: Import the configuration to a device list (with restart the units) and export the results to a result log
MCC_Tool –cfg –im –d DeviceList –l result_log

The result_log should include the items belowMOXA-CLI-Configuration-Tool-
FIG- \(13\)

Example : Import the configuration to a device list without restarting the units and export the results to a result log
MCC_Tool –cfg –im –d DeviceList –nr –l result_log

Restart Specific Serial Ports or the Whole Devices

Restart the specific port(s) or the device itself for an individual device or a range of devices specified by the device list file. The password must be specified by a parameter or by the device list file. Device configurations are stored in individual files, using device type, IP address, and file create date as the filename. The result log is directly printed on the screen, or users can specify a result_log file for it.

  • MCC_Tool –re –sp –ps [1-4,7] –I [ip_address] –u [user] –p [password]–l [result_log]
  • MCC_Tool –re –sp –d [device_list] –l [result_log]
  • MCC_Tool –re –sp –d [device_list] –l [result_log] –t [timeout_value]
  • MCC_Tool –re –de –I [ip_address] –u [user] –p [password] –l [result_log]
  • MCC_Tool –re –de –d [device_list] –l [result_log]
  • MCC_Tool –re –de –d [device_list] –l [result_log] –t [timeout_value]

Parameters Description:

Command Function Remark
-re Execute actions related to restart.  

-sp

| Restart specific serial ports of the device. This option may only work with

the models that support restart ports

| MGate and ioLogik devices do not support restart

specific port functions.

-de| Restart Device|  

-ps

| Used for restarting specific ports that

assign which serial ports should be restarted

| MGate and ioLogik devices

do not support restart specific port functions.

-i| Device IP address (192.168.1.1)|  

-u

| Device’s user account for login

*This option may only work with the models that have user account management

| Only the NPort 6000 Series

supports this command function.

-p| Device’s password for login|  
-d| Device list|  
-l| Export result log file|  

-t

| Timeout (1~120 seconds)

Restart device, the default value is 15 seconds

Restart port, the default value is 10

seconds

|

Example : Restart port using a device list and export the results to a result log MCC_Tool –re –sp –d DeviceList –l result_log

The result_log should include items below:MOXA-CLI-Configuration-Tool-
FIG- \(14\)

The serial ports 2-5, 8 and 10 of device 1 (NPort 6650) have been restarted.

Example : Restart device using a device list and export the results to a result log MCC_Tool –re –de –d DeviceList –l result_log

The result_log should include the following itemsMOXA-CLI-Configuration-
Tool-FIG- \(15\)

Change User’s Password on the Device
Set the password of the target device specified by an IP address. The current password must be specified by a parameter or by the Device List file.

  • MCC_Tool –pw –ch –i [ip_address] –u [user] –p [old_password] –npw [new_password]
  • MCC_Tool –pw –ch –d [device_list] –nd [device_list_new_password] –l [result_log]
  • MCC_Tool –pw –ch –d [device_list] –nd [device_list_new_password] –l [result_log] –t [timeout_value]

Parameters’ Description:

Command Function Remark
-pw Execute actions for password related  
-ch Change password  
-npw The new password for the specific user  
-i Device’s IP address (192.168.1.1)  

-u

| Device’s user account for login

*This option may only work with the

models that have user account management

| Only the NPort 6000 Series supports this

command function.

-p| Device’s password for login (old

password)

|
-d| Device list|  

-nd

|

The Device list with new password settings

| The user will need to assign a new password in the Device List when

using -nd command.

-l| Export result log file|  

-nr

| Don’t reboot device after changing password.| MGate and ioLogik devices do not support this

command.

-t| Timeout (1~120 seconds)

Default value: 60 seconds

|

Example : Set new password as “5678” then restart the device to make it effective, and print the result on the screen
MCC_Tool –pw 5678 –i 192.168.1.1 –u admin –p moxa
Example : Set new password from a device list and then restart the device to make it effective, and export the results to a result log
MCC_Tool –pw DeviceList_New –d DeviceList –l result_log

The result_log should include the items below:MOXA-CLI-Configuration-
Tool-FIG- \(16\)

Show Support Model List
Show the supported models of the MCC Tool. MCC_Tool -ml

Update Plugin
Users may update the Plugin for the MCC Tool to support new models, which may not be included in the current version. The command is as follow below. This function is supported by MCC_Tool version 1.1 and later.
MCC_Tool -install “path of the plugin”

Error Code Explanation
The MCC_Tool has the same error code for all the command options, please refer to below sheet for all the details:

Return Value Description
0 Successful
-1 Device not found
-2 Password or username does not match
-3 Exceeds the length of the password

-4

| Failed to open the file

If the target file path exists, please make sure you have the privilege to the target path

-5| The action timed out
-6| Import failed
-7| Firmware upgrade failed
-8| Exceeds the length of the new password
-9| Fail to set restart port index
-10| Cipher key for decrypting the configuration file is mismatched

-11

| Invalid parameter E.g.,

1.    Input parameters are not described above

2.    The parameters do not work for some devices (e.g., -u for the MGate MB3000 Series, which does not support user account function, or -dk for the NPort 5000A Series, which does not support pre-shared key function)

3.    Using device list file should not input -i, -u, -p, or -npw

-12

| Unsupported command

E.g., execute restart specific port command (MCC_Tool -re -sp) for the MGate MB3000 Series will get error code -12

-13

| A lack of information in the device list

If a specific NPort only exists in the device_list_new_password but not in the device_list (original device list with old password), then an error will occur.

-14

| A lack of information in the new password list

If there is no new password in the device_list_new_password but the device exists in the original device list, then an error will occur.

-15| Not executable due to an error of other devices in the list

-16

| The MCC_Tool does not support the firmware version of the device. Please

upgrade the device to the supported firmware version (reference to the “Support Models” section)

Other value| Contact Moxa

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals