-
Notifications
You must be signed in to change notification settings - Fork 1
Command Reference
- About
- Core AT Commands
- AT& extended commands
- AT+ commands
- AT$ configuration variables
- ATS registers
- Espressif AT commands
This contains a full list of Hayes-style AT commands compatible with the PerryZi firmware. Note that, for the majority of commands that use quotes, those quotes are optional unless the parameter contains one or more spaces. This is not true, however, for Espressif commands, and quotes should always be used if expected by the command.
| Command | Description |
|---|---|
AT |
Attention prefix. On its own, returns OK. Prefixes all commands below. |
ATA |
Answer / accept a waiting incoming connection. |
ATB<n> |
Set the serial baud rate. A comma-separated suffix may set the line format (data/parity/stop). |
ATC |
Connect: bring up wifi (and/or open the pending connection). |
ATD"host:port"ATDT"host:port"
|
Dial a remote host and enter online (stream) mode. The T in ATDT is optional. |
ATE<n> |
Echo:0 - off1 - on |
ATF<n> |
Serial flow-control type:0 - RTS/CTS1 - XON/XOFF, 2 - XON/XOFF auto-off3 - manual4 - disabled |
ATH |
Hang up: close all open connections. |
ATI<n> |
Information:0 / 1 / 5 - settings strings2 - IP3 - SSID4 - firmware version6 - MAC7 - date/time8 - build date9 - network details10 - last printer spec11 - free heap |
ATL |
Re-send the last packet on a connection. |
ATM |
Hayes compatibility (speaker control); no operation. |
ATN<n> |
Create or remove a TCP listener (server) port. |
ATO |
Return to online (stream) mode with the current connection, or dial a phonebook entry by number. |
ATP |
Phonebook: list, add or remove stored dialling entries. |
ATQ<n> |
Quiet mode:0 - enable result codes1 - suppress result codes |
ATR<n> |
Line-ending mode:0 - CR1 - CRLF2 - LFCR3 - LF
|
ATRD / ATRT
|
Display the current UTC date/time obtained via NTP from uk.pool.ntp.org in NIST time format:YY-MM-DD HH:MM:SSImplemented to maintain compatibility with ST.COM
|
ATS<n>? / ATS<n>=<v>
|
Read or write an S-register. See the ATS registers table below. |
ATT |
Transmit a data packet to the current connection (optional CRC). |
ATV<n> |
Result-code style:0 - numeric1 - verbose |
ATW |
WiFi: scan/list access points, or connect with:ATW"SSID,PASSWORD"
|
ATX<n> |
Result-code set:0 - short1 - long/extended |
ATY |
Hayes compatibility; no operation. |
ATZ |
Reset the modem and reload the last saved configuration. |
| Command | Description |
|---|---|
AT&D<c> |
Append a character to the delimiter set. |
AT&F |
Factory reset. |
AT&F86 |
Factory reset, and reformat the SPIFFS filesystem. |
AT&G |
Fetch/stream a web URL to the terminal. |
AT&K<n> |
Flow-control shortcut:0 / 1 / 2 - off3 / 6 - RTS/CTS4 / 5 - XON/XOFF. |
AT&L |
Reload configuration from flash. |
AT&M<c> |
Append a character to the "mask-out" set (bytes stripped from the stream). |
AT&N<n> / AT&N<n>=<v>
|
Read or force a GPIO pin. |
AT&O<n> |
Start logging if no argument is provided. Debug log control: 0 - dump log86 / 87 - delete log88 - log and echo to UART |
AT&S<n>=<value> |
Set a string setting:40 - mDNS hostname41 - terminal type42 - busy message |
AT&T |
Show the current time. Configure the timezone: AT&T<args>
|
AT&W |
Save the current configuration to flash. |
AT&Y... |
Define the escape/state-machine sequence. |
| Command | Description |
|---|---|
AT+CONFIG |
Enter the interactive configuration menu. |
AT+IRC |
Enter IRC chat mode. |
AT+PING"host" |
Ping a host to test connectivity/DNS. |
AT+PPP |
Enter PPP networking mode. |
AT+PRINT<mode>:<host>:<port>/<path> |
Print to a CUPS/IPP printer. Mode is Ascii, or Raw. |
AT+SLIP |
Enter SLIP networking mode. |
| Command | Description |
|---|---|
AT$MDNS=<value> |
Set the mDNS hostname. |
AT$PASS=<value> |
Set the wifi password. |
AT$SB=<value> |
Set the serial baud rate. |
AT$SSID=<value> |
Set the wifi SSID. |
Read a register with ATS<n>? and set one with ATS<n>=<v>.
| Register | Meaning | Values |
|---|---|---|
0 |
Auto-answer: number of rings before answering an incoming connection (0 disables auto-answer). |
0 to 255
|
2 |
Escape character used in the +++ escape sequence. |
0 to 255
|
3 |
Carriage-return character code. |
0 to 127
|
4 |
Line-feed character code. |
0 to 127
|
5 |
Backspace character code. |
0 to 32
|
40 |
Streaming packet size, in bytes. | ≥ 1 |
41 |
Auto-stream mode; enter stream mode automatically on answer/connect: |
0 - off>0 - on |
42 |
CRC-8 value used by the transmit command (ATT). |
0 to 255
|
43 |
Temporary baud rate applied to the next dialled connection. |
baud rate≤0 - clear |
44 |
Inter-character serial output delay, in milliseconds. | ≥ 0 |
45 |
Binary translation type for streaming. |
0 to (BTYPE_INVALID−1)
|
46 |
DCD line polarity mode. |
0 - normal1 - inverted2 - always active3 - always inactive |
47 |
GPIO pin assigned to DCD (output). | supported pin 0 to MAX_PIN_NO
|
48 |
CTS line polarity mode. |
0 - normal1 - inverted2 - always active3 always inactive |
49 |
GPIO pin assigned to CTS (input). | supported pin 0 to MAX_PIN_NO
|
50 |
RTS line polarity mode. |
0 - normal1 - inverted2 - always active3 - always inactive |
51 |
GPIO pin assigned to RTS (output). | supported pin 0 to MAX_PIN_NO
|
52 |
RI (ring indicator) line polarity mode. |
0 - normal1 - inverted2 - always active3 - always inactive |
53 |
GPIO pin assigned to RI (output). | supported pin 0 to MAX_PIN_NO
|
54 |
DTR line polarity mode. |
0 - normal1 - inverted2 - always active3 - always inactive |
55 |
GPIO pin assigned to DTR (input). | supported pin 0 to MAX_PIN_NO
|
56 |
DSR line polarity mode. |
0 - normal1 - inverted2 - always active3 - always inactive |
57 |
GPIO pin assigned to DSR (output). | supported pin 0 to MAX_PIN_NO
|
60 |
Preserve TCP listeners across resets (persisted to flash). |
0 - offnon- 0 - on |
61 |
Printer job completion timeout, in seconds. | > 0 |
62 |
Telnet protocol handling on connections. |
0 - off>0 - on |
63 |
Hang-up trigger type. |
0 - none1- PPP-hard2 - DTR3 - PDP |
64 |
Discard incoming NUL bytes. |
0 - off>0 - on |
These commands provide compatibility with software written for the stock Espressif ESP-AT firmware, so that utilities expecting this command set will continue to work. They are available from PerryZi 1.2.4.
The MOD-WIFI-ESP8266 build for the Agon Light / Neo6502 uses the Espressif v1.7.6.0 (NonOS) command set, whereas all other builds use the v2.3.0.0 (ESP-AT) command set. This is due to existing Agon Light and Neo6502 software being written for the older Espressif firmware.
v1.7.6.0 |
v2.3.0.0 |
|
|---|---|---|
AT+CIPRECVDATA reply |
,<len>:<data> |
:<len>,<data> |
_CUR / _DEF suffixes |
accepted | not accepted |
AT+CIPDOMAIN reply |
:<ip> |
:"<ip>" |
Failed AT+CWJAP returns |
FAIL |
ERROR |
A single connection only, so AT+CIPMUX accepts 0 alone. Plain TCP and UDP only: there is no TLS in PerryZi, so the SSL transmission type and the AT+CIPSSLC* family are unsupported. IPv6 is unavailable because the ESP8266 Arduino core is built with LWIP_IPV6=0, so the v6 transmission types are rejected.
AT and ATE<n> are used by this command set too, and behave as described in Core AT commands above.
| Command | Description |
|---|---|
AT+RST |
Reset the AT layer: closes any open connection and returns AT+CIPRECVMODE, AT+CIPDINFO and AT+CIPMODE to their defaults. Replies OK followed by ready.Note this does not reboot the module, which would drop the host's serial settings. |
AT+RESTORE |
Behaves as AT+RST above. Unlike stock firmware it does not erase the saved configuration; use AT&F for that. |
AT+GMR |
Version information, as four lines:AT version:SDK version:compile time:Bin version:
|
AT+CMD? |
List the Espressif commands this firmware supports, as +CMD: lines. |
AT+SYSRAM? |
Free heap, in bytes:+SYSRAM:<free>
|
AT+SYSSTORE=<n> / AT+SYSSTORE?
|
Accept or report the persist-settings flag:+SYSSTORE:<n>PerryZi writes configuration to flash with AT&W, so this flag is recorded but does not itself save anything. |
AT+GSLP=<ms> |
Enter deep sleep for the given number of milliseconds. |
| Command | Description |
|---|---|
AT+CWMODE=1 / AT+CWMODE?
|
Station mode. Values other than 1 return ERROR; SoftAP is not supported.+CWMODE:1
|
AT+CWJAP="SSID","PASSWORD" |
Join an access point. On success replies WIFI CONNECTED and WIFI GOT IP, then OK; on failure +CWJAP:4 then FAIL.As with ATW, this updates the live settings only - use AT&W to persist them. |
AT+CWJAP? |
Report the current access point:+CWJAP:"<ssid>","<bssid>",<channel>,<rssi>or No AP when not connected. |
AT+CWQAP |
Disconnect from the current access point. |
AT+CWLAP |
Scan for access points, one line each:+CWLAP:(<ecn>,"<ssid>",<rssi>,"<mac>",<channel>)
|
AT+CWAUTOCONN=<n> |
Automatic reconnection:0 - off1 - on |
AT+CWSTATE? |
Connection state:+CWSTATE:<state>,"<ssid>"
|
AT+CWHOSTNAME=<name> / AT+CWHOSTNAME?
|
Read or set the mDNS hostname:+CWHOSTNAME:<name>
|
AT+CWRECONNCFG=<interval>[,<repeat>] / AT+CWRECONNCFG?
|
Reconnection interval, in seconds:+CWRECONNCFG:<interval>,0
|
AT+CWCOUNTRY? |
Report the WiFi country settings:+CWCOUNTRY:<policy>,"<country code>",<start channel>,<channel count>
|
AT+CWCOUNTRY=<policy>,"<cc>",<start>,<count> |
Set the WiFi country settings.<policy>:0 - auto1 - manual |
AT+RFPOWER=<n> / AT+RFPOWER?
|
Transmit power, in units of 0.25 dBm:+RFPOWER:<n>
|
AT+SLEEP=<n> / AT+SLEEP?
|
WiFi sleep mode:0 - none1 - light2 - modem |
| Command | Description |
|---|---|
AT+CIFSR |
Station address, as two lines:+CIFSR:STAIP,"<ip>"+CIFSR:STAMAC,"<mac>"
|
AT+CIPSTA? |
IPv4 configuration, as three lines:+CIPSTA:ip:"<ip>"+CIPSTA:gateway:"<gateway>"+CIPSTA:netmask:"<netmask>"
|
AT+CIPSTA="<ip>"[,"<gateway>"[,"<netmask>"]] |
Set a static address for this session. |
AT+CIPSTAMAC? |
Station MAC address:+CIPSTAMAC:"<mac>"
|
AT+CIPDNS? |
Report the DNS servers in use:+CIPDNS:<manual>,"<dns1>"[,"<dns2>"]
|
AT+CIPDNS=1,"<dns1>"[,"<dns2>"] |
Set the DNS server(s) manually.AT+CIPDNS=0, which returns DNS to DHCP control, returns ERROR: lwIP will only do that on a fresh lease. |
AT+CIPDOMAIN="<host>" |
Resolve a hostname:+CIPDOMAIN:"<ip>"
|
| Command | Description |
|---|---|
AT+CIPMUX=0 / AT+CIPMUX?
|
Single-connection mode. 1 returns ERROR.+CIPMUX:0
|
AT+CIPMODE=0 / AT+CIPMODE?
|
Normal transmission mode. 1 (passthrough) returns ERROR.+CIPMODE:0
|
AT+CIPDINFO=<n> |
Include the remote address and port in +IPD and +CIPRECVDATA replies:0 - off1 - on |
AT+CIPSTART="TCP","<host>",<port>[,<keepalive>]AT+CIPSTART="UDP","<host>",<remote port>[,<local port>]AT+CIPSTARTEX=...
|
Open a connection. Replies CONNECT then OK.Returns ERROR if a connection is already open (preceded by ALREADY CONNECTED), or if the SSL or v6 transmission types are requested. |
AT+CIPSEND=<length> |
Send data. Replies OK then the > prompt, after which exactly <length> raw bytes are read from the serial port. These bytes are taken verbatim: NUL, CR and LF are all passed through unaltered.On completion replies Recv <n> bytes then SEND OK, or SEND FAIL.Maximum 2048 bytes. |
AT+CIPCLOSE |
Close the connection. Replies CLOSED then OK. |
AT+CIPSTATUS |
Connection status:STATUS:<state>+CIPSTATUS:0,"<type>","<remote ip>",<remote port>,<local port>,0
|
AT+CIPSTATE? |
As AT+CIPSTATUS but without the STATUS: line. |
AT+CIPSTO=<seconds> / AT+CIPSTO?
|
Server timeout:+CIPSTO:<seconds>
|
AT+CIPSERVERMAXCONN=<n> / AT+CIPSERVERMAXCONN?
|
Maximum server connections:+CIPSERVERMAXCONN:<n>
|
AT+CIPSERVER |
Always returns ERROR: a server requires AT+CIPMUX=1, which is not supported. Use ATN<n> instead. |
AT+CIPTCPOPT? |
Report TCP socket options. |
Two receive models are supported, selected with AT+CIPRECVMODE.
In active mode (the default, AT+CIPRECVMODE=0) incoming data is pushed to the serial port as it arrives, prefixed with +IPD,<length>: and followed by the data itself. With AT+CIPDINFO=1 the prefix becomes +IPD,<length>,"<remote ip>",<remote port>:.
In passive mode (AT+CIPRECVMODE=1) the arrival of data is announced once with +IPD,<length> and no data follows. The data is then read explicitly with AT+CIPRECVDATA. A further announcement is not made until the buffer has been drained.
| Command | Description |
|---|---|
AT+CIPRECVMODE=<n> / AT+CIPRECVMODE?
|
Receive model:0 - active1 - passive+CIPRECVMODE:<n>
|
AT+CIPRECVDATA=<length> |
Read up to <length> buffered bytes:+CIPRECVDATA:<actual length>,<data>Buffered data stays readable after the remote end disconnects. Once the buffer is empty and the connection has gone, ERROR is returned. |
AT+CIPRECVLEN? |
Bytes currently buffered:+CIPRECVLEN:<length>,0,0,0,0
|
| Command | Description |
|---|---|
AT+CIPSNTPCFG=<enable>,<timezone>[,"<server>"] / AT+CIPSNTPCFG?
|
Read or set the SNTP configuration. <enable> 0 disables time updates, 1 enables them and forces an immediate update. The server defaults to uk.pool.ntp.org.+CIPSNTPCFG:<enable>,<timezone>,"<server>"
|
AT+CIPSNTPTIME? |
Current time in asctime format:+CIPSNTPTIME:<Day> <Mon> <date> <hh:mm:ss> <year>Returns ERROR if the time has not yet been set. |
AT+SYSTIMESTAMP? |
Current time as a Unix epoch value:+SYSTIMESTAMP:<epoch>Returns ERROR if the time has not yet been set. |
| Command | Description |
|---|---|
AT+PING="<host>" |
Ping a host:+PING:<milliseconds>or +PING:TIMEOUT followed by ERROR.PerryZi's own AT+PING"<host>" form, described in AT+ commands above, is unaffected and continues to work: the two are told apart by the =. |