Chat freely about anything...

User avatar
By agregg
#43666 I just started messing with my new ESP8266 today. It's a v2 1024/8Mbit generic version. I'm happily able to program it using Arduino IDE with an FTDI serial device and connect to it over wifi.

However, I am really stuck on getting it to work OTA and it just won't cooperate!

My setup:
Arduino IDE 1.6.8
ESP8266 Boards ver. 2.1.0
BasicOTA.ino

I change the wifi AP and password in BasicOTA and the first serial upload from Arduino IDE is successful. I'm using flash size 1M (64K SPIFFS). When I pull the ESP out of bootloader and reset, I'm able to see it receive an IP address from my router. I then restart Arduino IDE and see the ESP appear as a Network Port. I select that port and attempt to upload BasicOTA.ino again. This is when I get the following in the Upload Log (verbose = on):

Sketch uses 245,344 bytes (25%) of program storage space. Maximum is 958,448 bytes.
Global variables use 32,980 bytes (40%) of dynamic memory, leaving 48,940 bytes for local variables. Maximum is 81,920 bytes.
python.exe C:\Users\agregg\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py -i 192.168.0.102 -p 8266 -f C:\Users\agregg\AppData\Local\Temp\build15e8448c53cbc22bb0df9e567019caca.tmp/BasicOTA.ino.bin
19:36:50 [ERROR]: No response from device

I see the blue LED momentarily flicker on the ESP, and in the serial console I get:
Start
Progress: 0%
Error[2]: Connect Failed
Error[4]: End Failed

I've tried different combinations of SPIFF allocation (finally settled on trying the smallest). I used esptool to verify that I have a 1M flash. I've even tried erasing the flash with esptool, flashing with NodeMCU, and then reattempting...
I'm at a dead end at the moment. Thanks in advance for any help!
User avatar
By frsc
#46623 Just wanted to add a short note for those who might experience similar problems:
I was running the OTA from within a Ubuntu 14.04 VMware guest on a Windows 10 host and got the same error messages as posted above.
I finally figured out, that the solution was to switch the VMware network adapter from NAT to Bridged mode!