No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - Basic Configuration

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010

This document provides the basic concepts, configuration procedures, and configuration examples in different application scenarios of the Basic configuration supported by the device.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Making an Index File

Making an Index File

Before USB-based deployment, you must make an index file.

Procedure of Making an Index File

Two methods are available to make an index file of USB-based deployment: use a text file to edit the index file or use eDesk to make an index file.

  • Method 1: Edit the index file on the PC:
    1. Create a text file.
    2. Edit the file based on the index file format.
    3. Rename the file as USB_AR.ini.
    4. Copy the USB_AR.ini file to the root directory of the USB flash drive.
  • Method 2: Use eDesk to make an index file:
    1. Log in to eDesk.
    2. Choose Function > Deployment Assistant. In Select Product, select the corresponding product to access the Config of Udisk Start page, as shown in Figure 4-3.
      Figure 4-3  Config of Udisk Start

    3. On the Config of Udisk Start page, click Add to access the Add Device page, as shown in Figure 4-4. Set related parameters. For details, see Table 4-1.
      Figure 4-4  Add Device

    4. On the Add Device page, click Add Type. In the displayed dialog box Add Type, select the file type, as shown in Figure 4-5.
      Figure 4-5  Add Type

      In the dialog box Add Type, set parameters and click Confirm to save the file type. Return to the Add Device page, and click Confirm to save device information.
    5. On the Config of Udisk Start page, specify a directory for Index File Storage Directory, select the created index data, and click Create Index File, as shown in Figure 4-6.
      Figure 4-6  Create Index File

    6. In the displayed dialog box, set the password used to generate an index file, as shown in Figure 4-7, and then click Confirm.
      Figure 4-7  Set Password

    7. You have created an index file successfully, as shown in Figure 4-8.
      Figure 4-8  Creating an index file successfully

    8. In the displayed dialog box, click Open Folder to access the index file storage directory and obtain the corresponding index file, as shown in Figure 4-9. The USB_AR.ini in the USB_AR.ini_1506498352439.zip indicates the generated index file.
      Figure 4-9  Index file

Index File Format

The index file format is as follows:

BEGIN AR
[USB CONFIG]
SN=
EMS_ONLINE_STATE=
[UPGRADE INFO]
OPTION=
DEVICENUM=
[DEVICEn DESCRIPTION]
OPTION=
ESN=
MAC=
VERSION=
DIRECTORY=
FILENUM=
TYPEn=
FILENAMEn=
FILE_HMACn=
RESOURCE_NAMEn=
RESOURCE_HMACn=
EXECUTE_TIMEn=
END AR
Table 4-1  Fields in the index file

Field

Description

BEGIN AR

Start tag of the index file. This field cannot be modified.

This field is mandatory.

USB CONFIG

USB flash drive configuration. This field cannot be modified.

This field is mandatory.

SN

Data change time in the format YearMonthDay.HourMinuteSecond.

For example, the value 20110628.080910 indicates 2011-06-28 08:09:10.

This field is mandatory.

NOTE:
The SN field is a USB-based deployment flag. A device has a default USB-based deployment flag. If the USB_AR.ini file exists in the USB flash drive, the device checks whether the default USB-based deployment flag and the SN value in the USB_AR.ini file are the same. If they are different, the USB-based deployment process is triggered. If the deployment succeeds, the value of the default USB-based deployment flag on the device is changed to the SN value in the USB_AR.ini file.

EMS_ONLINE_STATE

Whether the NMS is online:
  • YES: The NMS is online.
  • NO: The NMS is offline.

This field is mandatory.

UPGRADE INFO

Upgrade information header. This field cannot be modified.

This field is mandatory.

OPTION

Upgrade mode flag. The field has a fixed value of AUTO.

This field is mandatory.

DEVICENUM

