Common AT Commands
Note
The common AT commands are enabled by default and cannot be disabled.
AT+TEST
Function Description
Test whether the AT commands are ready
Test the throughput of the AT underlying peripheral interface
Command Format
AT+TEST=[<mode>, <length>/<string>]
Response Format
Successful response:
OK
Error response:
ERROR: <error_no>
Parameters
- <mode>Test mode
0: Echo test
1: Uplink rate test
2: Downlink rate test
<length> : Data size for rate testing
<string> : Input string for the echo test
Error Codes
1: Parameter error
2: Memory allocation error
Note
When <mode> is set to uplink rate test, the module enters Transparent Transmission (TT) Mode mode.
Examples
Test if AT commands are ready:
AT+TEST
OK
Test echo functionality:
AT+TEST=0,echo_test
arg len = 9
arg = echo_test
OK
Test uplink rate:
AT+TEST=1, 102400
>>>
upstream test(tt mode): Send 100 KBytes in <time> ms, <throughput> Kbits/sec
OK
Test downlink rate:
AT+TEST=2,102400
//Host calculates the data transmission rate
OK
AT+GMR
Function Description
Output version and related information.
Command Format
AT+GMR
Response Format
Successful response:
AMEBA-RTOS SDK VERSION: <SDK version number>
ATCMD VERSION: <AT command version number>
IMAGE VERSION: <Current image version number>
<Chip nickname>: <Chip information>
COMPILE TIME: <Compilation time>
COMPILE USER: <Compilation user>
COMPILE ENV : <Compilation environment>
OK
Parameters
None
Example
Get version information:
AT+GMR
AMEBA-RTOS SDK VERSION: 1.1.0
ATCMD VERSION: 2.4.1
IMAGE VERSION: 1.1
amebasmart: e1ffe0ff2504cc5383c030d6ffffff28
COMPILE TIME: 2025-03-26 14:06:55
COMPILE USER: user@linux
COMPILE ENV : arm-none-eabi-gcc
OK
AT+LIST
Function Description
This command is used to list all currently supported AT commands.
Command Format
AT+LIST
Response Format
Successful response:
Common AT Command:
AT+TEST
// … followed by other common command list.
Wi-Fi AT Command:
AT+WLSOFTAP
// … followed by other Wi-Fi command list.
NETWORK AT command:
AT+SKTGETERR
// … followed by other TCP/IP command list.
BT AT command:
AT+BLECMODE
// … followed by other BT command list.
MQTT AT command:
AT+MQTTOPEN
// … followed by other MQTT command list.
OK
Parameters
None
AT+RST
Function Description
Immediately restart the module.
Command Format
AT+RST
Response Format
Successful response:
OK
Parameters
None
AT+STATE
Function Description
Get the status of tasks and current heap information.
Command Format
AT+STATE
Response Format
Successful response:
Task List:
<Thread name> <Status> <Priority> <Available stack watermaker> <Task number>
...
HeapStats:
Total Heap: <Total heap size>
Heap Free Now: <Currently available heap size>
Heap Used Now: <Currently used heap size>
Heap Used Max: <Historical maximum used heap>
OK
Note
In the <Status> field:
X indicates running
R indicates ready state
B indicates blocked
S indicates suspended
D indicates deleted
Parameters
None
AT+OTACLEAR
Function Description
Clear the signature of the current app image.
Used for switching image during mass production. Refer to
Note
This command is only supported in manual test mode.
Command Format
AT+OTACLEAR
Response Format
Successful response:
OK
Parameters
None
AT+OTARECOVER
Function Description
Recover the signature of the app image cleared by AT+OTACLEAR.
Used for switching image during mass production. Refer to
Note
This command is only supported in manual test mode.
Command Format
AT+OTARECOVER
Response Format
Successful response:
OK
Parameters
None
AT+CPULOAD
Function Description
Get CPU load statistics.
Note
This command is only supported in manual test mode.
Command Format
AT+CPULOAD=<mode>[,<interval>,<count>]
Response Format
Successful response:
For mode == 0:
+CPULOAD:OK
current mode: <mode> time: <interval>(s) count: <count>(-1 for infinite)
task name state prio CPU%
<cpu_stat_thread> R 10 99.87
<task_1> r 0 0.01
<task_2> b 9 0.01
// Other task lists if exist.
// Wait for <interval> second, the next output, at most <count> times totally.
For mode == 1:
+CPULOAD:OK
current mode: <mode> time: <interval>(s) count: <count>(-1 for infinite)
// Stop here if there is an infinite statistic.
For mode == 2 or mode == 3:
+CPULOAD:OK
current mode: <mode> time: <interval>(s) count: <count>(-1 for infinite)
task name state prio CPU%
<cpu_stat_thread> R 10 99.87
...
Error response:
ERROR:<error_no>
Parameters
<mode>: Mode for reading CPU load
0: Create CPU load statistics task
1: If the task is running, output information immediately and reduce the count; if it’s an infinite statistic, stop immediately
2: Update statistics time
3: Output information from the last statistics time
<interval>: Interval time (seconds)
[1, INT_MAX]
<count>: Number of statistics, 0 or -1 means infinite times
[-1, INT_MAX]
Error Codes
1: Parameter count error
2: Memory allocation error
3: Input mode error
4: The number of tasks exceeds the limit
Example
Using the AT+CPULOAD command:
AT+CPULOAD=0
// Output...
AT+CPULOAD=1
+CPULOAD:OK
// Additional examples...
AT+LOG
Function Description
Get, set, or clear log levels.
Command Format
AT+LOG=<op>[,<module>,<log_level>]
Response Format
Successful response:
OK
or
<module> level = <log_level>
OK
Error response:
ERROR:<error_no>
Parameters
<op>: Operation type
0: Get log level
1: Set log level
2: Output all log levels
3: Clear all log levels
<module>: Specific module name
String,
*
represents all modulesLength should not exceed 9 bytes
<log_level>: Log level
[0,5]
Error Codes
1: Parameter error
2: Setting failed
Example
Log level operations:
AT+LOG=1,module1,3
AT+LOG=0,module1
AT+LOG=2
AT+LOG=3
AT+RREG
Function Description
Read the value of a general register.
Note
This command is only supported in manual test mode.
Command Format
AT+RREG=<address>[,<length>,<in_byte>]
Response Format
Successful response:
[address] <value at address> <value at address+4> <value at address+8> <value at address+12>
OK
Error response:
ERROR:<error_no>
Parameters
<address>: Starting address of the register
Please ensure the address is 4-byte aligned. If not aligned, it will be automatically aligned
<length>: Length to read, unit determined by <in_byte>
- <in_byte>: In word or byte units
B
orb
, indicates in byte unitsNon-
B
orb
, indicates in word units
Note
The input address must be valid, otherwise it may cause system crash.
Error Codes
1: Parameter error
Example
Read 40 words of data starting from address 0x420080E0 in word units:
AT+RREG=0x420080E0,40
[420080e0] 00000000 00000000 00000000 00000000 bdc00512 00000000 ffffffff 00000000
[42008100] 0135110d 80010904 48380b77 00000061 e083f565 0000004e 00000000 00000000
[42008120] 0000001c 00000000 00000000 00000000 0040557f 00000000 00000000 00000000
[42008140] f62f98db 927956a0 00004910 00000000 4275fbb9 000000c5 00000000 00000000
[42008160] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
OK
Read 40 bytes of data starting from address 0x420080E0 in byte units:
AT+RREG=0x420080E0,40,b
[420080e0] 00 00 00 00 00 00 00 00
[420080e8] 00 00 00 00 00 00 00 00
[420080f0] 12 05 c0 bd 00 00 00 00
[420080f8] ff ff ff ff 00 00 00 00
[42008100] 0d 11 35 01 04 09 01 80
OK
AT+WREG
Function Description
Write a word of data to the corresponding general register.
Note
This command is only supported in manual test mode.
Command Format
AT+WREG=<address>,<data>
Response Format
Successful response:
OK
Error response:
ERROR:<error_no>
Parameters
<address>: Register address
Please ensure the address is 4-byte aligned. If not aligned, it will be automatically aligned
<data>: Word data to be written
Note
The input address must be valid, otherwise it may cause system crash.
Error Codes
1: Parameter error
Example
Write data 0x12345678 to address 0x420080E0:
AT+WREG=0x420080E0,0x12345678
[420080e0] 12345678
OK
AT+TICKPS
Function Description
System low power consumption test.
Note
This command is only supported in manual test mode.
Command Format
AT+TICKPS=<op>[,<type>]
Parameters
<op>: Low power operation
R
: Release low power lock, allow entering low power modeA
: Acquire low power lock, do not allow entering low power modeTYPE
: Set low power typeGET
: Get low power information
- <type>: Only needed when <op> is
TYPE
PG
: Power Gate modeCG
: Clock Gate mode
- <type>: Only needed when <op> is
Example
Set low power mode to CG mode
AT+TICKPS=TYPE,CG
Enter low power mode
AT+TICKPS=R
Get low power information
AT+TICKPS=GET
lockbit:1
dslp_lockbit:1