4G version cloud audio setting tutorial Alibaba Cloud platform version

4G version cloud audio setup tutorial introduction

Chapter 1 introduces the three elements used to create a device on the Alibaba Cloud IoT platform

Chapter 2 Convert Alibaba Cloud three elements to MQTT parameters and download them to the device

Chapter 3 Alibaba Cloud IoT Suite Protocol Instructions, how to send data to the device and play it


This article directory guide

Table of contents

4G version cloud audio setup tutorial introduction

1. Apply for three elements of equipment

1. Log in to Alibaba Cloud IoT Platform

 2. Create products

3.Set product parameters

4.Add device

5. Get three elements

2. Set the three elements of the device

1. Open MQTTConfigTools

2. Calculate MQTT parameters

3. Connect your device using USB

4.Set parameters

3. Alibaba Cloud IoT Suite Protocol Instructions for Use

1. Push protocol information

2.topic rule description

3. Playback protocol description

4G version cloud audio related video tutorials



1. Apply for three elements of equipment

1. Log in to Alibaba Cloud IoT Platform

Open the browser and enter the URL https://iot.aliyun.com to enter the Alibaba Cloud IOT platform page. Click "Login" in the upper right corner, enter your Alibaba Cloud account and password, and click "Login". Select "IoT Platform" to enter the IoT platform backend management interface.

 2. Create products

Select "Device Management" - "Products" and click the "Create Product" button. The server in East China 2 Shanghai is selected by default.

3.Set product parameters

Create a product based on the following parameters and click Save:

4.Add device

Enter the device interface and click "Add Device". After creating the product, you will be prompted to create a device, which is the same interface as here. Note: DeviceName must not exceed 64 characters in length.

5. Get three elements

After the device is successfully created, click "View" on the right side of the product list to enter the following interface

On the device viewing interface, click "View" to the right of the device secret in the upper right corner. In the pop-up "Device Certificate" prompt box, click "One-click copy".

Pasted into a text file, the content will appear as follows:

{
	"ProductKey": "a1owulEnjRQ",
	"DeviceName": "BOX20200500001",
	"DeviceSecret": "6GsxXCskZkWbedgIuGkKuyErhmn1Zipa"
}

2. Set the three elements of the device

1. Open MQTTConfigTools

Download the CloudSpeakConfig.rar application, set the three elements into the device, click download and unzip, as shown in the figure below:

2. Calculate MQTT parameters

Click to open "7.MQTTConfigTools (WIFI Client Edition).exe", fill in the obtained three elements into the application, and click "Generate Single Configuration", as shown in the figure below:

3. Connect your device using USB

Click to open "4.WIFI4G cloud speaker USB serial port production tool (new motherboard).exe", turn on the device, and use the Android phone type-c interface data cable to connect the device to the computer.

4.Set parameters

Fill in the parameters generated in step 2 into the application one by one, and click "Set". If "Set successfully" is displayed, it means the parameter setting is successful.

Now that the device is connected to the network, you can connect to Alibaba Cloud IoT and activate the device. When you hear "Server connection successful", it means the device with the above parameters is successful.

3. Alibaba Cloud IoT Suite Protocol Instructions for Use

1. Push protocol information

Turn on the device. When you hear "Server connection successful", you can see that the device status is "Online" in the "Device Management" - "Device" interface in the Alibaba Cloud backend.

In the device viewing interface, enter the "topic list", select the corresponding topic, click the "Publish Message" button at the back, write the data content that needs to be sent into the pop-up box, click OK, and the data can be pushed to the corresponding equipment.

The relevant TTS playback protocols are as follows:

{"cmd":"voice","msg":"微信收款31.22元","msgid":"202010260001"}

Click Confirm and you will immediately hear the corresponding sound from the device, indicating that the device has been debugged successfully, as shown in the figure below:

Note: The orderId field should have a different value each time it is played. It is recommended to use time as the parameter of this field and be accurate to at least seconds to prevent two consecutive pieces of data from being played repeatedly.

2.topic rule description

If there is no related topic later, the user needs to manually create a new topic, as follows:

/a1xZ2SLCzIm/7N21lBOpwSNTAjj9q6j8/user/get

The rules are as follows:

/ProductKey/DeviceName/user/get

ProductKey is:

a1xZ2SLCzIm

DeviceName is:

7N21lBOpwSNTAjj9q6j8

When the device frequently drops offline, you can check it through the device operation log. Click to view the specific instructions .

3. Playback protocol description

The TTS playback protocol is in JSON format, and the specific parameters are described as follows:

cmd string type Must be "voice"
msg string type The actual content that needs to be played
msgid string type Generally defined using time and supported serial numbers, there are no strict requirements.


4G version cloud audio related video tutorials

Bilibili: 4G Cloud Speaker Alibaba Cloud IoT Platform Settings Tutorial.

Guess you like

Origin blog.csdn.net/mqlinks/article/details/132634601