You can use LinkVisual device SDKs for Ubuntu and Docker to implement features provided by instances of the video type. This topic describes how to use SDK demos for trial use.
Prerequisites
A product and device are created in the IoT Platform console. For more information, see Device Connection.
Download the SDK demo
You can select a demo based on your requirements.
Demo | Description | Download link |
Ubuntu Demo | The demo must run in Ubuntu 18.04. We recommend that you install a distribution that has been tested by Alibaba Cloud to avoid compatibility issues. | |
Docker Demo | The demo is compatible with multiple operating systems. You can install Docker on Windows, macOS, or Linux to use the demo. |
Procedure for using the Ubuntu demo
Download the demo package of LinkVisual SDK for Ubuntu.
NoteThe name of the downloaded demo package is
lv_2.1.2-lk_2.3.0-ubuntu.tar.gz
.Run the
tar -xf lv_2.1.2-lk_2.3.0-ubuntu.tar.gz
command to decompress the package into a folder.Run the
cd lv_2.1.2-lk_2.3.0-ubuntu
command to open the folder. The following script describes the directory structure.1.jpg avc_aac_1000k avc_aac_1000k.index avc_aac_1000k.meta avc_aac_500k avc_aac_500k.index avc_aac_500k.meta link_visual_ipc
Run the
./link_visual_ipc -p ${YourProductKey} -n ${YourDeviceName} -s ${YourDeviceSecret}
command to activate your device and connect it to LinkVisual.The following table describes the parameters:
${YourProductKey}
ProductKey
g18l****
When the device is connected to LinkVisual, the device certificate information is saved. For more information, see Result. You can also view the information on the Device Details page in the IoT Platform console.
${YourDeviceName}
DeviceName
Device1
${YourDeviceSecret}
DeviceSecret
b2e6e4f1058d8****
The following log indicates that the operation is successful.
Perform the following steps on the Device Details page in the IoT Platform console to view the device status:
Log on to the IoT Platform console.
On the Instance Overview page, find the instance and click the instance name to go to the Instance Details page.
In the left-side navigation pane, choose Devices > Devices.
On the Devices page that appears, click the name of the device that you want to manage. The Device Details page is then displayed.
Click the TSL Data tab. You can view the Thing Specification Language (TSL) data on the Status tab. After several minutes, you can click the Events tab to view the intelligent alert events.
Procedure for using the Docker demo
Install Docker.
NoteYou must install Docker to use the demo.
Download the demo package of LinkVisual SDK for Docker.
NoteThe name of the downloaded demo is
lv_2.1.2-lk_2.3.0-docker.tar.gz
.Run the
docker load -i lv_2.1.2-lk_2.3.0-docker.tar.gz
to import the Docker image.Loaded image: ubuntu:lv_2.1.2-lk_2.3.0
is displayed if the previous operation is complete.Run the
docker run -it --rm ubuntu:lv_2.1.2-lk_2.3.0 bash
command to run the image and access the container generated from the image.Run the
cd /home
command to enter the /home directory.Run the following commands to decompress the demo package and then open the decompressed file.
tar -xvf lv_2.1.2-lk_2.3.0-ubuntu.tar.gz cd lv_2.1.2-lk_2.3.0-ubuntu
Run the
ls
command. The demo file contains the following content:1.jpg avc_aac_1000k avc_aac_1000k.index avc_aac_1000k.meta avc_aac_500k avc_aac_500k.index avc_aac_500k.meta link_visual_ipc
Run the
./link_visual_ipc -p ${YourProductKey} -n ${YourDeviceName} -s ${YourDeviceSecret}
command to activate your device and connect it to LinkVisual.The following table describes the parameters:
${YourProductKey}
ProductKey
g18l****
When the device is connected to LinkVisual, the device certificate information is saved. For more information, see Result. You can also view the information on the Device Details page in the IoT Platform console.
${YourDeviceName}
DeviceName
Device1
${YourDeviceSecret}
DeviceSecret
b2e6e4f1058d8****
The following log data indicates that the operation is complete.
Perform the following steps on the Device Details page in the IoT Platform console to view the device status:
Log on to the IoT Platform console.
On the Instance Overview page, find the instance and click the instance name to go to the Instance Details page.
In the left-side navigation pane, choose Devices > Devices.
On the Devices page that appears, click the name of the device that you want to manage. The Device Details page is then displayed.
After about 10 minutes, click the TSL Data tab, and then click the Events tab to view the intelligent alert events.