ESP8266 WiFi – AT commandolijst
Gebruik je de standaard “AT” firmware op de ESP8266 chip, dan kun je eenvoudig met seriele commando’s de chip aansturen, instellen en data verzenden/ontvangen!
Ps. AT is een afkorting van “ATtention” en wordt veelal bij communicatie van modems gebruikt, hieronder vind je een lijst van AT commando’s voor de ESP8266 chip.
Een AT commando geeft een begin van een regel aan, en is niet een daadwerkelijk onderdeel van een commando zelf.
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= | AT+CIOBAUD? | - | Baud rate. Factory value is 9600. | AT+CIOBAUD=57600 | BAUD->57600 OK, then garbage since the module has switched to the new baud rate. |
Set to 57600 for Uzebox. | ||||||||
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= | 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 = | AT+ CWJAP? | - | AT+CWJAP="WifiName" | - | - |
,"WifiPass" MAX 64 bytes long | ||||||||
AT+CWMODE | wifi mode | wifi | AT+CWMODE= | 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= | - | 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= | - | 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= | - | 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 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= | 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= | AT+CIPSTRO? | - | - | - | automatic query response:"+CIPSTO: |
AT+CIPUPDATE | update firmware over network | TCP/IP | AT+CIPUPDATE | - | - | - | - | automatic response:"+CIPUPDATE: |
AT+GSLP | put module into deep sleep | basic | AT+GSLP= | - | - | - | - | module will sleep and wake up after |
AT+CIPSTAMAC | set MAC address of STAtion | wifi | AT+CIPSTAMAC= | - | - | - | - | automatic query response:+CIPSTAMAC: |
AT+CIPAPMAC | set MAC address of softAP | wifi | AT+CIPAPMAC= | - | - | - | - | automatic query response:+CIPAPMAC: |
AT+CIPSTA | set IP address of STAtion | wifi | AT+CIPSTA= | - | - | - | - | automatic query response:+CIPSTA: |
AT+CIPAP | set IP address of softAP | wifi | AT+CIPAP= | - | - | - | - | automatic query response:+CIPAP: |
+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 |
Meer informatie is in de documentatie (pdf) te vinden.
Bronnen:
developershome.com
uzebox.org
[#/esp/datasheets/esp8266″ ]