Number of devices to be upgraded using this index file. The value is an integer that ranges from 1 to 100.

  • To upgrade the software version of one device, set the value of the DEVICENUM field to 1 and use the device's ESN and MAC address.

  • To upgrade software versions of multiple devices of the same series to the same version, set the value of the DEVICENUM field to 1 and use the default ESN and MAC address.

  • To upgrade software versions of multiple devices of the same series to different versions, set the value of the DEVICENUM field to the number of devices to be upgraded and use devices' ESNs and MAC addresses.

This field is mandatory.

DEVICEn DESCRIPTION

Description information header of device n. The value of n is an integer that ranges from 1 to 100.

This field is mandatory.

NOTE:
The value n must be set when you make the index file.

OPTION

Whether USB-based deployment is required for the device. The value OK indicates that USB-based deployment is required, and the value NOK indicates that USB-based deployment is not required.

This field is mandatory.

ESN

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.

This field is mandatory.

NOTE:

If this field is left empty, this field matches all devices.

MAC

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

This field is mandatory.

NOTE:

If this field is left empty, this field matches all devices.

VERSION

Version number after the upgrade.

This field is mandatory.

NOTE:

The version must be entered correctly. Otherwise, the device will fail to be upgraded.

DIRECTORY

Path for storing deployment files.
  • If the value is DEFAULT, the deployment files are stored in the root directory of the USB flash drive.
  • If the value is /abc, the deployment files are stored in the abc directory.

This field is mandatory.

NOTE:

If this field is left empty, the deployment files are saved in the root directory of the USB flash drive.

FILENUM

Number of files to be loaded.

If only the system software needs to be loaded, the value of this field is set to 1. If the system software and patch file need to be loaded, the value of this field is set to 2.

This field is mandatory.

TYPEn

Upgrade file type:
  • FACTORY-CONFIG: factory configuration file.
    NOTE:

    If the device supports the voice function and works as a PBX, the configuration file is FACTORY-CONFIG-PBX.

    If the device supports the voice function and works as an AG, the configuration file is FACTORY-CONFIG-AG.

  • SYSTEM-SOFTWARE: system software.
  • SYSTEM-OSP: VM installation package in OVA format.
  • SYSTEM-CONFIG: configuration file.
    NOTE:

    If the device supports the voice function and works as a PBX, the configuration file is SYSTEM-CONFIG-PBX.

    If the device supports the voice function and works as an AG, the configuration file is SYSTEM-CONFIG-AG.

  • SYSTEM-PAT: patch file.
  • SYSTEM-LICENSE: license file.
    NOTE:

    If license files need to be loaded in a batch, the device provides the function of automatically matching license file names without requiring license file names to be manually modified, improving batch deployment efficiency. If license files need to be loaded in a batch using the USB-based deployment function, the FILENAMEn field for SYSTEM-LICENSE in the index file must be set to DEFAULT.

  • SYSTEM-VOICE: voice file.
  • SYSTEM-EXECUTE: executable file, which can be only the shell type.
  • USER-DEFINE: user-defined file.
NOTE:
The AR169-P-M9, AR169W-P-M9, and AR169RW-P-M9 support USB-based VM creation. The requirements are as follows:
  • If the device does not contain a configuration file, the parameters in the index file USB_AR.ini for USB-based deployment are set as follows: TYPEn1 is set to SYSTEM-OSP, FILENAMEn1 to VM installation package.ova, TYPEn2 to SYSTEM-CONFIG, and FILENAMEn2 to osp_cfg.cfg. The content format of the osp_cfg.cfg file is "vm-name;port-num;password;", for example, vm2;3;Admin123;.
    • vm-name: specifies the VM name. The value is a string of 1 to 32 case-sensitive characters and consists of letters and digits.
    • port-num: specifies the VNC service port number. The value is an integer that ranges from 1 to 8.
    • password: specifies the password for VNC authentication. The value is a string of 6 to 8 case-sensitive characters without spaces.
  • If the device contains a configuration file, the parameters in the index file USB_AR.ini for USB-based deployment are set as follows: TYPEn1 is set to SYSTEM-OSP, FILENAMEn1 to VM installation package.ova, TYPEn2 to SYSTEM-CONFIG, and FILENAMEn2 to osp_cfg.zip. The osp_cfg.zip file is encrypted and compressed from the osp_cfg.cfg file.

