Ads

Get STM32 tutorial using HAL at $10 for a limited time!

Showing posts with label ESP8266. Show all posts
Showing posts with label ESP8266. Show all posts

Sunday, August 14, 2016

ESP8266 WiFi Module Tutorial 3 - WiFi Station Mode and TCP Client

In the previous tutorial, we have seen how to setup the ESP-01 module as an access point and running a TCP server on it. In this tutorial, I will explain how to setup the ESP module as a station (WiFi device) and connects to an existing access point. The ESP module is configured as a TCP client, so it can connect to any TCP server. This is the block diagram that explain the system in this tutorial.


In this system, I will setup a PC as a WiFi soft access point (using Connectify software). The PC also runs a TCP server on port 23 using Hercules TCP terminal. The ESP module which acts as a WiFi station can connect to the PC access point. The ESP module which also acts as a TCP client can make a connection to the TCP server on the PC. After the connection is created, we can exchange data with the server. Serial to USB converter and serial terminal (Hercules) is used for controlling the ESP module.

Saturday, August 13, 2016

ESP8266 WiFi Module Tutorial 2 - WiFi Access Point Mode and TCP Server

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.

Friday, August 12, 2016

ESP8266 WiFi Module Tutorial 1 - Basic Circuit Testing

ESP8266 is a low-cost SoC (System on Chip) with capabilities for WiFi communication. This SoC contains a full TCP/IP stack and a microcontroller. The CPU in this SoC is a 32-bit RISC CPU: Tensilica Xtensa LX106 running at 80MHz. The WiFi is IEEE 802.11 b/g/n standard and also support WEP or WPA/WPA2 authentication. There are also several peripherals in this SoC: GPIO, SPI, I2C, I2S, UART, and ADC.


There is several WiFi modules that use this SoC. One of these modules is ESP-01 module. This module is manufactured by AI-Thinker. Actually there is other modules that manufactured by this company. The modules are labeled from ESP-01 through ESP-14. To work with this module, we need a serial TTL to USB converter and 3.3 volt power supply. The GPIO pin of this SoC is not 5V tolerant, so you need a voltage level shifter circuit if you want to connect this module to a 5V GPIO.