Get Configurations¶
This section describes how to use the AT@GTC command to obtain the entire configuration file or its content of the terminal.
The terminal has several ways to output the configuration file or its content:
Print the configuration file content through the serial port.
Send the query response messages to backend server via QRY frames.
Upload the configuration file through the POST request of HTTP protocol.
The process of uploading the configuration file is similar to that of upgrading the firmware. Please refer to here for more information, the following is intended to describe the AT@GTC command and F3H report.
GTC (Get Configurations)¶
The AT@GTC command is used to get all configurations of the terminal.
There are two sets of configurations in the terminal device, the factory configurations and the application configurations:
When production, the configurations written to the terminal device is the factory configurations, which will also be used as the application configurations.
The user can only modify the application configurations through the configuration commands and the AT@UPC command, which has no effect on the factory configurations.
When the terminal receives a subcommand 94 or 95 of the AT@RTO command, the relevant parameters of the current configurations will be changed to the same as the factory configurations.
Example:
AT@GTC=gl601###,2,,3,http://218.17.46.11:964/GL601/Config,,,,,1234$
+ACK:GTC,123456789012345,C031,10,0,,1234,20210407101530,1234$
+NACK:GTC,123456789012345,C031,10,0,,0,1234,20210407101530,1234$
Parts |
Fields |
Length (Byte) |
Range/Format |
Default |
|---|---|---|---|---|
Head |
Header |
3 |
AT@ |
AT@ |
Command Word |
3 |
GTC |
GTC |
|
Leading Symbol |
1 |
= |
= |
|
Password |
8-16 |
gl601### |
||
Body |
Mode |
1 |
Please see below. |
|
Type |
<=2 |
Please see below. |
||
Upload Timeout |
<=2 |
3-10 (minutes) |
3 |
|
Upload Directory |
<=150 |
A valid HTTP URL. |
||
Authentication Username |
<=6 |
‘0’-‘9’, ‘a’-‘z’, ‘A’-‘Z’ |
||
Authentication Password |
<=6 |
‘0’-‘9’, ‘a’-‘z’, ‘A’-‘Z’ |
||
Reserved |
0 |
|||
Reserved |
0 |
|||
Tail |
Sequence Number |
4 |
0000-FFFF (‘0’-‘9’, ‘A’-‘F’) |
|
Tail |
1 |
$ |
$ |
Mode
A numeral to specify how to get the configurations.
0 - Print out file. Print the configuration file content directly from the serial port.
1 - Send query responses. Send all query responses for current applicaton configurations to backend server via QRY frames.
2 - Upload file. Upload the file to the directory which is specified by ‘Upload Directory’ via HTTP POST.
Type
It specifies which set of configurations will be obtained.
Empty - All configurations.
0 - Factory configurations.
1 - Application configurations.
Note: This parameter is invalid for Mode 1.
Upload Timeout
If uploading is not finished within this time, it will be regarded that the uploading failed.
Note: This parameter is only valid for Mode 2.
Upload Directory
It specifies the directory to upload the configuration file.
Note: This parameter is only valid for Mode 2. And for Mode 2, this field must be filled with a valid directory, and is not allowed to be empty.
Authentication Username
If the server (which is specified by ‘Upload Directory’) uses authentication, the username is specified here.
Note: This parameter is only valid for Mode 2.
Authentication Password
If the server (which is specified by ‘Upload Directory’) uses authentication, the password is specified here.
Note: This parameter is only valid for Mode 2.
F3H (GTC Status)¶
When the ‘Mode’ field in the AT@GTC command is 1 or 2, during performing the process of getting configuration, this message (a report that only carries Record F3H) will be sent to backend server to inform the performing status.
For example (Total 41 bytes):
2B 00 00 29 00 01 23 45 67 89 01 23 45 C0 31 00 0A 00 00 12 66 8E 47 F7 00 00 F3 00 67 07 01 00 00 00 00 00 00 01 23 7E 24
For example (Total 107 bytes):
2B 00 00 6B 00 01 23 45 67 89 01 23 45 C0 31 00 0A 00 00 54 66 8E 47 F7 00 00 F3 00 67 49 02 00 00 00 00 00 00 68 74 74 70 3A 2F 2F 31 39 32 2E 31 36 38 2E 31 2E 33 30 30 3A 35 39 30 2F 47 56 35 30 31 4C 47 2F 43 6F 6E 66 69 67 2F 47 56 35 30 31 4C 47 5F 32 30 32 30 30 39 30 31 31 30 32 34 31 31 2E 63 66 67 01 23 3B 24
Parts |
Fields |
Length (Byte) |
Range/Format |
Default |
|
|---|---|---|---|---|---|
Head |
18 or 20 |
||||
Reserved |
1 or 1+N |
||||
Records |
Record Length |
1 or 2 |
00H-7FH or 8080H-FFFFH |
||
Generated Time |
4 |
||||
Record ID |
1 |
F3H |
F3H |
||
Event Code |
1 |
00H |
00H |
||
Data of Record |
Data ID |
1 or 2 |
00H-7FH or 8080H-FFFFH |
||
Data Length |
1 or 2 |
00H-7FH or 8080H-FFFFH |
|||
Data Content |
N |
||||
… |
|||||
… |
|||||
Tail |
4 |
||||
The definitions of parts ‘Head’, ‘Reserved’, and ‘Tail’ are here.
Event Code
The default is 00H.
Data of Record
Fixedly, this record contains only the following Data ID units:
Data 103 - Get Configuration.