Monday 26 October 2015

ESP8266 AT Commands

Here are AT commands that you can pass to ESP8266 via Serial to make it do things.

credit: http://nurdspace.nl 


CommandsDescriptionTypeSet/ExecuteInquirytestParametersExamples
AT+RSTrestart the modulebasic----
AT+CWMODEwifi modewifiAT+CWMODE=<mode>AT+CWMODE?AT+CWMODE=?1= Sta, 2= AP, 3=both
AT+CWJAPjoin the APwifiAT+ CWJAP =<ssid>,< pwd >AT+ CWJAP?-ssid = ssid, pwd = wifi password
AT+CWLAPlist the APwifiAT+CWLAP
AT+CWQAPquit the APwifiAT+CWQAP-AT+CWQAP=?
AT+ CWSAPset the parameters of APwifiAT+ CWSAP= <ssid>,<pwd>,<chl>, <ecn>AT+ CWSAP?ssid, pwd, chl = channel, ecn = encryptionConnect to your router: :AT+CWJAP="YOURSSID","helloworld"; and check if connected: AT+CWJAP?
AT+ CIPSTATUSget the connection statusTCP/IPAT+ CIPSTATUS
AT+CIPSTARTset up TCP or UDP connectionTCP/IP1)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= portConnect to another TCP server, set multiple connection first: AT+CIPMUX=1; connect: AT+CIPSTART=4,"TCP","X1.X2.X3.X4",9999
AT+CIPSENDsend dataTCP/IP1)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
AT+CIPCLOSEclose TCP or UDP connectionTCP/IPAT+CIPCLOSE=<id> or AT+CIPCLOSEAT+CIPCLOSE=?
AT+CIFSRGet IP addressTCP/IPAT+CIFSRAT+ CIFSR=?
AT+ CIPMUXset mutiple connectionTCP/IPAT+ CIPMUX=<mode>AT+ CIPMUX?0 for single connection 1 for mutiple connection
AT+ CIPSERVERset as serverTCP/IPAT+ CIPSERVER= <mode>[,<port> ]mode 0 to close server mode, mode 1 to open; port = portturn on as a TCP server: AT+CIPSERVER=1,8888, check the self server IP address: AT+CIFSR=?
+IPDreceived data

No comments:

Post a Comment