Skip to content

Value-Added Service Commands

Value-Added Service Command Overview

AT CommandDescription
AT+QIOTNTPREQGet time from NTP server
AT+QIOTDATACOLLTXReport data acquisition information

AT Description

 

AT+QIOTNTPREQ (Get time from NTP server)

  • Description: This command gets the time from the NTP server.
  • Maximum Response: 300 ms.

Test Command

  • Issue

    c
    AT+QIOTNTPREQ=?
  • Response

    Return the supported parameter format.

    c
    
    OK

Execution Command

  • Issue

    c
    AT+QIOTNTPREQ
  • Response

    If the query is successful,

    c
    OK
    
    +QIOTEVT:4,10250,<time>,<zone>,<timestamp>

    If the query failed,

    c
    +QIOTEVT:4,10350

    If there is any error:

    c
    ERROR

Parameter

  • <time>: String type. The bindable time. Format: YYYY-MM-DD hh:mm:ss week.
  • <zone>: String type. Time zone.
  • <timestamp>: String type. Timestamp.

NOTE

  • This command is supported in SDK version 2.11.0 and above.

Example

Example 1 (Get time from the NTP server.)

c
[TX]AT+QIOTNTPREQ

[RX]OK

[RX]+QIOTEVT: 4,10250,"2023-02-07 10:29:54 2","+08:00","1675736994488"

 

AT+QIOTDATACOLLTX (Report data acquisition information)

  • Description: This command reports data acquisition information.
  • Maximum Response Time : 300 ms.

Test Command

  • Issue

    c
    AT+QIOTDATACOLLTX=?
  • Response

    c
    +QIOTDATACOLLTX: (0-1),(0-1048576),(1-1024)
     
    OK

Write Command

  • Issue

    c
    AT+QIOTDATACOLLTX=<endFlag>,<pkgSortId>,<pkgLen>
  • Response If the command is executed successfully:

    c
    >
    Enter data
    OK
    +QIOTEVT: 30,0,<pkgSortId>

    If there is any error:

    c
    ERROR

    Or

    c
    OK
    
    +QIOTEVT: 30,<errnoType>[,<pkgSortId>]

Parameter

  • <endFlag>: Integer type. Whether the package is the last one. Range: 0–1.
    • 0 : The package is not the last one.
    • 1 : The package is the last one.
  • <pkgSortId>: Integer type. Range: 0–1048576.
  • <pkgLen>: Integer type. Size of the subpackage. Range: 1–1024. Unit: byte.
  • <errnoType>: Integer type. Result code indicating the data sending result. Range: 0–20.
<errnoType> Result CodeDescription
0Data sent successfully.
1Data sending failed.
2The uplink data received per second exceeded the threshold. Developer Center stops receiving uplink data. Unit: s.
3Data sending failed. Please try again.
10Failed to connect to the data acquisition server.
11The uplink ended abnormally due to a transmission error.
12The data acquisition channel is not enabled.
13Server connection failed. Please try again.
20The data acquisition channel has been closed.

NOTE

  • This command is supported in SDK version 2.18.0 and above.

Example

Example 1 (Report data acquisition information to Developer Center)

c
[TX]AT+QIOTDATACOLLTX=1,0,5

[RX]>

[TX]hello

[RX]OK

[RX]+QIOTEVT: 30,0,0