The value of n is an integer that starts from 1.

This field is mandatory.

FILENAMEn

Upgrade file name. For example, if the value of the TYPE1 field is SYSTEM-EXECUTE and the name of the executable file corresponding to the U disk is test_execute.sh, the value of the FILENAME1 field is test_execute.sh.

The value of n is an integer that starts from 1.

This field is mandatory.

FILE_HMACn

HMAC used to verify a file to be downloaded. The MAC address is a string of 64 characters that is calculated for a specific file using a file checker based on the HMAC-SHA256 algorithm. The key used to calculate the HMAC must be the same as the password configured by the set usb autoupdate password command.

The value of n is an integer that starts from 1.

NOTE:

This field is optional. This field is mandatory after the hmac enable command is executed to enable HMAC check for USB-based deployment.

RESOURCE_NAMEn

Name of the resource file to be upgraded. You can perform operations on the resource file through an executable file. For example, copy the resource file to the device. The resource file must be saved in the root directory of the USB flash drive.

The value of n is an integer that starts from 1.

This field is optional.

RESOURCE_HMACn

Information used to perform HMAC check on the loaded resource file. The MAC address is a string of 64 characters that is calculated for a specific file using a file checker based on the HMAC-SHA256 algorithm. The key used to calculate the HMAC must be the same as the password configured by the set usb autoupdate password command.

The value of n is an integer that starts from 1.

NOTE:

This field is optional. This field is mandatory after the hmac enable command is executed to enable HMAC check for USB-based deployment.

EXECUTE_TIMEn

Execution time of an executable file:
  • 0: Before the deployment
  • 1: After the deployment

The value of n is an integer that starts from 1.

This field is optional. This field is mandatory when upgrade files contain an executable file.

END AR

End tag of the index file.

This field is mandatory.

Examples

Example 1

You need to create an index file for upgrading one device, and the requirements are as follows:
  • Data is changed at 08:09:10 on June 28, 2013.
  • The NMS is offline.
  • Upgrade is required.
  • The device ESN is 00080123456789 and the MAC address is 0018-0303-1234.
  • The system software system-software01.zip is stored in the root directory of the USB flash drive. The version number is V200R010. The HMAC string is c3caaee8f4f6bd1389f438801e40dad9af30f2fbbe7e8f55121b39c6c16ba488.

The index file that meets the preceding requirements is as follows:

BEGIN AR
[USB CONFIG]
SN=20130628.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=00080123456789
MAC=0018-0303-1234
VERSION=V200R010
DIRECTORY=DEFAULT
FILENUM=1
TYPE1=SYSTEM-SOFTWARE
FILENAME1=system-software01.zip
FILE_HMAC1=c3caaee8f4f6bd1389f438801e40dad9af30f2fbbe7e8f55121b39c6c16ba488
END AR

Example 2

You need to create an index file for upgrading multiple devices of the same series to the same software version, and the requirements are as follows:
  • Data is changed at 08:09:10 on June 28, 2013.
  • The NMS is offline.
  • Upgrade is required.
  • The system software system-software01.zip is stored in the root directory of the USB flash drive. The version number is V200R010. HMAC check is not required for any file.

The index file that meets the preceding requirements is as follows:

BEGIN AR
[USB CONFIG]
SN=20130628.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=DEFAULT
MAC=DEFAULT
VERSION=V200R010
DIRECTORY=DEFAULT
FILENUM=1
TYPE1=SYSTEM-SOFTWARE
FILENAME1=system-software01.zip
END AR

Example 3

