In the previous tutorial, we have seen how to make a circuit for the ESP-01 module and we also test the module using AT command. In this tutorial, I will explain how to setup ESP-01 module as an access point and also running a TCP server on it. This is the block diagram that explain the system in this tutorial.
We setup the ESP module by using serial to USB converter and serial terminal software (Hercules). The ESP module is set as an access point and also runs a TCP server on port 23, so any WiFi device such as smartphones or PCs can connects to this access point. We can use TCP client terminal application on the smartphones or PCs for making a connection to the TCP server on ESP module. After the connection is created, we can exchange data with the server.
- Mode 1: Station mode. With this mode ESP module act as a WiFi device and can connect to an existing access point.
- Mode 2: Soft AP mode. With this mode ESP module act as a WiFi access point and any WiFi device can connect to it.
- Mode 3: Both station and soft AP mode.
To set the ESP mode, we can use "AT+CWMODE" command. This is the detail explanation of this command from Espressif AT command documentation.
For this tutorial, we want to setup ESP as an access point, so we need to send this command: AT+CWMODE=2. Don't forget to add CRLF ending on every AT command. For the next step, we need to configure the AP by using "AT+CWSAP" command.
For example, we send this command: AT+CWSAP="ESP8266","12345678","4","2". After you configure the AP, you can search and try to connect to this AP from a smartphone. The smartphone will detect this access point:
By default, when we setup ESP module as an AP, the DHCP is on, so the smartphone will get an IP address automatically. We can check the device that connected to this AP by using this command: AT+CWLIF. The response is the list of connected client (IP and MAC address).
We can also ping from the ESP module to smartphone by send this command: AT+PING=192.168.4.2.
From the smartphone, we can also ping to the ESP module (using Android terminal or other ping tools).
Up to this point, ESP module and smartphone is connected in one network, but we still have to setup the TCP connection, so we must create a TCP server on ESP module. To create the TCP server we must send this command: AT+CIPMUX=1 and AT+CIPSERVER=1,80. This is the detail explanation of this command.
After the TCP server is created, on the smartphone we can use a TCP client application to make a connection. If the TCP client is successfully connected, ESP module will return this response: "0,CONNECT" to the serial terminal. If a TCP client is disconnected, ESP module will send this response: "0,CLOSED". "0" is the ID of TCP client.
To send a data from the ESP module to the smartphone, we can use "AT+CIPSEND" command. For example, we send this command: AT+CIPSEND=0,41. "0" means that we want to send data to TCP client channel 0 and "41" means that we want to send 41 characters. After execute that command, you can type the data to be sent on the serial terminal. This is the detail explanation of this command.
Type the message, for example This message is from ESP8266 TCP server. On the smartphone TCP terminal application, this message will be received.
On the TCP client application we can also send a data to ESP module. The data received on ESP module will be in this format:
"0" is the TCP client ID and "41" is the number of received characters.
This tutorial is explain how to manually setup ESP module using serial to USB converter and serial terminal software. Actually, when you use a microcontroller, you don't need a serial to USB converter or serial terminal. But, it will be useful for debugging purpose when you encounter a error when using a microcontroller. This tutorial will also make you familiar with AT command for setup ESP module as a soft AP and TCP server.
For this tutorial, we want to setup ESP as an access point, so we need to send this command: AT+CWMODE=2. Don't forget to add CRLF ending on every AT command. For the next step, we need to configure the AP by using "AT+CWSAP" command.
For example, we send this command: AT+CWSAP="ESP8266","12345678","4","2". After you configure the AP, you can search and try to connect to this AP from a smartphone. The smartphone will detect this access point:
By default, when we setup ESP module as an AP, the DHCP is on, so the smartphone will get an IP address automatically. We can check the device that connected to this AP by using this command: AT+CWLIF. The response is the list of connected client (IP and MAC address).
We can also ping from the ESP module to smartphone by send this command: AT+PING=192.168.4.2.
From the smartphone, we can also ping to the ESP module (using Android terminal or other ping tools).
Up to this point, ESP module and smartphone is connected in one network, but we still have to setup the TCP connection, so we must create a TCP server on ESP module. To create the TCP server we must send this command: AT+CIPMUX=1 and AT+CIPSERVER=1,80. This is the detail explanation of this command.
After the TCP server is created, on the smartphone we can use a TCP client application to make a connection. If the TCP client is successfully connected, ESP module will return this response: "0,CONNECT" to the serial terminal. If a TCP client is disconnected, ESP module will send this response: "0,CLOSED". "0" is the ID of TCP client.
To send a data from the ESP module to the smartphone, we can use "AT+CIPSEND" command. For example, we send this command: AT+CIPSEND=0,41. "0" means that we want to send data to TCP client channel 0 and "41" means that we want to send 41 characters. After execute that command, you can type the data to be sent on the serial terminal. This is the detail explanation of this command.
Type the message, for example This message is from ESP8266 TCP server. On the smartphone TCP terminal application, this message will be received.
On the TCP client application we can also send a data to ESP module. The data received on ESP module will be in this format:
"0" is the TCP client ID and "41" is the number of received characters.
This tutorial is explain how to manually setup ESP module using serial to USB converter and serial terminal software. Actually, when you use a microcontroller, you don't need a serial to USB converter or serial terminal. But, it will be useful for debugging purpose when you encounter a error when using a microcontroller. This tutorial will also make you familiar with AT command for setup ESP module as a soft AP and TCP server.
Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.
ReplyDeleteClick here:
angularjs training in annanagar
Click here:
angularjs training in bangalore
Click here:
angularjs training in chennai
I‘d mention that most of us visitors are endowed to exist in a fabulous place with verClick here:
ReplyDeleteMicrosoft azure training in marathahalli
Click here:
Microsoft azure training in bangalore
Click here:
Microsoft azure training in pune
y many wonderful individuals with very helpful things.
This is good site and nice point of view.I learnt lots of useful information.
ReplyDeleteClick here:
angularjs training in bangalore
Click here:
angularjs training in chennai
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
ReplyDeleteClick here:
angularjs training in marathahalli
Click here:
angularjs training in bangalore
Thanks for the good words! Really appreciated. Great post. I’ve been commenting a lot on a few blogs recently, but I hadn’t thought about my approach until you brought it up.
ReplyDeleteBlueprism training in Chennai
Blueprism training in Bangalore
Blueprism training in Pune
This comment has been removed by the author.
ReplyDeleteYou’ve written a really great article here. Your writing style makes this material easy to understand.. I agree with some of the many points you have made. Thank you for this is real thought-provoking content
ReplyDeletejava training in annanagar | java training in chennai
java training in chennai | java training in electronic city
A universal message I suppose, not giving up is the formula for success I think. Some things take longer than others to accomplish, so people must understand that they should have their eyes on the goal, and that should keep them motivated to see it out til the end.
ReplyDeleteData Science course in rajaji nagar | Data Science with Python course in chenni
Data Science course in electronic city | Data Science course in USA
Data science course in pune | Data science course in kalyan nagar
Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
ReplyDeleteAWS Training in Toronto | Amazon Web Services Training in Toronto , Canada
AWS Training in New york city | Amazon Web Services in New York City
AWS Training in London | Amazon Web Services Training in London , UK
I really like the dear information you offer in your articles. I’m able to bookmark your site and show the kids check out up here generally. Im fairly positive theyre likely to be informed a great deal of new stuff here than anyone
ReplyDeleteangularjs Training in marathahalli
angularjs interview questions and answers
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in chennai
Your story is truly inspirational and I have learned a lot from your blog. Much appreciated.
ReplyDeleteangularjs Training in chennai
angularjs-Training in pune
angularjs-Training in chennai
angularjs Training in chennai
angularjs-Training in tambaram
angularjs-Training in sholinganallur
Thanks For Sharing The Information The Information shared Is Very Valuable Please Keep Updating Us Time Just Went On reading The Article Aws Online Course Python Online Course Data Online Course Hadoop Online Course
ReplyDeleteThank you for sharing such great information with us. I really appreciate everything that you’ve done here and am glad to know that you really care about the world that we live in
ReplyDeleteangularjs online training
apache spark online training
informatica mdm online training
devops online training
aws online training
I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
ReplyDeleteDevops Training in Chennai | Devops Training Institute in Chennai
Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
ReplyDeleteangularjs online training
apache spark online training
informatica mdm online training
devops online training
aws online training
Well somehow I got to read lots of articles on your blog. It’s amazing how interesting it is for me to visit you very often.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Python online training
uipath online training
Hey, would you mind if I share your blog with my twitter group? There’s a lot of folks that I think would enjoy your content. Please let me know. Thank you.
ReplyDeleteJava Training in Chennai | J2EE Training in Chennai | Advanced Java Training in Chennai | Core Java Training in Chennai | Java Training institute in Chennai
The article is so informative. This is more helpful for our
ReplyDeleteBest online software testing training course institute in chennai with placement
Best selenium testing online course training in chennai
Learn best software testing online certification course class in chennai with placement
Thanks for sharing.
ReplyDeleteYour info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
If you are looking for any Big data Hadoop Related information please visit our website Big Data Hadoop Training In Bangalore page!
I learned World's Trending Technology from certified experts for free of cost. I got a job in decent Top MNC Company with handsome 14 LPA salary, I have learned the World's Trending Technology from python training institute in btm layout experts who know advanced concepts which can help to solve any type of Real-time issues in the field of Python. Really worth trying
ReplyDeleteI simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
ReplyDeleteBest PHP Training Institute in Chennai|PHP Course in chennai
Best .Net Training Institute in Chennai
Oracle DBA Training in Chennai
RPA Training in Chennai
UIpath Training in Chennai
I simply used a post Cognos tm1 training
ReplyDeleteThank you for sharing such great information with us. I really appreciate everything that you’ve done here and am glad to know that you really care about the world that we live in...
ReplyDeleteangularjs training in bangalore - AngularJS Training in Bangalore - Learn AngularJS 6 from Expert Real-time Trainers
at i Digital Academy with Live Projects and Placement Assistance. Book a Free Demo Today.
https://www.idigitalacademy.com/angularjs-training-in-bangalore/
Thanks for posting this blog, I am very impressed with your blog and it is very useful for me and other. Please visit at Engineering Companies Select the field to see the related companies. Topengineeringcommunity.com offers structural materials, lighting systems, and building security system. Click here - https://www.topengineeringcommunity.com/
ReplyDeletePost is very useful. Thank you, this useful information.
ReplyDeleteeTechno Soft Solutions offers the industry recognized Job Oriented Training in Bangalore that combines corporate training, online training, and classroom training effectively to fulfill the educational demands of the students worldwide.
very nice post...
ReplyDeleteinplant training in chennai
inplant training in chennai
inplant training in chennai for it.php
Australia hosting
mexico web hosting
moldova web hosting
albania web hosting
andorra hosting
australia web hosting
denmark web hosting
nice.....it is use full...
ReplyDeleteaeronautical internship in india
free internship in chennai for mechanical engineering student
architectural firms in chennai for internship
internship in coimbatore for eee
online internships for cse students
mechanical internship certificate
inplant training report
internships in hyderabad for cse
internship for mba students in chennai
internship in trichy for csenice.....it is use full...
aeronautical internship in india
free internship in chennai for mechanical engineering student
architectural firms in chennai for internship
internship in coimbatore for eee
online internships for cse students
mechanical internship certificate
inplant training report
internships in hyderabad for cse
internship for mba students in chennai
internship in trichy for cse
ReplyDeleteThanks for sharing such useful information.The content is high quality and results-oriented.Keep sharing more
Best python certification course in Bangalore
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
ReplyDeleteangularjs online training
best angularjs online training
top angularjs online training
would like to appreciate for the content , its really very useful for the Computer Engineering students , if looking for more information related to Computer Engineering students,visit: Computer Engineering Courses
ReplyDeleteYour site blog is good for users and I have seen all your blogs and the whole site and I shared it with all your site. In my point of view your site is very informative for people. I have taken lots of knowledge from site. One more thing that I searched on google is the Best Graphic Designing Institute in Delhi and mostly find courses in delhi. Second, I think that animation course fees don’t know nowadays who wants to join the course. You people can check the link and take more
ReplyDeleteinformation related to your future. Thank you
Great post!! Thanks for sharing...
ReplyDeleteangular js training in bangalore
Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon!keep search.
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
Can you send the code source please
ReplyDeleteMy friend suggested I may like this blog. He was Absolutely right.
ReplyDeleteIPU CET 2020 Exam Dates
Thanks for the Article. Really a great one. Very informative and useful!! Appreciate your time and effort for posting this.
ReplyDeleteAngular js Training in Chennai
Angular js Training in Velachery
Angular js Training in Tambaram
Angular js Training in Porur
Angular js Training in Omr
Angular js Training in Annanagar
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
ReplyDeleteJava Training in Chennai
Java Training in Velachery
Java Training inTambaram
Java Training in Porur
Java Training in Omr
Java Training in Annanagar
This is an amazing blog. Very helpful and creative. Really liked the way it is well written and structured.
ReplyDeleteSelenium Training in Chennai
Selenium Training in Velachery
Selenium Training in Tambaram
Selenium Training in Porur
Selenium Training in Omr
Selenium Training in Annanagar
You’ve written a really great article here. Your writing style makes this material easy to understand..
ReplyDeleteDigital Marketing Training in Velachery
Digital Marketing Training in Tambaram
Digital Marketing Training in Porur
Digital Marketing Training in Omr
Digital MarketingTraining in Annanagar
such a nice post thanks for sharing this with us really so impressible and attractive post
ReplyDeleteJava course in chennai
python course in chennai
web designing and development course in chennai
selenium course in chennai
digital-marketing seo course in chennai
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
ReplyDeleteIELTS Coaching in chennai
German Classes in Chennai
GRE Coaching Classes in Chennai
TOEFL Coaching in Chennai
Spoken english classes in chennai | Communication training
It is actually a great and useful piece of information.
ReplyDeleteI'm happy that you simply shared this helpful information with us. Please stay us up to date like this. Thank you for sharing."
data logger Distributor
Many businesses which are hoping to increase their online presence are hiring an SEO company or using SEO services well to gain every single benefit while achieving their goals. # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page
ReplyDeleteOur Motive is not just to create links but to get them indexed as will
Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain
High Quality Backlink Building Service
1000 Backlink at cheapest
50 Free Backlink
Although attempting to learn SEO yourself is a good idea as well as a tempting one, there are high chances you might implement SEO techniques wrongly because they need months and years of experience.
Very Nice Post really expalined good information and Please keep updating us..... Thanks.
ReplyDeleteGreat Information thanks for it great job...We follow this post forever...
ReplyDeleteI think this is one of the best blog for me because this is really helpful for me. Thanks for sharing this valuable information
ReplyDeleteinternship meaning | internship meaning in tamil | internship work from home | internship certificate format | internship for students | internship letter | Internship completion certificate | internship program | internship certificate online | internship graphic design
Very Informative blog thank you for sharing. Keep sharing.
ReplyDeleteBest software training institute in Chennai. Make your career development the best by learning software courses.
power bi training course
Docker Training in Chennai
blue prism training in chennai
android course in chennai
I wish to show thanks to you just for bailing me out of this particular
ReplyDeletetrouble.As a result of checking through the net and meeting
techniques that were not productive, I thought my life was done.
mysql training in chennai
unix training in chennai
Software training institute in chennai
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeletepython internship | web development internship |internship for mechanical engineering students |mechanical engineering internships |java training in chennai |internship for 1st year engineering students |online internships for cse students |online internship for engineering students |internship for ece students|data science internships |
Amazing Blog!!! Keep writing blogs like this for our information, looking forward to read more blogs.
ReplyDeleteCheckout complete details about BCA College
Amazing write ups , informative and knowledgeable content, get great knowledge about the topic .T Thank you for sharing such creative and informative content.
ReplyDeleteWhy Study B Arch
For the service of ECE engineering students, we have compiled a collection of mini projects using embedded systems. There are accessible Mini Projects for ECE in the Malakpet area of Hyderabad. Here are mini projects for ece on embedded systems in hyderabad
ReplyDeleteReally knowledgeable blog, got so much information...
ReplyDeletePlease add my website on your comments B.COM ADMISSION LAST DATE
thanks for sharing it with us, nice article
ReplyDeletePython fullstack training institution in Hyderbad
This Blog is Nice!
ReplyDeletePowerbi Training in Hyderabad
it’s very helpful thanks for your valuable information follow us
ReplyDeletePega CPBA Online Training Hyderabad
Amazing Blog!!! Keep writing blogs like this.
ReplyDeleteKeep posting more
Great Article Pharmacy colleges The Bachelor of Pharmacy (B.Pharm) is a 4-year undergraduate program that provides in-depth knowledge and practical skills in pharmaceutical sciences and the healthcare sector. It focuses on the study of drugs, their formulation, usage, effects, and regulatory aspects. This program is essential in training professionals who contribute to the development of medications, patient care, and research within the pharmaceutical industry.
ReplyDeleteGreat Article bcom with cma The Bachelor of Commerce (BCom) with Certified Management Accountant (CMA) is a unique and highly sought-after academic program that blends traditional commerce education with advanced professional certification. This integrated course is designed to equip students with a comprehensive understanding of business, finance, and accounting principles while simultaneously preparing them for the globally recognized CMA certification. By pursuing BCom with CMA, students gain a competitive edge in the job market, as they acquire specialized skills in strategic financial management, cost analysis, and decision-making. This dual-qualification pathway opens doors to lucrative career opportunities in corporate finance, accounting, auditing, and consulting, both in India and abroad.
ReplyDelete