ESP8266 AT Commands

From Uzebox Wiki
Jump to: navigation, search

This table contains all the AT commands for the official ESP8266 firmware used by Uzenet(x.xx.xxx). Responses are described for operations success/operation failure/bad AT format, in that order.

Most up to date command listing can be found here.

Commands Description Type Set/Execute Inquiry Test Parameters Examples Response
AT+RST restart the module basic - - - - - -
AT+GMR get firmware version basic AT+GMR - - - - 0018000902-AI03
AT+CIOBAUD set module baud rate basic AT+CIOBAUD=<baud rate> AT+CIOBAUD? - Baud rate. Factory value is 9600. Set to 57600 for Uzebox. AT+CIOBAUD=57600 BAUD->57600 OK, then garbage since the module has switched to the new baud rate.
AT+CWQAP quit the AP wifi AT+CWQAP - AT+CWQAP=? - - -
AT+CWLAP list available APs wifi AT+CWLAP - - - - -
AT+CWSAP set wifi login credentials wifi AT+ CWSAP= <ssid>,<pwd>,<chl>, <ecn> AT+ CWSAP? - ssid, pwd, chl = channel, ecn = encryption Connect to your router: AT+CWJAP="YOURSSID","YOURPASSWORD"; and check if connected: AT+CWJAP? -
AT+CWJAP join the AP wifi AT+ CWJAP =<ssid>,< pwd > AT+ CWJAP? - AT+CWJAP="WifiName","WifiPass" MAX 64 bytes long - -
AT+CWMODE wifi mode wifi AT+CWMODE=<mode> AT+CWMODE? AT+CWMODE=? 1= Sta, 2= AP, 3=both - -
AT+CIPSTART start a TCP or UDP connection TCP/IP 1)single connection (+CIPMUX=0) AT+CIPSTART= <type>,<addr>,<port>; 2) multiple connection (+CIPMUX=1) AT+CIPSTART= <id><type>,<addr>, <port> - AT+CIPSTART=? id = 0-4, type = TCP/UDP, addr = IP address, port= port Connect to another TCP server, set multiple connection first: AT+CIPMUX=1; connect: AT+CIPSTART=4,"TCP","X1.X2.X3.X4",9999 -
AT+CIPSEND send data over connection(id) TCP/IP 1)single connection(+CIPMUX=0) AT+CIPSEND=<length>; 2) multiple connection (+CIPMUX=1) AT+CIPSEND= <id>,<length> - AT+CIPSEND=? - send data: AT+CIPSEND=4,15 and then enter the data MAX 2048 bytes -
AT+CIPCLOSE close connection(id) TCP/IP AT+CIPCLOSE=<id> or AT+CIPCLOSE - AT+CIPCLOSE=? - - -
AT+CIFSR list the local IP address TCP/IP AT+CIFSR - AT+ CIFSR=? - - -
AT+CIPSTATUS get the connection status TCP/IP AT+ CIPSTATUS - - - - -
AT+CIPSERVER set as server/listen() TCP/IP AT+ CIPSERVER= <mode>[,<port> ] - - mode 0 to close server mode, mode 1 to open; port = port turn on as a TCP server: AT+CIPSERVER=1,8888, check the self server IP address: AT+CIFSR=? -
AT+CIPMUX set multiple connections mode TCP/IP AT+ CIPMUX=<mode> AT+ CIPMUX? - 0 for single connection 1 for mutiple connection - -
AT+CWLIF get IP's of devices connected to AP TCP/IP AT+CWLIF - - returns ip addresses of all devices connected to softAP(module as AP or STA+AP) - -
AT+CIPSTO set server timeout(listen wait time) TCP/IP AT+CIPSTO=<timeout> AT+CIPSTRO? - - - automatic query response:"+CIPSTO:<timeout>
AT+CIPUPDATE update firmware over network TCP/IP AT+CIPUPDATE - - - - automatic response:"+CIPUPDATE:<version found>1\n2\n3\n4\n
AT+GSLP put module into deep sleep basic AT+GSLP=<millisecs> - - - - module will sleep and wake up after <millisecs> milliseconds, not all versions pins are setup for this.
AT+CIPSTAMAC set MAC address of STAtion wifi AT+CIPSTAMAC=<mac> - - - - automatic query response:+CIPSTAMAC:<mac>, ex:AT+CIPSTAMAC="18:aa:35:97:d4:7b"
AT+CIPAPMAC set MAC address of softAP wifi AT+CIPAPMAC=<mac> - - - - automatic query response:+CIPAPMAC:<mac>, ex:AT+CIPSTAMAC="18:aa:35:97:d4:7b"
AT+CIPSTA set IP address of STAtion wifi AT+CIPSTA=<ip> - - - - automatic query response:+CIPSTA:<ip>, ex:AT+CIPSTA="192.168.101.108"
AT+CIPAP set IP address of softAP wifi AT+CIPAP=<ip> - - - - automatic query response:+CIPAP:<ip>, ex:AT+CIPAP="192.168.101.108"
+IPD received packet header, received data follows basic receive only - - - - "+IPD,x,y:recv_bytes\r\n" where x is the connection it's from and y is the number of bytes