MOXA-LOGO

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 / ModelSupporting Firmware
NPort 5100A SeriesAll versions
NPort 5110All versions
NPort 5130All versions
NPort 5150All versions
NPort P5150A SeriesFirmware v2.0 and later versions
NPort 5200A SeriesFirmware v3.0 and later versions
NPort 5200 SeriesFirmware v2.0 and later versions
NPort 5400 SeriesFirmware v2.1 and later versions
NPort 5600 SeriesFirmware v4.2 and later versions
NPort 5600-DT SeriesFirmware v2.2 and later versions
NPort 5600-DTL Series (EOL)Firmware v1.2 and later versions
NPort S9450I SeriesFirmware v1.2 and later versions
NPort S9650I SeriesFirmware v2.1 and later versions
NPort IA5100A ModelsFirmware v2.2 and later versions
NPort IA5200A ModelsFirmware v2.3 and later versions
NPort IA5400A ModelsFirmware v2.3 and later versions
NPort IA5000 SeriesAll versions
NPort 5000AI-M12 SeriesAll versions
NPort 6100/6200 SeriesFirmware v2.4 and later versions
NPort 6400/6600 SeriesAll versions
MGate 5134 SeriesAll versions
MGate 5135/5435 SeriesAll versions
MGate 5217 SeriesAll versions
MGate MB3180/MB3280/MB3480 SeriesFirmware v2.0 and later versions
MGate MB3170/MB3270 SeriesFirmware v2.1 and later versions
MGate MB3660 SeriesFirmware v2.1 and later versions
MGate 5101-PBM-MN SeriesAll versions
MGate 5103 SeriesAll versions
MGate 5105-MB-EIP SeriesFirmware v2.1 and later versions
MGate 5109 SeriesFirmware v2.2 and later versions
MGate 5111 SeriesFirmware v2.3 and later versions
MGate 5114 SeriesAll versions
MGate 5118 SeriesAll versions
MGate 5102-PBM-PN SeriesAll versions
MGate W5108/W5208 Series (EOL)Firmware v2.1 and later versions
ioLogik E1200 SeriesFirmware v2.4 and later versions
ioThinx 4500 SeriesAll 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 / ModelSupporting Firmware
NPort5100A SeriesFirmware v1.4 and later versions
NPort5110Firmware v2.0.62 and later versions
NPort5130Firmware v3.9 and later versions
NPort5150Firmware v3.9 and later versions
NPortP5150A SeriesFirmware v1.4 and later versions
NPort5200A SeriesFirmware v1.4 and later versions
NPort5200 SeriesFirmware v2.12 and later versions
NPort5400 SeriesFirmware v3.13 and later versions
NPort5600 SeriesFirmware v3.9 and later versions
NPort5600-DT SeriesFirmware v2.6 and later versions
NPort5600-DTL Series (EOL)Firmware v1.5 and later versions
NPortS9450I SeriesFirmware v1.1 and later versions
NPortS9650I SeriesFirmware v1.1 and later versions
NPortIA5100A ModelsFirmware v1.3 and later versions
NPortIA5200A ModelsFirmware v1.3 and later versions
NPortIA5400A ModelsFirmware v1.4 and later versions
NPortIA5000 SeriesFirmware v1.7 and later versions
NPort5000AI-M12 SeriesFirmware v1.3 and later versions
NPort6100/6200 SeriesFirmware v1.13 and later versions
NPort6400/6600 SeriesFirmware v1.13 and later versions
Product Series / ModelSupporting Firmware
MGate5134 SeriesAll versions
MGate5135/5435 SeriesAll versions
MGate5217 SeriesAll versions
MGateMB3180/MB3280/MB3480 SeriesFirmware v2.0 and later versions
MGateMB3170/MB3270 SeriesFirmware v3.0 and later versions
MGateMB3660 SeriesFirmware v2.0 and later versions
MGate5101-PBM-MN SeriesFirmware v2.1 and later versions
MGate5103 SeriesFirmware v2.1 and later versions
MGate5105-MB-EIP SeriesFirmware v4.2 and later versions
MGate5109 SeriesFirmware v2.2 and later versions
MGate5111 SeriesFirmware v1.2 and later versions
MGate5114 SeriesFirmware v1.2 and later versions
MGate5118 SeriesFirmware v2.1 and later versions
MGate5102-PBM-PN SeriesFirmware v2.2 and later versions
MGateW5108/W5208 Series (EOL)Firmware v2.3 and later versions
Product Series / ModelSupporting Firmware
ioLogik E1200 SeriesFirmware v2.4 and later versions
ioThinx 4500 SeriesAll 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:
    1. Restart a list of specific ports of multiple devices.
    2. Restart a device through a device’s IP address or a range of devices specified by IP addresses.
  5. 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

CommandFunction
-fwExecute “Firmware related” action.
-cfgExecute “Configuration related” action.
-pwExecute “Password related” action.
-reExecute “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

CommandFunction
-rReport firmware version.
-upUpgrade firmware.
-exExport the configuration file.
-imImport the configuration file.
-chChange password.
-deRestart device.
-spRestart port.
-iDevice IP address.
-ilIP address list containing 1 IP address per line.
CommandFunction
-dDevice list.
-fFile to be imported or upgraded.
-ndThe Device list with new password settings.
-uDevice’s user account for login.
-pDevice’s password for login.
-npwThe new password for the specific user.
-dkSecret key for import/export configuration.
-psSpecific serial ports to be restarted.
-oOutput file name.
-lExport result log file.
-nKeep network settings for configuration import.
-nrDon’t reboot device after finishing executing command.
-printPrint process message for upgrade firmware command
-tTimeout(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 firmwarePPPPP
versions
Upgrade firmwareP·         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 theP·         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

CommandFunction
-fwExecute actions for firmware related
-rReport firmware version
-iDevice’s IP address (192.168.1.1)
-ilIP address list containing 1 IP address per line
-oOutput file name (can generate the Device List file)
-lExport result log file
-tTimeout (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:

CommandFunctionRemark
-fwExecute actions for firmware related 
-upUpgrade firmware version 
-iDevice’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.

-pDevice’s password for login 
-dDevice list 
-fFirmware file to be upgraded 
-lExport result log file 
-tTimeout (1~1200 seconds)

Default value: 800 seconds

 
-printPrint 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:

CommandFunctionRemark
-cfgExecute actions for configuration related 
-exExport the configuration file 
-imImport the configuration file 
-iDeviceIP address (192.168.1.1) 
-dDevicelist 
CommandFunctionRemark
 

-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.

-pDevice’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. 
-fThe configuration file to be importedOnly for import

configuration function

-nKeep 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.

-lExport 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:

CommandFunctionRemark
-reExecute 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.

-deRestart 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.

-iDevice 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.

-pDevice’s password for login 
-dDevice list 
-lExport 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:

CommandFunctionRemark
-pwExecute actions for password related 
-chChange password 
-npwThe new password for the specific user 
-iDevice’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.

-pDevice’s password for login (old

password)

 
-dDevice 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.

-lExport result log file 
 

-nr

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

command.

-tTimeout (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 ValueDescription
0Successful
-1Device not found
-2Password or username does not match
-3Exceeds 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

-5The action timed out
-6Import failed
-7Firmware upgrade failed
-8Exceeds the length of the new password
-9Fail to set restart port index
-10Cipher 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.

-15Not 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 valueContact Moxa

Documents / Resources

MOXA CLI Configuration Tool [pdf] User Manual
CLI Configuration Tool, Configuration Tool, CLI Configuration, Configuration

References

Leave a comment

Your email address will not be published. Required fields are marked *