Skip to content

Example of Transparent Transmission Data Interaction

Introduction

Transparent transmission data can be used in practical scenarios where there is no need for Developer Center to parse the data. Once the device has successfully connected to Developer center, call Qth.sendTrans() to enable interaction between the device and Developer Center, allowing for transparent transmission of any type of data. This section explains how to send and receive transparent transmission data in QuecPython solution.

FunctionDescription
Qth.sendTrans()Sends transparent transmission data to Developer Center.

Note: See Data Interaction API for details.

Procedure

Operation on Developer Center

1. Log in to Developer Center

Log in to Developer Center. If you don't have an account, click Register Now to register.

2. Create a Product

For details about product creation, see Create a Product.

Transparent Transmission Data Interaction

Example 1 (Send transparent transmission data)

The device calls Qth.sendTrans() to send transparent transmission data. For example, the device can call this function to send a 12-byte string "ABCabc123456" with QoS set to 1.

Sample code:

python
Qth.sendTrans(1,"ABCabc123456")

Example 2 (Read transparent transmission data issued by Developer Center)

1) Developer Center issues transparent transmission data

Open the "Device Details" page, click "Device Debug" to send or receive transparent transmission data.

img

2) The device receives the transparent transmission data issued by Developer Center

After receiving the data, the device will pass the event in the event callback function recvTransCb(). Then you can respond to and handle the event.

python
def App_cmdRecvTransCb(value):
    print('recvTrans:', value)