04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date...

20
04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Transcript of 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date...

Page 1: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

04 HiLens_Getting Started

04 HiLens_Getting Started

Issue 01

Date 2019-06-18

HUAWEI TECHNOLOGIES CO., LTD.

Page 2: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Copyright © Huawei Technologies Co., Ltd. 2019. All rights reserved.No part of this document may be reproduced or transmitted in any form or by any means without prior writtenconsent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respectiveholders. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei and thecustomer. All or part of the products, services and features described in this document may not be within thepurchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,and recommendations in this document are provided "AS IS" without warranties, guarantees orrepresentations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Technologies Co., Ltd.Address: Huawei Industrial Base

Bantian, LonggangShenzhen 518129People's Republic of China

Website: http://www.huawei.com

Email: [email protected]

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. i

Page 3: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Contents

1 Before You Start............................................................................................................................. 1

2 Installing Skills on HiLens Kit Cameras (Common Users).................................................. 2

3 Quickly Developing a Skill Using a Template (Developers)............................................... 7

4 Quickly Distributing New Firmware to Devices (Manufacturers)....................................14

5 Change History............................................................................................................................ 17

04 HiLens_Getting Started04 HiLens_Getting Started Contents

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. ii

Page 4: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

1 Before You Start

In terms of user roles, Huawei HiLens has common users, AI developers, and cameramanufacturers. This document describes how these three types of roles quickly get startedwith Huawei HiLens. You can quickly find the information you need according to Table 1-1.

Table 1-1 Before you start

Chapter Description

2 Installing Skills onHiLens Kit Cameras(Common Users)

Describes how common users install skills on HiLens Kitcameras through the HiLens management console.

3 Quickly Developing aSkill Using a Template(Developers)

Describes how developers quickly develop skills using skilltemplates on the HiLens management console.

4 Quickly Distributing NewFirmware to Devices(Manufacturers)

Describes how manufacturers distribute the firmware of thelatest version to HiLens Kit cameras.

04 HiLens_Getting Started04 HiLens_Getting Started 1 Before You Start

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 1

Page 5: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

2 Installing Skills on HiLens Kit Cameras

(Common Users)

This topic describes how common users buy skills from the HiLens management console andinstall these skills on the HiLens Kit cameras they purchased.

Prerequisites

You have registered a HUAWEI CLOUD account and enabled Huawei HiLens and relatedcloud services.

Registering a HiLens Kit Camera1. Log in to the HiLens management console, choose Device Management > Devices, and

click Register New Device in the upper right corner. A QR code is generated on theregistration page.

Figure 2-1 Device list

2. Use tools such as MobaXterm to connect to the device (camera) in SSH mode (thedefault port number is 22, and the default username and password are root and root).Click Copy Registration Info to copy the registration information and paste it on theSSH interface as a parameter of the registration command, and run the ./register.pycommand to register the device. The registration command parameter must be enclosedby single quotation marks,cd /home/hilens/deploy/IEF./register.py 'Paste the QR code information copied on the following page.'

04 HiLens_Getting Started04 HiLens_Getting Started 2 Installing Skills on HiLens Kit Cameras (Common Users)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 2

Page 6: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Example:./register.py '{"authinfo_sk":"U9Cjaz3VaWJ5YpxU7TmZyJMa9MFGTSOGdlhN9I3d","cloudhub_url":"wss://ief-edgeaccess.cn-north-7.myhuaweicloud.com:443/register","authinfo_ak":"232HHU1UOPS3CE3NFGAT","application_id":"4287fb78-3a0c-4635-b52a-b033170546a1"}'

Figure 2-2 Copying device registration information

NOTE

This is a temporary registration mode and will be modified and optimized later.

3. If the device is bound successfully, the information about the device is displayed in thelower part of the registration page. Then, the page for entering more basic deviceinformation is automatically displayed. Fill in the device information, such as the devicename and device tag, and click OK to complete the registration. Note that the newlyregistered device stays in the Upgrading status for a period of time in the device listbecause it is being started and configured. When its status changes to Running, thedevice is successfully registered.

