Skip to content

Example of Transparent Transmission Data Interaction

Introduction

Transparent transmission data can be used according to actual scenarios. If you do not need Developer Center to parse the data but only transparently transmit data, you can execute AT+QIOTSEND and AT+QIOTRD to make the device interact with Developer Center after the device is successfully connected to Developer Center. Any type of data can be transparently transmitted. This chapter introduces how to send and receive transparent transmission data by AT command.

AT CommandDescription
AT+QIOTCFGConfigure Optional Parameters
AT+QIOTSENDSend Transparent Transmission Data to Developer Center
AT+QIOTRDRead Transparent Transmission Data Issued by Developer Center

Note: See Data Interaction Commands 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.

Operation on Device

Transparent Transmission Data Interaction

In transparent transmission mode, if QoS = 1 or 2, the module will return OK and report +QIOTEVT: 4,10200 after sending data successfully; If QoS = 0, the module will return OK but not report any event after sending data successfully.

Example 1 (Send data in string format)

MCU can send transparent transmission data by AT+QIOTSEND=<mode>,<length>[,<data>].

Send data as a string of 12 bytes "ABCabc123456" with QoS equal to 1.

c
[TX]AT+QIOTSEND=1,12,"ABCabc123456"

[RX]OK

[RX]+QIOTEVT: 4,10200

Example 2 (Send any byte stream data)

MCU can send transparent transmission data by AT+QIOTSEND=<mode>,<length>.

Sends a byte stream of 10 bytes {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09} with QoS equal to 2.

c
[TX]AT+QIOTSEND=2,9

[RX]AT+QIOTSEND=2,9

> 
[TX]0x010203040506070809
[RX]OK

[RX]+QIOTEVT: 4,10200

Example 3 (Read transparent transmission data issued by Developer Center in unbuffered mode)

The mode defaults to 0 (Disable buffer mode). a. Developer Center issues transparent transmission data

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

img

b. Module prints downlink data to port

After receiving the data, the module sends +QIOTEVT: 5,10200 and the data to MCU.

c
[RX]+QIOTEVT: 5,10200,12
ABCabc123456

Example 4 (Read transparent transmission data issued by Developer Center in buffer mode)

a. Enable buffer mode for downlink data

MCU can configure the buffer mode for downlink data by AT+QIOTCFG="buffer"[,<buffer_mode>].

c
[TX]AT+QIOTCFG="buffer",1

[RX]AT+QIOTCFG="buffer",1

OK

b. Developer Center issues transparent transmission data

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

img

c. Query the downlink data The module can cache up to 10 messages after receiving messages and sends +QIOTEVT: 5,10200 to MCU. After MCU receives the messages, you need to manually send AT+QIOTRD=<req_length> to query the data read actually read.

c
[RX]+QIOTEVT: 5,10200

[TX]AT+QIOTRD=512

[RX]AT+QIOTRD=512

+QIOTRD: 12,0,0
ABCabc123456
OK