All credits for this article goes to Ram
- 1 Short version
- 2 Connection
- 3 ESP8266 module types
- 4 Where to buy
- 5 Building an adapter / Programing jig
- 6 Testing the JIG
- 7 Downloading the Transparent Bridge FW
- 8 Downloading the Flashing utility
- 9 Flashing the board
- 10 Testing the new Firmware
- 11 Android connect to ESP8266
- 12 Virtual serial port for PC running Windows
- 13 Download files used in this article.
- Buy this: http://www.banggood.com/Mini-NodeMCU-ESP8266-WIFI-Development-Board-Based-On-ESP-12F-p-1054209.html?rmmds=search
- Download firmware: https://github.com/jeelabs/esp-link/releases
- Download flasher for Windows: https://github.com/nodemcu/nodemcu-flasher/archive/master.zip
- Flash firmware:
More info here: https://github.com/jeelabs/esp-link/blob/master/FLASHING.md
- Connect to ESP_[xxxxxx] from your computer or phone
- Go to http://192.168.4.1/wifi/wifiAp.html
- Set your SSID (Network name) and password also set Soft-AP Auth Mode to WPA2_PSK
- Connect hardware:
- Run EZ-GUI and go to settings. Set your SSID and password. Server IP should be 192.168.4.1 and port 23. (you don’t have to connect to the wifi network in Android. EZ-GUI will do this for you)
Wireless connection to Multicopter is very handy particularly in the field. Bluetooth is the simplest solution but it suffers from relatively short distance limitation. 3DR radio is a long range solution but it requires an extra HW in the client?s side either Android or PC.
A solution that takes the good of both worlds is Ethernet WiFi. Since the EZ-GUI implements TCP Client, we need in the MultiWii side a module that implements Transparent TCP server. Transparent means that any data transmitted from either side is received ?as is? in the other side i.e. no extra characters are added or omitted.
A nice very low cost WiFi solution module based on a chip from Espressif Systems http://espressif.com/en/products/esp8266/ looks like this:
ESP8266 module types
ESP-02 external antenna can penetrate the metal shield, better external antenna, the proposed standard with 50-ohm antenna
ESP-03 leads all available IO ports, and using high-gain antennas shrink ceramics, suitable for development with the SDK friend
ESP-04 leads all the IO ports, antenna customers can design their own freedom, more flexible
ESP-05 interface only leads to ease of use UART and VCC
ESP-06: bottom mounts technology, leads all the IO ports, with metal shielding shell
ESP-07: Semi-hole chip technology, all the IO leads, with metal shielding shell
ESP-08: same as ESP-07, except that the antenna is in the form of customers can define their own
ESP-09: Ultra-small size package, only 10 * 10 mm, four-layer board technology 1M bytes!
ESP-10: SMD interface, narrow-body design, 10 mm wide, suitable for light with controller
ESP-11: SMD interface, ceramic antenna, small size
Where to buy
– ebay, bangood, search for ESP8266
This tutorial refers to ESP8266-01 or just ESP8266 but it is only a matter of pinout.
Building an adapter / Programing jig
The board runs on 3.3v and consume up to 300mA so it requires an external regulator and protection resistors for the Tx and Rx signals. Moreover, the stock SW does not support the TCP transparent server future. Therefore, a small adaptor (DIY) and a standard FTDI adapter are required for flashing the module with the right FW.
Adapter schematic and connection to the FTDI adapter
Testing the JIG Connect the FTDI adapter to PC and run a terminal program. You can use the Termite utility http://www.compuphase.com/software_termite.htm
Settings: Select your FTDI COM port The module usually comes configured for either 9600 or 115200 Baud depends on the vendor Make sure the CR-LF is appended Type in AT and you should get OK Type in AT+GMR and you should get the board?s FW version (might be different then the screenshot)
Downloading the Transparent Bridge FW From https://github.com/beckdac/ESP8266-transparent-bridge
Direct link to the zip file: https://github.com/beckdac/ESP8266-transparent-bridge/archive/master.zip Browse the archive to ESP8266-transparent-bridge-master.zip\ESP8266-transparent-bridge-master\bin\ and extract the two following files to a temp directory: eagle.app.v6.flash.bin
eagle.app.v6.irom0text.bin From https://github.com/jeelabs/esp-link/releases
Click on either a beta or stable release link. Then scroll down to the bottom of the page and download the .tgz file. Then extract the .bin files contained in the zipped file to a temp directory:
Downloading the Flashing utility There are many flashing tools for this module, I?ve found the nodemcu-flasher https://github.com/nodemcu/nodemcu-flasher the simplest to use.
Direct link to the zip file: https://github.com/nodemcu/nodemcu-flasher/archive/master.zip Browse the archive to either
nodemcu-flasher-master.zip\nodemcu-flasher-master\Win32\Release\ESP8266Flasher.exe Depends on your operating system model and extract to the same temp directory
Flashing the board (For other flashing methods, see instructions on the github release page.) Set the COM port here:
Point to the FW files here:
Set the Baud rate here:
Programing sequence Press the PGM pushbutton and hold Press the RST pushbutton (while holding PGM pushbutton) Release the RST pushbutton (while holding PGM pushbutton) Release the PGM pushbutton The board should be now in programming mode Press the Flash bottom from the Operation Tab Watch the progress bar and wait for completion Power cycle the module
Testing the new Firmware Test using SocketTest and Termite
Connect the PC to the new WiFi net. The Network name starts with ESP_ , the rest is part of the MAC address.
The default WiFi access is open so no password is required -Download SocketTest form here: http://sourceforge.net/projects/sockettest/
-Extract the archive file SocketTest3.zip to a temp directory and run SocketTest.bat (Java RTE should be installed) -setting socket test Select the client Tab
Type in the IP address 220.127.116.11 (the default address)
Type in the port number 23 (the default port)
Press the Connect button Run the Termite terminal, set the Baud to 115200 (the default Baud) If everything is as it should be, everything that you type in Termite should be displayed in SocketTest and vice versa. The server defaults can be changed and stored in Flash using Telnet terminal client such as PuTTY PuTTY can be downloaded from here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Supported commands through Telnet PORT: 22 IP: 192.168.4.1 +++AT # do nothing, print OK +++AT MODE # print current opmode +++AT MODE <mode: 1= STA, 2= AP, 3=both> # set current opmode +++AT STA # print current ssid and password connected to +++AT STA <ssid> <password> # set ssid and password to connect to +++AT AP # print the current soft ap settings +++AT AP <ssid> # set the AP as open with specified ssid +++AT AP <ssid> <pw> [<authmode> [<ch>]]]# set the AP ssid and password, authmode:1= WEP,2= WPA,3= WPA2,4=WPA+WPA2 , channel: 1..13 +++AT BAUD # print current UART settings +++AT BAUD <baud> [data [parity [stop]]] # set current UART baud rate and optional data bits = 5/6/7/8 , parity = N/E/O, stop bits = 1/1.5/2 +++AT PORT # print current incoming TCP socket port +++AT PORT <port> # set current incoming TCP socket port (restarts ESP) +++AT FLASH # print current flash settings +++AT FLASH <1|0> # 1: The changed UART settings (++AT BAUD …) are saved (Default after boot), 0= no save to flash. +++AT RESET # software reset the unit *Note ? the TCP client should be disconnected in order to use the Telnet, otherwise the connection request is rejected Example commands:
Android connect to ESP8266 Disconnect the module from the FTDI adapter and connect to your flight controller board like a Bluetooth module i.e. Tx->Rx, Rx->Tx.
EZ-GUI screenshot ? default port / IP
Virtual serial port for PC running Windows
In order to communicate from the PC (MultiWiiConf ClearFlight etc.) with Flight Controller, a utility called ?Virtual Com port? is required. This utility creates a virtual COM port and directs all serial traffic to and from the WiFi module. The utility can be downloaded from here: http://www.hw-group.com/products/hw_vsp/index_en.html
Direct link here: http://new.hwg.cz/files/download/sw/version/hw-vsp3-single_3-1-2.exe
Connect to the module WiFi network
- Install the program as either ?program? or ?service?
- Run the program
- Set the network IP and Port
- Set COM number (no need to set COM parameters)