04 HiLens_Getting Started04 HiLens_Getting Started 2 Installing Skills on HiLens Kit Cameras (Common Users)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 3

Page 7: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Figure 2-3 Filling in device information

The complete registration process starts from opening of the QR code page and ends after youfinish performing the third step. If you do not finish registration within 15 minutes, theregistration link becomes invalid and you need to open the QR code page to register thedevice again.

Purchasing SkillsAfter a HiLens Kit camera is registered, click Skill Market in the left navigation tree of theHiLens management console to display the skills for sale on the right pane.

04 HiLens_Getting Started04 HiLens_Getting Started 2 Installing Skills on HiLens Kit Cameras (Common Users)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 4

Page 8: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Figure 2-4 Skill market

NOTE

Skills are classified into little skills and standard skills. Skills marked with Little in the skill market canbe used by manufacturers to develop thin devices based on HiSilicon 35XX series chips. The unmarkedskills are standard skills and are used by HiLens Kit cameras.

Click the skill card to enter the details page, on which you can view the skill's functions,scoring information, and comments. If you want to buy the skill, click Buy Now on the upperright corner. Then specify the Channel Quantity Limitation, Service Months, and Copies,confirm the order, and click Buy Now. Channel Quantity Limitation indicates the numberof video channels the skill can process at the same time. Service Months is the durationduring which the skill can be used by devices. Copies indicates the number of devices onwhich the skill can be installed.

Figure 2-5 Page for buying a skill

04 HiLens_Getting Started04 HiLens_Getting Started 2 Installing Skills on HiLens Kit Cameras (Common Users)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 5

Page 9: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Installing SkillsClick Purchased on the order completion page or choose Skill Market > My Skills >Purchased to view all skills you purchased. Click Install at the bottom of the skill card,select target devices on the displayed dialog box, and click I agree and confirm that the skillis installed in the device. The HiLens management console downloads the skill package tothe target devices. Downloading the skill takes some time. After the installation is successful,a message stating "Skill installation succeeded" is displayed in the upper right corner.

Figure 2-6 Selecting target devices

Querying Skill Installation StatusTo verify that the skill has been successfully installed, choose Device Management >Devices > Manage Skill to query the skill status. If the skill status is Idle, it is still beingdelivered. Error indicates that an error occurs during skill delivery. If the status changes toRunning, the skill has been installed on the device and is running properly.

04 HiLens_Getting Started04 HiLens_Getting Started 2 Installing Skills on HiLens Kit Cameras (Common Users)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 6

Page 10: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

3 Quickly Developing a Skill Using a

Template (Developers)

This topic describes how a developer uses HiLens to develop a skill with a template shared byanother developer and installs the skill to devices. The general procedure is as follows:

1. Registering a HiLens Kit Camera2. Creating a Skill3. Deploying Skills to HiLens Kit Cameras4. Viewing the Skill Output

Prerequisites

You have registered a HUAWEI CLOUD account and enabled Huawei HiLens and relatedcloud services.

Registering a HiLens Kit Camera1. Log in to the HiLens management console, choose Device Management > Devices, and

click Register New Device in the upper right corner. A QR code is generated on theregistration page.

Figure 3-1 Device list

2. Use tools such as MobaXterm to connect to the device (camera) in SSH mode (thedefault port number is 22, and the default username and password are root and root).Click Copy Registration Info to copy the registration information and paste it on the

04 HiLens_Getting Started04 HiLens_Getting Started

