Getting started with ESP8266 using AT COMMANDS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome to controllers tech today in this video I am going to show you guys how to start using esp8266 I am going to use the 80 command sets to create a web server I am using real term as a serial monitor let me just show you the port where the ESP is connected to as you can see it's comm 6 the connection of ESP with the FT 232 is shown in the picture you can pause here and take a better look go to real term and open the port 6 my device is running at baud rate of 11 5 200 it might be different in your case check the device details where you bought it from check the CR and LF boxes these are needed for the 80 commands here is the manual 480 instruction sets first we are going to take a look at a T command this basically checks if the device is connected or not as you can see the device returned okay so the connection is good I am going to restart it using the rst command if restarted but as you see the last two messages it is been connecting to a Wi-Fi so I will just restore the factory settings to ensure the transparent process I am using the command restore for that process it is restored to factory settings now and there is no connection let's take a look at our first command 80-plus CW mode is used to set the configuration for the device it can be configured to use as a station or as an access point or both let's first check the default configuration adding a question mark means we are querying it returned to which means that it is in access point mode but we want it to be a station so that it can be connected to our Wi-Fi so set the CW mode as one now you can see it's returning one now as the ESP can be connected to a Wi-Fi we are going to connect it to one CW lap is used to list all the access points that are available in the range it returned three AP mine is the middle one it's time to join the access point now to do so we will use the command cwj the usage of it is given in the example below basically we have to enter CW equals the name of the AP comma the password of the AP it is now connected to the Wi-Fi but this connection is just temporary if the device restarts it will be lost to make it permanent we have to write it to the default settings CW underscore Neff is used for the purpose and now the connection is permanent let's restart the device and test it as you can see it is connecting to the Wi-Fi by its own next thing we need is the IP address of the device CIFS are is the command to do so it'd have returned the IP address here copied you are going to need it we can also use the static IP using the SIP Sta death command the example is mentioned here itself I am not using one this time cause this IP that we got is also static and I am okay with it zip MUX command is used to set the multiple connections by default it is set to zero so we are going to set it to one so that we can use multiple connections next we are going to create our server and 80-plus sip server is used for the same one creates the server and eighty is the port if you want you can set the maximum number of connections allowed by the server the usage is given here I will show you what is meant by number of connections in a while let's now go to the IP address of our device if you look at the terminal the device got a request the important part that we are interested in is the connection number it is zero as mentioned here after IPD we are going to send some data to this connection 80-plus sips send is the command to do that you the first parameter is the connection number and second is the length of the data that you want to send in our case that the number is zero and length hello world is 11 characters next we have to send the data once the data length is reached you will receive okay at last close the connection using sip closed equals connection number once done you can check the browser for the data and yes we did receive the hello world let's refresh this page we are again getting the request from same connection number now to show multiple connections I will try to access the IP from another browser as you can see this time the connection number is 1 so right now the device is getting requests from 2 connections at the same time and I will send the data to the connection 1 let's first close the connection zero and see what happens as you can see the edge browsers connection is closed without any data and Chrome is still waiting now I am closing connection one which is the Chrome's connections and yes the chrome received its data successfully we can also check the status of the connection using sip status command right now it's disconnected let's refresh the edge connection and check the status again this time you can see the TCP connection is established this time connection number is zero again I will send hello chrome to the edge and close the connection zero and it received the data successfully of course guys this is just the getting started tutorial we will create an actual web page in the next tutorial also we will work on some IOT related stuff hope you liked the video have a nice day
Info
Channel: ControllersTech
Views: 18,106
Rating: undefined out of 5
Keywords: esp, esp8266, at, commands, example, getting, started, web, server, AT
Id: eiw-Ns9l8K8
Channel Id: undefined
Length: 12min 32sec (752 seconds)
Published: Tue Oct 22 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.