Appearance
Value-Added Service Commands
Value-Added Service Command Overview
AT Command | Description |
---|---|
AT+QIOTNTPREQ | Get time from NTP server |
AT+QIOTDATACOLLTX | Report 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
cAT+QIOTNTPREQ=?
Response
Return the supported parameter format.
cOK
Execution Command
Issue
cAT+QIOTNTPREQ
Response
If the query is successful,
cOK +QIOTEVT:4,10250,<time>,<zone>,<timestamp>
If the query failed,
c+QIOTEVT:4,10350
If there is any error:
cERROR
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
cAT+QIOTDATACOLLTX=?
Response
c+QIOTDATACOLLTX: (0-1),(0-1048576),(1-1024) OK
Write Command
Issue
cAT+QIOTDATACOLLTX=<endFlag>,<pkgSortId>,<pkgLen>
Response If the command is executed successfully:
c> Enter data OK +QIOTEVT: 30,0,<pkgSortId>
If there is any error:
cERROR
Or
cOK +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 Code | Description |
---|---|
0 | Data sent successfully. |
1 | Data sending failed. |
2 | The uplink data received per second exceeded the threshold. Developer Center stops receiving uplink data. Unit: s. |
3 | Data sending failed. Please try again. |
10 | Failed to connect to the data acquisition server. |
11 | The uplink ended abnormally due to a transmission error. |
12 | The data acquisition channel is not enabled. |
13 | Server connection failed. Please try again. |
20 | The 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