Query Command and Response¶
The query command is used to query the current working parameters of the terminal device.
All query commands are encoded using printable ASCII characters, and the character ‘,’ is used to separate the neighboring parameter characters, as follows:
Example:
AT@APN?gl601###,,1C06$
AT@TMA?gl601###,,13B7$
AT@AGPS?gl601###,,280F$
AT@QRC?gl601###,01,A0E1$
AT@QRC?gl601###,03,A3F2$
Parts |
Fields |
Length (Byte) |
Range/Format |
Default |
|---|---|---|---|---|
Head |
Header |
3 |
AT@ |
AT@ |
Command Word |
<=10 |
‘A’-‘Z’, ‘0’-‘9’ |
||
Leading Symbol |
1 |
? |
? |
|
Password |
8-16 |
‘0’-‘9’, ‘a’-‘z’, ‘A’-‘Z’, ‘-’, ‘_’, ‘#’ |
gl601### |
|
Body |
Flexible Field |
N |
Please see below. |
|
Tail |
Sequence Number |
4 |
0000-FFFF (‘0’-‘9’, ‘A’-‘F’) |
|
Tail |
1 |
$ |
$ |
Command Word
Used to indicate which command to query.
Please refer to Commands for the command words supported by the terminal device.
Flexible Field
This field is prepared for some special commands that need to carry additional necessary information, and the meaning is also determined by these commands.
In fact, this field is only meaningful in the following commands, and it is an empty field (length is 0) in all other commands:
-
For the QRC command, the length of this field is 2 bytes. And it is a ‘Record ID’ to indicate which report configuration is to be queried.
For example, AT@QRC?gl601###,03,A3F2$ can query the configuration parameters of Record 03H (Connection Starts).
-
Sequence Number
The sequence number of the command. It will be included in the QRY frame (see below) of the terminal device responding to the command.
When the terminal device receives a legitimate query command, it will always respond with the current parameters of the corresponding command. The entire response frame (can be called QRY frame) are also encoded using printable ASCII characters, and the character ‘,’ is used to separate the neighboring parameter characters, as follows:
Example:
+QRY:APN,123456789012345,C031,10,0,1,1,,cmnet,,,0,,1C06,20210407101530,1234$
+QRY:TMA,123456789012345,C031,10,0,1,1,0,+32,0,,time.windows.com,123,13B7,20210407101540,1235$
+QRY:AGPS,123456789012345,C031,10,0,1,1,1,1,,,280F,20210407101550,1236$
Parts |
Fields |
Length (Byte) |
Range/Format |
Default |
|---|---|---|---|---|
Head |
Header |
4 |
+QRY |
+QRY |
Leading Symbol |
1 |
: |
: |
|
Command Word |
<=10 |
‘A’-‘Z’, ‘0’-‘9’ |
||
IMEI |
15 |
|||
Device Type |
4 |
0000-FFFF (‘0’-‘9’, ‘A’-‘F’) |
C031 |
|
Protocol Version |
1-5 |
1-65535 |
10 |
|
Custom Version |
1-3 |
0-255 |
0 |
|
Total Frame |
1-2 |
1-99 |
||
Current Frame |
1-2 |
1-99 |
||
Body |
Parameters |
N |
Refer to the detailed definition of each command. |
|
Tail |
Sequence Number |
4 |
0000-FFFF (‘0’-‘9’, ‘A’-‘F’) |
|
Generated Time |
14 |
YYYYMMDDHHMMSS |
||
Count Number |
4 |
0000-FFFF (‘0’-‘9’, ‘A’-‘F’) |
||
Tail |
1 |
$ |
$ |
Command Word
Corresponding to the command word in the query command.
IMEI
The International Mobile Equipment Identity of the terminal device.
Device Type
The type of terminal device. For GL601, it is “C031”.
Protocol Version
The version number of this @Track protocol.
For example, “1” means V1, “12” means V12, and “123” means V123.
Custom Version
This version number is reserved for user customization.
For example, “1” means V1, “12” means V12, and “123” means V123.
If the custom version number has not been set, it defaults to “0”.
Total Frame
The total number of QRY frames.
There are some commands (such as commands containing the ‘Profile ID’ field) whose parameters are not suitable for all being placed in one QRY frame. At this time, the terminal device will respond to multiple QRY frames consecutively in order to send all the parameters of the command to the inquirer. And this ‘Total Frame’ field is used to indicate the total number of QRY frames (the ‘Current Frame’ field below is used to indicate the current frame number).
Current Frame
Indicates the current number of QRY frame. It counts from 1, and the maximum value is equal to ‘Total Frame’.
Parameters
The current working parameters of the corresponding command in the terminal device. Its content is determined by ‘Command Word’, which is consistent with ‘Parameters’ in Configuration Command.
Sequence Number
Corresponding to the sequence number in the query command.
Generated Time
The UTC time when the frame was generated, in ‘YYYYMMDDHHMMSS’ format.
For example, “20230907105030” indicates the UTC time September 7,2023,10:50:30.
Count Number
A self-increasing count number in each QRY frame. It begins from “0000” and increases by 1 for each QRY frame. And it rolls back after “FFFF”.
For the meaning of other fields, please refer to Configuration Command and Acknowledgement.
About the query response of the Profile-related command:
The commands that contain the ‘Profile ID’ field in the parameters are called Profile-related commands (please refer to Profiles for more information). To query the parameters of these commands, the terminal device may respond to multiple QRY frames consecutively.
For example, for the query command AT@QRC?gl601###,50,0C37$, its response may be:
+QRY:QRC,123456789012345,C031,10,0,3,1,50,0,2,,82,10,1,600,0,0,0,0C37,20210407101530,1234$ +QRY:QRC,123456789012345,C031,10,0,3,2,50,1,0,,82,10,1,300,0,0,0,0C37,20210407101532,1235$ +QRY:QRC,123456789012345,C031,10,0,3,3,50,63,1,,82,10,1,60,0,0,0,0C37,20210407101533,1236$
Note
One query command can only query the parameters of one command. If you want to get the entire configuration file of the terminal device, you can issue the AT@GTC command. Please refer to Get Configurations for more information.