You need to create an index file for two devices with different description information, and the requirements are as follows:
  • Data is changed at 08:09:10 on June 28, 2013.
  • The NMS is offline.
  • The ESN of the first device is 00080123456789. The MAC address is 0018-0303-1234. The name of the system software is V200R010.zip. The version number is V200R010. The configuration file system-config01.zip must be loaded. HMAC check is not required for any file.
  • The ESN of the second device is 66680123456789. The MAC address is 0018-0303-5678. The name of the system software is V200R010.zip. The version number is V200R010. The configuration file system-config02.zip must be loaded. HMAC check is not required for any file.

The index file that meets the preceding requirements is as follows:

BEGIN AR
[USB CONFIG]
SN=20130628.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=2
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=00080123456789
MAC=0018-0303-1234
VERSION=V200R010
DIRECTORY=DEFAULT
FILENUM=2
TYPE1=SYSTEM-SOFTWARE
FILENAME1=V200R010.zip
TYPE2=SYSTEM-CONFIG
FILENAME2=system-config01.zip
[DEVICE2 DESCRIPTION]
OPTION=OK
ESN=66680123456789
MAC=0018-0303-5678
VERSION=V200R010
DIRECTORY=DEFAULT
FILENUM=2
TYPE1=SYSTEM-SOFTWARE
FILENAME1=V200R010.zip
TYPE2=SYSTEM-CONFIG
FILENAME2=system-config02.zip
END AR

Example 4

You need to create an index file for VM installation, and the requirements are as follows:
  • Data is changed at 08:09:10 on January 7, 2016.
  • The NMS is offline.
  • VM installation is required.
  • The VM installation package (OVA file) usb.ova is stored in the root directory of the USB flash drive. The version number is V200R007C00. The HMAC string is 5c27a53005048beaa9f518da42912484edbf6bdd5a157ea777c8e80087a08b03.
  • The VM configuration file osp_cfg.zip is stored in the root directory of the USB flash drive. The HMAC string is a1735904e3df0abf0bc2a3a7a32f33ecd641eaeb575ba4f5e88810df92c7fdce.
The index file that meets the preceding requirements is as follows:
BEGIN AR
[USB CONFIG]
SN=20160107.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=DEFAULT
MAC=DEFAULT
VERSION=V200R007C00
DIRECTORY=DEFAULT
FILENUM=2
TYPE1=SYSTEM-OSP
FILENAME1=usb.ova
FILE_HMAC1=5c27a53005048beaa9f518da42912484edbf6bdd5a157ea777c8e80087a08b03
TYPE2=SYSTEM-CONFIG
FILENAME2=osp_cfg.zip
FILE_HMAC2=a1735904e3df0abf0bc2a3a7a32f33ecd641eaeb575ba4f5e88810df92c7fdce
END AR

Example 5

You need to create an index file to upgrade the configuration file, Android package (APK) file, Android database file, and Android boot logo file, and the requirements are as follows:
  • Data is changed at 08:09:10 on August 25, 2016.
  • The NMS is offline.
  • Upgrade is required.
  • The configuration file is stored in the root directory of the USB flash drive and named vrpcfg.cfg.
  • The master Android system database file is stored in the root directory of the USB flash drive and named settings.db.
  • The slave Android system database file is stored in the root directory of the USB flash drive and named mos_settings.db.
  • The APK file is stored in the root directory of the USB flash drive and named Player.apk.
  • The Android boot logo file is stored in the root directory of the USB flash drive and named bootanimation_armaster.zip.
To install the APK file, Android database file, and Android boot logo file during USB-based deployment, you must use executable files and an app detection file. Executable files are stored in the root directory of the USB flash drive and named huawei_execute1.sh, huawei_execute2.sh, and huawei_execute3.sh, and an app detection file is stored in the root directory of the USB flash drive and named app-list.xml.

The index file that meets the preceding requirements is as follows:

