saving . . . saved esptool.FatalError:Failed to connect to ESP8266: TIMED OUT WAITING FOR PACKET HEADER has been deleted. esptool.FatalError:Failed to connect to ESP8266: TIMED OUT WAITING FOR PACKET HEADER has been hidden .
esptool.FatalError:Failed to connect to ESP8266: TIMED OUT WAITING FOR PACKET HEADER
Title
Question
Arduino: 1.8.11 (Windows 7), Board: "Generic ESP8266 Module, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), no dtr (aka ck), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 1, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Executable segment sizes:


IROM   : 241152          - code in flash         (default or ICACHE_FLASH_ATTR) 


IRAM   : 26836   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 


DATA   : 1264  )         - initialized variables (global, static) in RAM/HEAP 


RODATA : 1076  ) / 81920 - constants             (global, static) in RAM/HEAP 


BSS    : 24968 )         - zeroed variables      (global, static) in RAM/HEAP 


Sketch uses 270328 bytes (28%) of program storage space. Maximum is 958448 bytes.
Global variables use 27308 bytes (33%) of dynamic memory, leaving 54612 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.8
Serial port COM3
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
  File "C:\\Users\\student\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/upload.py", line 65, in <module>
    esptool.main(cmdline)
  File "C:/Users/student/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\\esptool.py", line 2890, in main
    esp.connect(args.before)
  File "C:/Users/student/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\\esptool.py", line 483, in connect
    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header

_

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.




Arduino Wireless-Connectivity-to-Arduino 10-11 min 0-10 sec 08-02-20, 3:34 p.m. jameer-gitam

Answers:

Did you press the push button connected to RST pin of ESP8266 while it was showing Connecting.....
08-02-20, 3:38 p.m. Pratikjb11
YES ...
08-02-20, 3:49 p.m. jameer-gitam
followe d all the steps and push button pressed while it was showing connecting
08-02-20, 3:51 p.m. jameer-gitam

Login to add comment


Ideally now it should work. But if you are getting the same error again, I request you to dismantle the connection and connect it again and run the code one more time. 
08-02-20, 4:22 p.m. Pratikjb11
tried on different pc's and used a new esp8266, still the problem persists
08-02-20, 8:32 p.m. jameer-gitam
Connect 3.3V external power supply to ESP8266 module instead of giving from arduino. And do the experiment.
18-02-20, 11:49 a.m. Pratikjb11

Login to add comment


I'm not sure if this will help EVERYONE, but I hope it at least helps someone.  I had the same issue with several different boards (3 Nano's, 2 NodeMCU ESP8266's, and 1 Uno).  I searched and searched for an answer and I kept reading about this pin or that pin being "pulled low" or "pulled hi" interfering with uploading sketches.  Well, since I couldn't find a solid answer anywhere I decided to disconnect all of the peripherals hooked to my board (except for powers and grounds) and Wah Laa!!!  The sketch uploaded like it was supposed to.  So, I believe if you just unhook all of the sending and receiving pins from all of your peripherals during upload, the sketch should upload just fine.  I hope this helps you.
02-05-21, 9:40 p.m. jsmwrench


Log-in to answer to this question.