All credits for this article goes to Ram
Contents
- 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.
Short version
- 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)
- Enjoy
Connection
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:
Datasheet: https://nurdspace.nl/images/e/e0/ESP8266_Specifications_English.pdf
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 portThe module usually comes configured for either 9600 or 115200 Baud depends on the vendorMake sure the CR-LF is appendedType in AT and you should get OKType 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:
boot_v1.5.bin
blank.bin
user1.bin
user2.bin
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\Win64\Release\ESP8266Flasher.exe
or
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 holdPress 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 TabWatch the progress bar and wait for completionPower 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 198.168.4.1 (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)
Download files used in this article.
May 17, 2016 at 17:01
Hi,
I followed your Tutorial, but after flashing, i don’t find any new APs.
any Idea?
Greets, macrrec
May 18, 2016 at 14:47
Okay, i didn’t connect the CH_PD right.
Now i can find the AP, but GroundControl says
“No Data recieved -5”
“No Data recieved -20”
“No Data recieved -35”
“No Data recieved -50”
“No Data recieved -65”
What am i doing wrong?
March 31, 2016 at 19:31
Hello!
I’ve managed to add a raspberry pi with wifi connection in the mix as a master for the tiny flight controller.
Raspberry Pi connects to the naze32 via usb cable.
The ez-gui app connects to the raspberry over wifi module.
On the raspberry, I’m running the ser2net application that acts like a serial bridging between data coming over wifi and sends it down on the serial port.
So far so good. I was able to arm.
The problem is that after a while, if I leave everyting on the table and go for a cup of coffee, when I return I see ez-gui not responding to commands. I need to force close.
Also, I have issues connecting an xbox controller (I have a one controller over usb cable and a 360 via dongle) to it, did you tried with those two so I know if I should try further?
March 31, 2016 at 19:47
Probably setting refresh rate in EZ-GUI settings to 150 or 200 will help avoid freezes.
Gamepad support is there but it is buggy and not finished. Probably never will be, because controling a model (especially bigger one) from the phone is very bad idea and sooner or later you will have a “fly away”
February 21, 2016 at 20:55
Hi there.
Did everything as explained in the “How to” and it works. I can connect to the ESP and read/write data from/to the FC.
But after 10 to 50 seconds (it differs) the blue led of the ESP stopps blinking and my cellular is blocked.
If I try it in a test environment (with Socket Test and Terminal program i.e.) everything is working very stable.
Any ideas?
February 26, 2016 at 21:14
Can’t help you with this. I didn’t have a time to try ESP on my own.
January 28, 2016 at 11:26
Hi,
I followed this instructions, I have Multiwii 2.5 board, ESP8266 wifi, android phone 5.0 with newest EZ-GUI installed. I can see sensor readings, but I cant control the drone via phone. What am I doing wrong?
February 26, 2016 at 21:13
don’t do it. control via phone is very bad idea and sooner or later you will have a fly away.
July 28, 2015 at 01:16
I’ve added link to files used in this tutorial at the bottom.
July 18, 2015 at 09:58
I do all the same as in tutorial.
But when I flash the module esp8266 it was sends lot of junk via serial. And can’t find module via wifi anymore.
What i do wrong?
July 25, 2015 at 05:42
The guys who get ?Ai-thinker? it is probably modules that have been bought from Ali Express and which use ?non-standard? firmware.
You may follow this tutorial http://www.instructables.com/id/Blink-for-ESP8266-native-like-arduino-using-Window/step2/Upload-latest-firmware-SDK/ to flash the module with standard 0.95 SDK, and only then the transparent bridge firmware.
?lot of junk via serial? can be due to baud rate issue. You can change the baud rate to meet you FC using Telnet and the command: +++AT 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
July 26, 2015 at 16:13
I followed the tutorial to load standard 0.95 SDK (although files are 1.1 and 1.2 and blank files not 1.2 and 1.512 as per instructions on site)then reset device.
I then loaded the transparent firmware 0x00000 and 0.40000 after resetting the device again both red and blue led’s are permanently on and when connected via serial (HTComm) it streams constant gibberish and accepts no commands.
July 29, 2015 at 13:51
Finally sorted.
For those having similar issues with red and blue led’s on after flashing-you need to upload each firware file separately (not both at the same time)when using nodemcu-flasher.
July 3, 2015 at 20:38
When flashed with the 2 files for transparent bridge upon reboot both red and blue led’s stay on and unit is is not discoverable via wifi.
When flashed back to original Ai-thinker firmware unit is found by wifi !!!!
Any ideas please?
June 3, 2015 at 19:45
buen dia
he seguido todos los paso
cuano hago el flash, al reset el modulo esp8266 el led azul mantiene encendido por siempre y manda unos datos errĂ³neos y no da esp_
June 3, 2015 at 20:44
English please
June 16, 2015 at 20:15
good day
who followed all the way
when I flash, restarting the module esp8266 the blue LED stays on forever and sends the wrong data and does not work
May 20, 2015 at 15:05
Mickey, did you use 1K resistor between Naze RX/TX and ESP8266? Thanks.
May 21, 2015 at 15:42
No Rob, I connected it directly.
May 19, 2015 at 18:48
I’ve finally found a way to make it work, CH_PD need to be connected to VCC.
May 19, 2015 at 16:12
Hello,
I followed your tutorial behalf and flashed successfully.
When I have powered cycle the module a new access point appeared with AI-THINKER… name instead of ESP_… and when I have connected the module to my naze (on 3.3v pad with RX on TX and so on), I don’t see any new AP. What I have doing wrong ??
Thanks for your help