Saturday, February 14, 2015

WiFi Module ESP8266 AT-Command Test

WiFi Module ESP8266 AT-Command Test

ทดสอบการใช้งาน ESP 8266 wifi module ด้วย AT-Command

ESP8266 is Serial Port WiFi Module. It is very low cost.
Then we can use for many Application for Home Automation or IOT.

How to Test
You should use AT-Command to Test Module First.
So,you will know how to use At-Command and step to use ( set mode ,connect wifi, make server )

Hardware for test
You must have USB to RS-232 Converter ( I've one but I can't found it )
So,I decide to use Arduino board as USB to RS-232 Converter by remove MCU out form board.

ESP8266 WiFi Module use 3.3 V power supply and logic.
So,I use Arduino Duemilanove Board because it can set 3.3V power supply and logic.
(Then don't need the logic converter )

Or If you use Arduino 5V supply board such as Arduino UNO or other.
You need logic converter.

Wiring Diagram

ESP8266 PCB layout and pin out
Top Layer

Arduino Pin 0 (Rx)  to ESP8266 Pin URXD
Arduino Pin 1 (Tx)  to ESP8266 Pin UTXD

3.3 V to ESP8266 Pin CH_PD

and VCC 3.3V , GND

For Arduino 3.3V Power Supply and Logic

For Arduino 5V Power Supply and Logic ( Need logic Converter )

Software to Test
We use Arduino IDE and Serial Monitor to test. It 's work fine.
Set your Module Baud rate and Both NL and CR

use "AT" for check Communication
Response "OK"

use "AT+RST" for Software Reset Module
Response "OK"

use "AT+GMR" for check Firmware Version
Response "Firmware Version xxxxxxx"
Response "OK"

use "AT+CWMODE=1" for Set Mode 1 ( Station )
Response "OK"

use "AT+CWLAP" for check WiFi Network Available 
Response "Network Detail"
Response "OK"

+CWLAP:(0,".@  TRUEWIFI",-82,"00:02:6f:c3:29:10",11)
+CWLAP:(0,".@  TRUEWIFI",-92,"00:02:6f:c3:6e:78",7)
+CWLAP:(0,".@  TRUEWIFI",-82,"00:02:6f:bb:77:8c",11)


use AT+CWJAP="ssid","password"  to Connect WiFi Network 
Response "OK"

use AT+CIPMUX=1  set to Multi point Mode
Response "OK"

use AT+CIPSERVER=1,port  to Start Server
Response "OK"

use AT+CIFSR to check your IP Address
Response "IP Address"
Response "OK"

use AT+CIPCLOSE=0 to close all socket

Now You can use the Server.

My Website
email :   Tel .081-6452400