User Manual

! ! " !
Espressif Systems
ESP8266
AT Command Examples
2. Single Connection as TCP Client
Set WiFi mode:
AT+CWMODE=3 // softAP+station mode
Response :OK
Connect to router:
AT+CWJAP="SSID", "password" // SSID and password of router
Response :OK
Query device’s IP:
AT+CIFSR
Response :192.168.3.106 // Device got an IP from router.
Connect PC to the same router that ESP8266 is connected to.
Using a network tool on the computer to create a server.
ESP8266 connect to server as a client:
AT+CIPSTART="TCP", "192.168.3.116", 8080 //protocolserver IP & port
Response :OK
Send data:
AT+CIPSEND=4 // set date length which will be sent, such as 4 bytes
>DGFY // enter the data, no CR
Response :SEND OK
Espressif Systems Confidential / Friday, Oct 23, 20155 16