Difference between revisions of "ESP8266"

From ElectroDragon
Jump to: navigation, search
(Steps and note)
(Redirected page to Category:ESP8266)
 
Line 1: Line 1:
== Module wiring ==
+
#redirect [[category:ESP8266]]
<gallery>
+
File:Esp8266_esp-01.png| Pin definition ESP-01
+
File:Esp8266_wiring.jpg| use a standalone battery, wifi spot ESP**** should be able to be found by cell phone wifi
+
File:Wi07c_wiring.jpg| FTDI FT232RL USB-TTL board (only connect green wire for flashing mode)
+
File:ESP8266_wiring_with_FTDI.JPG| Another FTDI FT232RL USB-TTL board
+
File:CH340_esp8266.png|use with CH340 USB-TTL
+
File:Battery_with_esp12.jpg| battery with esp12
+
</gallery>
+
* Use FT232RL can supply enough power, must be genius IC of course
+
* Swap the uart pins if no data show up on the monitor
+
* There are two leds on the board, one is power led (RED), another one is status LED(BLUE), when power up, pwr led keeps on and status led will blink once.
+
* baud rate may work at 9600 ('''seems the latest correct one'''), 115200 or 57600
+
=== Module Pin Description ===
+
* Normal mode: Normal boot from flash, normal working mode
+
* Flash mode: Firmware flash mode
+
{| class="wikitable sortable"
+
|-
+
! Pin !! Working Mode !! Flash Mode  !! Description
+
|-
+
| VCC, GND* || || || power supply, better use a standalone, and share ground with uart port
+
|-
+
| TXD, RXD** || || || uart interface
+
|-
+
| RST|| || || Restart on low TTL
+
|-
+
| CH_PD  || High TTL || High TTL || Chip select, constant High TTL for both mode
+
|-
+
| GPIO0 || High TTL(optionally) || Low TTL || Switch Wroking/Flash Mode
+
|-
+
| GPIO 15 || Low TTL || Low TTL || Constant Low TTL for both mode , N/A for ESP-01
+
|-
+
| GPIO 2 || High TTL || High TTL || Constant High TTL for both mode, maybe not necessary
+
|-
+
| Red LEDs || || || constants on to show the power status
+
|-
+
| Blue LEDs || || || blink when data come through
+
|}
+
 
+
== Setup Check list==
+
* '''Check wifi status''': if your devices (e.g. your phone) can find a wifi spot named like "ESP_98529F" or similar, the later number part is the mac ID, if you can see this wifi spot, it means your module boot up successfully
+
* '''check two LEDS status and wiring''' when boot up, red led should be keep bright on which means power is good, blue led will blink on boot up, and some data will be received on your USB-TTL tool, if no data received, double check your USB-TTL tool:
+
# try swap RX and TX lines
+
# use shared GND will standalone power supply
+
* '''Check GPIO15''', connect GPIO15 to GND if you are using the SMD model
+
<br />
+
* Optional: Tick "new line" option on USB-TTL serial port monitor tool
+
* Optional: Try baudrate 9600 or 115200 normally should be these two, old version is 115200
+
<gallery>
+
File:Espwifi01.png | "ESP_990B15" is the module wifi spot, password 0123456789
+
File:Espwifi02.jpg
+
File:Espwifi03.png | See the final "ready" when boot up successfully
+
</gallery>
+
 
+
== First time use guide ==
+
=== Steps and note===
+
* '''AT+RST''' restart the module, received some strange data, and "ready"
+
* '''AT+CWMODE=3''' change the working mode to 3, AP+STA, only use the most versatile mode 3 (AT+RST may be necessary when this is done.)
+
Join Router<br />
+
* '''AT+CWLAP''' search available wifi spot
+
* ''' AT+CWJAP=“you ssid”, “password”''' join my mercury router spot
+
* ''' AT+CWJAP=?''' check if connected successfully, or use AT+CWJAP?
+
TCP Client<br />
+
* '''AT+CIPMUX=1''' turn on multiple connection
+
* '''AT+CIPSTART=4,"TCP","192,168.1.104",9999''' connect to remote TCP server 192.168.1.104 (the PC)
+
* '''AT+CIPMODE=1''' optionally enter into data transmission mode
+
* '''AT+CIPSEND=4,5''' send data via channel 4, 5 bytes length (see socket test result below, only "elect" received), link will be "unlink" when no data go through
+
TCP Server<br />
+
*  '''AT+CIPSERVER=1,9999''' setup TCP server, on port 9999, 1 means enable
+
* '''AT+CIFSR''' check module IP address
+
* PC as a TCP client connect to module using socket test, send data
+
[[File:ESP8266-test-1.png|300px]][[File:ESP8266-test-2.png|300px]]
+
 
+
=== Socket test running result ===
+
* In the sockettest, do not tick the "secure" in TCP client, it causes unstable
+
[[File:ESP8266-test-3.png|300px]][[File:ESP8266-test-4.png|300px]]
+
 
+
=== Note ===
+
* Use power source that can provide sufficient current, better not using power from USB-TTL module
+
* Module will automatically disconnect "unlink" TCP/UDP when no data go through
+
* Wifi password length must be more than 8 bytes
+
 
+
== Documents ==
+
* [https://drive.google.com/file/d/0B_ctPy0pJuW6Y0FHcDlVY09Xdjg/view?usp=sharing Specification PDF]
+
* [[ESP8266 Firmware]]
+
* [[ESP8266 SDK]]
+
* [[ESP8266 with Arduino]]
+
* [[ESP8266 IC]]
+
* [https://drive.google.com/folderview?id=0B3dUKfqzZnlwRXhBTmlhaTROTmM&usp=sharing More documents on google drive]
+
* [https://github.com/esp8266/esp8266-wiki/wiki/Examples ESP8266 another wiki page]
+
* [[ESP8266 IoT]] Standard example
+
* [[ESP8266 SMD]] size and pin definition, ESP12 CE certificate please also see on this page.
+
* [[ESP8266 Arduino]] Supported code and IDE
+
 
+
[[category:Ethernet, Wifi]] [[category:ESP8266]]
+

Latest revision as of 05:31, 26 October 2015

Redirect to: