Good day!
Use the U disk to Upgrade a device, the main work is to edit the index file on the PC.
The procedure is as follows:
1. Create a text file.
2. Edit the file based on the index file format. The field names in the index file must be in uppercase.
3. Rename the file as smart_config.ini.
The index file format is as follows:
BEGIN DC
[GLOBAL CONFIG]
TIMESN=
EMS_ONLINE_STATE=
UPGRADEMODE=
[DEVICEn DESCRIPTION]
OPTION=
ESN=
MAC=
DIRECTORY=
SYSTEM-SOFTWARE=
SYSTEM-CONFIG=
HMAC=
SYSTEM-PAT=
END DC
Field
| Mandatory or Optional
| Description
|
BEGIN DC
| Mandatory
| Start tag of the index file. This field cannot be modified.
|
[GLOBAL CONFIG]
| Mandatory
| Start tag of the global configuration. This field cannot be modified.
|
TIMESN
| Mandatory
| Data change time in the format YearMonthDay.HourMinuteSecond.
For example, the value 20110628.080910indicates 2011-06-28 08:09:10.
The TIMESN field is a USB-based upgrade flag. A device has a default USB-based upgrade flag. If the smart_config.ini file exists in the USB flash drive, the device checks whether the default USB-based upgrade flag and the TIMESN value in the smart_config.ini file are the same. If they are different, the USB-based upgrade process is triggered. If the upgrade succeeds, the value of the default USB-based upgrade flag on the device is changed to the TIMESN value in the smart_config.ini file.
|
EMS_ONLINE_STATE
| Optional
| Whether the NMS is online, indicating whether a device registers with the NMS after being deployed:
l YES: The device registers with the NMS.
l NO: The device does not register with the NMS.
The default value is NO.
If this field does not exist or is empty, the default value is used.
|
UPGRADEMODE
| Optional
| Upgrade mode:
l AUTO: automatic mode
l DFT: production mode, which is used in production, commissioning, and testing environment. In this mode, only the system software version is upgraded.
The default value is AUTO.
If this field does not exist or is empty, the default value is used.
|
[DEVICEnDESCRIPTION]
| Mandatory
| Start tag of the file description. n indicates the device number. The value is an integer and starts from 0.
|
OPTION
| Optional
| Whether file information is valid:
l OK: valid
l NOK: invalid
The default value is OK.
If this field does not exist or is empty, the default value is used.
|
ESN
| Optional
| Serial number of a device. If the value of this field is DEFAULT, the index file is applicable to all devices. Otherwise, the index file is applicable to a specific device.
The default value is DEFAULT.
If this field does not exist or is empty, the default value is used.
|
MAC
| Optional
| Device MAC address, in XXXX-XXXX-XXXX format. X is a hexadecimal number. If the value of this field is DEFAULT, the index file is applicable to all devices. Otherwise, the index file is applicable to a specific device.
The default value is DEFAULT.
If this field does not exist or is empty, the default value is used.
|
DIRECTORY
| Optional
| Path for storing deployment files.
l If the value is DEFAULT, the deployment files are stored in the root directory of the USB flash drive.
l If the value is /abc, the deployment files are stored in the abc directory.
The default value is DEFAULT.
If this field does not exist or is empty, the default value is used.
|
SYSTEM-SOFTWARE
| Optional
| System software file with file name extension .cc.
|
SYSTEM-CONFIG
| Optional
| Configuration file with file name extension .cfg, .zip or .dat.
If this field has a value, the MAC field cannot be empty or default.
|
HMAC
| Optional
| HMAC of the configuration file, which is used to check the configuration file to be loaded. The value is a string of 64 characters and is calculated for the configuration file in the USB flash drive based on the HMAC-SHA256 algorithm through a calculation tool. The key used for calculation must be the same as the password configured using the set device usb-deployment password passwordcommand.
By default, no check is performed on the configuration file.
If this field does not exist or is empty, the default value is used.
The HMAC can be generated for the configuration file through the HMAC-SHA256 calculation tool (such as OpenSSL).
|
SYSTEM-PAT
| Optional
| Patch file with file name extension .pat.
|
END DC
| Mandatory
| End tag of the index file.
|
Examples
Creating an index file for upgrading one device, and therequirements are as follows:
1. Data is changed at08:09:10 on June 28, 2016.
2. The device MACaddress is 0018-0303-1234.
3. The systemsoftware system-software.cc, the configuration file system-config.zip,and the patch file system-pat.pat are stored in the rootdirectory of the USB flash drive.
The index file that meets the preceding requirements isas follows:
BEGIN DC
[GLOBAL CONFIG]
TIMESN=20160628.080910
EMS_ONLINE_STATE=NO
UPGRADEMODE=AUTO
[DEVICE0 DESCRIPTION]
OPTION=OK
ESN=DEFAULT
MAC=0018-0303-1234
DIRECTORY=DEFAULT
SYSTEM-SOFTWARE=system-software.cc
SYSTEM-CONFIG=system-config.zip
SYSTEM-PAT=system-pat.pat
END DC
Note: ON the CE series switches, the U diskdeployment function is disabled by default. Use the undo set deviceusb-deployment disable command enables the U disk deployment function.