BEGIN AR
[USB CONFIG]
SN=20160825.080910    //The SN needs to be changed during each device deployment. The current time is recommended as the SN.
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1    //Number of devices to be upgraded.
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=DEFAULT
MAC=DEFAULT
VERSION=V200R006C12    //Upgrade version. It must be correct; otherwise, the deployment will fail.
DIRECTORY=DEFAULT
FILENUM=6    //Actual number of deployment files.
TYPE1=SYSTEM-EXECUTE    //The app-list.xml file is mandatory.
FILENAME1=huawei_execute1.sh
RESOURCE_NAME1=app-list.xml
EXECUTE_TIME1=0
TYPE2=SYSTEM-EXECUTE    //Executable files can be increased based on the number of deployment apps.
FILENAME2=huawei_execute2.sh
RESOURCE_NAME2=Player.apk
EXECUTE_TIME2=0
TYPE3=SYSTEM-CONFIG    //VRP configuration file.
FILENAME3=vrpcfg.cfg
TYPE4=SYSTEM-CONFIG    //Master Android system database file.
FILENAME4=settings.db
TYPE5=SYSTEM-CONFIG    //Slave Android system database file.
FILENAME5=mos_settings.db
TYPE6=SYSTEM-EXECUTE        //Boot logo file.
FILENAME6=huawei_execute3.sh    
RESOURCE_NAME6=bootanimation_armaster.zip
EXECUTE_TIME6=0
END AR

Edit executable files.

New folders can be created and APK files can be copied on a device after the device reads the SYSTEM-EXECUTE field and executes the huawei_execute1.sh file. The huawei_execute1.sh file is as follows:

#!/bin/sh
mkdir -p /mnt/rom/usbresource
cp -r $1 /mnt/rom/usbresource
chmod 777 -R /mnt/rom/usbresource

Subsequent executable files (huawei_execute2.sh and huawei_execute3.sh) have the same content and must be named differently depending on APK files so that APK files can be automatically copied from the USB flash drive to a device. The content is as follows:

#!/bin/sh
cp -r $1 /mnt/rom/usbresource
chmod 777 -R /mnt/rom/usbresourcee

Editing the app detection file app-list.xml.

The format of an app detection file is as follows:

<?xml version="1.0" encoding="utf-8"?>
<list>
<apk>
<name>com.huawei.subpackagename</name>
<version>20141024</version>
<target>ARMaster</target>
<status>install</status>
<startinfo>com.huawei.subpackagename,com.huawei.subpackagename.MainActivity</startinfo>
<url>/mnt/vrprootfs/mnt/rom/usbresource/player.apk</url>
</apk>
<apk>
<name>com.huawei.subpackagename</name>
<version>20141024</version>
<target>ARSlave</target>
<status>uninstall</status>
<startinfo>com.huawei.subpackagename,com.huawei.subpackagename.MainActivity</startinfo>
<url>/mnt/vrprootfs/mnt/rom/usbresource/player.apk</url>
</apk>
</list>
Table 4-2  Fields in an app detection file

Field

Description

<list></list>

The app detection file is in list format.

<apk></apk>

APK information to be configured.

NOTE:

If the device needs to operate multiple APK files, add multiple such fields to the app detection file.

<name></name>

Name of the APK software package.

<version></version>

APK version number.

NOTE:

The value of this field must be the same as the version of the APK file to be installed, uninstalled, or updated; otherwise, the device repeatedly installs, uninstalls, or updates the APK file.

<target></target>

Android system type of the APK file:
  • ARMaster: indicates the master Android system.
  • ARSlave: indicates the slave Android system.

<status></status>

Operation type:

  • install: installs an APK file.
  • uninstall: uninstalls an APK file.

<startinfo></startinfo>

Automatic APK startup information, in the format "<startinfo>package name, path and type of the main Activity to be started<startinfo>".

If an APK file has the automatic startup attribute and is expected to start after the device starts, this field must be configured.

<url></url>

Storage path of an APK file on the device.

Translation
Download
Updated: 2019-11-21

Document ID: EDOC1100034066

Views: 89453

Downloads: 487

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next