In the previous post we’ve seen how to initiate ESP module & use AT commands.In this post TCP CLIENT mode operation is explained.

ESP8266 WIFI module has 3 modes of operation.

ST  – Station mode in which ESP acts as a device & connects to an existing Access point.

AP – Access Point mode where the ESP itself acts as AP & other devices like Mobile can connect to it.

Both – ST & AP both mode is allowed in ESP.The mode of operation is set by the AT command

AT+CWMODE = 1 for ST mode , 2 for AP mode & 3 for both.

As we’re testing ESP on STation mode , issue the command


Image 7

To communicate with a webpage , we need to start a server with ESP module.You need to set multiple connections using command


This initiates the server for a Webserver.

Next we start the server at HTTP port 80 using command ,


Image 8

To close the server the command is AT+CIPSERVER=0 followed by a Reset AT+RST

To get the STATION IP address ,


The module returns the Station IP address , .

If the CWMODE is set to 3 , you’ll get 2 IP address , one for AP & another for Station mode.We need the station IP address for Client mode operation.

Open your web browser & type in the address

The browser sends a HTTP GET request which is displayed on the putty window where ESP module is connected.The host IP address & the user agent (your web browser name) are displayed.

After you get OK  type in the command


This command is to send 30 characters through channel 0 .Use the channel number which is displayed as CONNECT while a request is received from the browser.


Now you get a  >  symbol , after which you’ve to type in 30 characters.

The module will wait till you type in 30 characters & finally displays SEND OK.

You’ve to type characters within the Timeout limit.Otherwise the link will be closed.


Now the characters are sent to the Web browser.

But the browser is still waiting for the channel to be closed.


Here use the channel number ( 0) where the connection was established .


Once the channel is closed , you get the characters displayed on the browser.

HTML tags can be used to send characters




The above one displays characters using HTML tag type Heading 1.

Image 121

To close the server the command is AT+CIPSERVER=0 followed by a Reset AT+RST

For testing 2 way communication , open another instance of PUTTY .

Select connection type as TELNET & Port 80.

Type in the host address , which you get by AT+CIFSR command in ESP window.

Click on open.

Image 122

Type some characters inside TELNET window .You get these inside ESP window


0 is the channel of communication & 17 is the number of characters received.


From within ESP window type AT+CIPSEND=0,20

ESP will wait till you type 20 characters.

On TELNET window the characters are received.


Watch this support video :

ESP WIFI Modules available at :

cooltext753793315  cooltext753790696