3 Quickly Developing a Skill Using a Template(Developers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 7

Page 11: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

SSH interface as a parameter of the registration command, and run the ./register.pycommand to register the device. The registration command parameter must be enclosedby single quotation marks,cd /home/hilens/deploy/IEF./register.py 'Paste the QR code information copied on the following page.'Example:./register.py '{"authinfo_sk":"U9Cjaz3VaWJ5YpxU7TmZyJMa9MFGTSOGdlhN9I3d","cloudhub_url":"wss://ief-edgeaccess.cn-north-7.myhuaweicloud.com:443/register","authinfo_ak":"232HHU1UOPS3CE3NFGAT","application_id":"4287fb78-3a0c-4635-b52a-b033170546a1"}'

Figure 3-2 Copying device registration information

NOTE

This is a temporary registration mode and will be modified and optimized later.

3. If the device is bound successfully, the information about the device is displayed in thelower part of the registration page. Then, the page for entering more basic deviceinformation is automatically displayed. Fill in the device information, such as the devicename and device tag, and click OK to complete the registration. Note that the newlyregistered device stays in the Upgrading status for a period of time in the device listbecause it is being started and configured. When its status changes to Running, thedevice is successfully registered.

04 HiLens_Getting Started04 HiLens_Getting Started

3 Quickly Developing a Skill Using a Template(Developers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 8

Page 12: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Figure 3-3 Filling in device information

The complete registration process starts from opening of the QR code page and ends after youfinish performing the third step. If you do not finish registration within 15 minutes, theregistration link becomes invalid and you need to open the QR code page to register thedevice again.

Creating a Skill1. Access the Huawei HiLens management console. Choose Skill Development > Skill

Management and click Create Skill in the upper right corner. The page for creating askill is displayed. Fill in the parameters in Basic Information, Skill Content, LicenseConfiguration, and Other Information. Parameters marked with an asterisk (*) aremandatory.

Figure 3-4 Creating Skills

2. Fill in the skill's basic information such as the skill name, version, icon, and description.Figure 3-5 shows the page. On the Skill Content page, select a skill template and theconsole automatically fills in the logic code. Click Next.

04 HiLens_Getting Started04 HiLens_Getting Started

3 Quickly Developing a Skill Using a Template(Developers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 9

Page 13: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Figure 3-5 Basic information

Figure 3-6 Skill content

Figure 3-7 Selecting a skill template

3. On the License Configuration page, specify the skill's billing information and on theOther Information page, set the skill's runtime configurations, such as the facial image

04 HiLens_Getting Started04 HiLens_Getting Started

3 Quickly Developing a Skill Using a Template(Developers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 10

Page 14: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

library to which the skill uploads images. You can retain the default settings ofparameters on these two pages.

Figure 3-8 License configuration

Figure 3-9 Other information

Deploying Skills to HiLens Kit CamerasAfter a skill is created:

1. Choose Skill Development > Skill Management and click the Deploy to Device buttonof the newly created skill.

04 HiLens_Getting Started04 HiLens_Getting Started

3 Quickly Developing a Skill Using a Template(Developers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 11

Page 15: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Figure 3-10 Starting deployment

NOTE

If network faults occur, the deployment may time out or the service cannot receive the quest.Check the skill in step 2.

2. In the displayed dialog box, select the device and click Deploy and Start.

Figure 3-11 Selecting the target device

3. If the following information is displayed, the cloud-based skill is successfully deliveredto the HiLens Kit camera.

Figure 3-12 Successful deployment

4. Check whether the skill is correctly delivered. On the management console, chooseDevice Management > Devices, locate the row containing the device, and clickManage Skill to check whether the skill is delivered. For example, in Figure 3-13, theskill is in Running status, so it is successfully delivered.

04 HiLens_Getting Started04 HiLens_Getting Started

3 Quickly Developing a Skill Using a Template(Developers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 12

Page 16: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Figure 3-13 Viewing skill status

NOTE

If the skill status is Running, it is successfully delivered. If the status is Idle, the skill package isbeing delivered or decompressed. The Error status indicates that an error occurs in the runningenvironment or code.

Viewing the Skill Output1. Click Data Management and double-click the target device (to which the skill is

delivered), as shown in Figure 3-14.

Figure 3-14 Selecting the target device

2. Click the target skill and select a skill video stream in the lower right corner to play thereal-time monitoring video captured by the camera.

In this document, a car image is displayed in front of the camera. The red box containsthe detected license plate and the red characters above the plate demonstrate the text andnumber on the plate and the plate color. Figure 3-15 shows the image5

Figure 3-15 Viewing the video

04 HiLens_Getting Started04 HiLens_Getting Started

3 Quickly Developing a Skill Using a Template(Developers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 13

Page 17: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

4 Quickly Distributing New Firmware to

Devices (Manufacturers)

Assume that a manufacturer bought a batch of HiLens Kit cameras with firmware of versionv1, and wants to distribute the new v2 firmware to these devices for users to upgrade. Thistopic describes the process.

Creating Products and Product GroupsOn the Overview page, select Manufacturer for Role. After obtaining the devices, themanufacturer needs to create products. Fill in corresponding information shown in Figure4-1. If the creation is successful, the HiLensAgent product certificate (containing product.crtand product.key) is downloaded. Use tools such as MobaXterm to connect to each device inSSH mode (the default port number is 22, and the default username and password are rootand root). Download the certificate to the device and decompress it to the specified /opt/edge-register directory. (Currently, the function of downloading certificates in batches is notavailable.) After a user purchases the device, HiLens associates it with the product when it isbeing registered, to indicate that the device belongs to the product type.

Figure 4-1 Creating a product

04 HiLens_Getting Started04 HiLens_Getting Started

4 Quickly Distributing New Firmware to Devices(Manufacturers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 14

Page 18: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

After downloading the HiLensAgent, properly save it, because the product list only providesthe information viewing function, and you cannot download it again. Before deleting aproduct, ensure that it has not been used. For example, if the product has been placed in adevice purchased by a user, and the user has registered with the device, deleting it will affectsubsequent manufacturer functions.

After creating products for the batch of devices, you can create a group to manage thedevices. Fill in the corresponding name and description and associate the created product IDs,as shown in Figure 2 Creating a group. Then, you can distribute firmware to the newlycreated group.

Figure 4-2 Creating a group

Uploading Firmware to OBS

Before distributing the new firmware to the device group, upload the firmware installationpackage (a ZIP file containing the installation script to be executed on HiLens Kit cameras;downloading address will be available in later versions) to OBS. Then, create the firmware onthe HiLens management console, as shown in Figure 4-3.

Figure 4-3 Creating firmware

After the firmware of corresponding version is created, click Distribute to Device Group inthe Operation column, as shown in Figure 4-4. After the distribution is successful, you canselect the group from the group list to query the distributed firmware version.

04 HiLens_Getting Started04 HiLens_Getting Started

4 Quickly Distributing New Firmware to Devices(Manufacturers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 15

Page 19: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

Figure 4-4 Distributing firmware to a group

After the preceding operations are complete, users who have purchased the devices can see ared dot beside the Upgrade Firmware button in the device list. Click the button to view thefirmware information and upgrade the firmware, as shown in Figure 4-5.

Figure 4-5 Device list page for users

04 HiLens_Getting Started04 HiLens_Getting Started

4 Quickly Distributing New Firmware to Devices(Manufacturers)

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 16

Page 20: 04 HiLens Getting Started · 04 HiLens_Getting Started 04 HiLens_Getting Started Issue 01 Date 2019-06-18 HUAWEI TECHNOLOGIES CO., LTD.

5 Change History

Release Date Description

2019-05-16 Addedl Quick start guide for common usersl Quick start guide for manufacturers

2019-01-30 The issue is the first official release.

04 HiLens_Getting Started04 HiLens_Getting Started 5 Change History

Issue 01 (2019-06-18) Copyright © Huawei Technologies Co., Ltd. 17