How to interface ESP8266 Wi-Fi Module with evive

WiFi ESP8266
About This Tutorial
The tutorial discusses the ESP8266 Wi-Fi Module, how to connect it to evive, and how to configure it for IoT applications using AT commands by writing an Arduino IDE sketch.
Tutorial Info

Components Required

Image Component Quantity Available in Kit
evive 1
ESP8266 Module (ESP-12) 1
USB A-B Cable 1

Introduction

The ESP8266 WiFi Module is a self-contained SOC with integrated TCP/IP protocol stack that can give any microcontroller access to your WiFi network. The ESP8266 is capable of either hosting an application or offloading all Wi-Fi networking functions from another application processor. Each ESP8266 module comes pre-programmed with an AT command set firmware, which means that you can simply connect this to evive and get about as much WiFi-ability as a WiFi Shield offers.

ESP8266 WIFI Module

Features

  • 11 b/g/n
  • Wi-Fi Direct (P2P), soft-AP
  • Integrated TCP/IP protocol stack
  • Integrated TR switch, balun, LNA, power amplifier and matching network
  • Integrated PLLs, regulators, DCXO and power management units
  • +19.5dBm output power in 802.11b mode
  • Power down leakage current of <10uA
  • Integrated low power 32-bit CPU could be used as application processor
  • SDIO 1.1 / 2.0, SPI, UART
  • STBC, 1×1 MIMO, 2×1 MIMO
  • A-MPDU & A-MSDU aggregation & 0.4ms guard interval
  • Wake up and transmit packets in < 2ms
  • Standby power consumption of < 1.0mW (DTIM3)

evive has dedicated WiFi headers which require you to just connect the ESP8266 WiFi module. Communication between evive and the WiFi module takes place via serial port 3.

ESP8266 AT Command Set

Below is the table showing the AT Command Set for the ESP8266 WiFi Module:

FunctionAT CommandResponce
WorkingATOK
RestartAT+RSTOK [System Ready, Vendor:www.ai-thinker.com]
Firmware versionAT+GMR AT+GMR 0018000902 OK
List Access PointsAT+CWLAPAT+CWLAP +CWLAP:(4,"RochefortSurLac",38,"70:62:b8:6f:6d:58",1)

+CWLAP:(4,"LiliPad2.4",-83,"f8:7b:8c:1e:7c:6d",1) OK
Join Access Point
AT+CWJAP?
AT+CWJAP="SSID","Password"
Query AT+CWJAP? +CWJAP:"RochefortSurLac" OK
Quit Access PointAT+CWQAP=?
AT+CWQAP
Query OK
Get IP AddressAT+CIFSRAT+CIFSR 192.168.0.105 OK
Set Parameters of Access PointAT+ CWSAP?
AT+ CWSAP= ,,,
Query ssid, pwd
chl = channel, ecn = encryption
WiFi ModeAT+CWMODE?
AT+CWMODE=1
AT+CWMODE=2
AT+CWMODE=3
Query
STA
AP
BOTH
Set up TCP or UDP connectionAT+CIPSTART=?
(CIPMUX=0) AT+CIPSTART =
,,
(CIPMUX=1) AT+CIPSTART=,, AT+CIPSTART=?
(CIPMUX=0) AT+CIPSTART =
,,
(CIPMUX=1) AT+CIPSTART=,,
Query
id = 0-4, type = TCP/UDP, addr = IP address, port= port
TCP/UDP
Connections
AT+ CIPMUX?
AT+ CIPMUX=0
AT+ CIPMUX=1
Query
Single
Multiple
Check join devices' IPAT+CWLIF
TCP/IP Connection StatusAT+CIPSTATUSAT+CIPSTATUS? no this fun
Send TCP/IP data(CIPMUX=0) AT+CIPSEND=;
(CIPMUX=1) AT+CIPSEND= ,
Close TCP / UDP connectionAT+CIPCLOSE= or AT+CIPCLOSE
Set as serverAT+ CIPSERVER= [,]mode 0 to close server mode; mode 1 to open; port = port
Set the server timeoutAT+CIPSTO?
AT+CIPSTO=
Query
Baud Rate*AT+CIOBAUD?
Supported: 9600, 19200, 38400, 74880, 115200, 230400, 460800, 921600
Query AT+CIOBAUD? +CIOBAUD:9600 OK
Check IP addressAT+CIFSRAT+CIFSR 192.168.0.106 OK
Firmware Upgrade (from Cloud)AT+CIUPDATE+CIPUPDATE:1 found server
+CIPUPDATE:2 connect server
+CIPUPDATE:3 got edition
+CIPUPDATE:4 start update
Received data+IPD(CIPMUX=0): + IPD, :
(CIPMUX=1): + IPD, , :
Watchdog Enable*AT+CSYSWDTENABLEWatchdog, auto restart when program errors occur: enable
Watchdog Disable*AT+CSYSWDTDISABLEWatchdog, auto restart when program errors occur: disable

Example to use AT commands

Below is the Arduino IDE sketch showing how to configure the ESP8266 WiFi Module using AT Commands:

[tutorialRelatedProjects]
Share this Tutorial
Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on reddit
Reddit
Share on print
Print
Featured Projects

Leave a Reply