Error uploading to NodeMCU (ESP-8266)



  • Hello!
    I'm working with my ESP8266 (ESP-12e) wifi module for my Arduino Uno.

    this is my error code

    arduino:1.8.15 (Windows 10), board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

    Executable segment sizes:
    ICACHE : 32768 - flash instruction cache
    IROM : 258924 - code in flash (default or ICACHE_FLASH_ATTR)
    IRAM : 28309 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
    DATA : 1516 ) - initialized variables (global, static) in RAM/HEAP
    RODATA : 1252 ) / 81920 - constants (global, static) in RAM/HEAP
    BSS : 26624 ) - zeroed variables (global, static) in RAM/HEAP

    스케치는 프로그램 저장 공간 290001 바이트(27%)를 사용. maximum 1044464 bytes.

    전역 변수는 동적 메모리 29392바이트(35%)를 사용, 52528바이트의 지역변수가 남음. 최대는 81920 바이트.

    esptool.py v3.0

    Serial port COM4

    Connecting......................................____Traceback (most recent call last):

    File "C:\Users\alsrb\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0/tools/upload.py", line 66, in <module>

    esptool.main(cmdline)
    

    File "C:/Users/alsrb/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptool\esptool.py", line 3552, in main

    esp.connect(args.before, args.connect_attempts)
    

    File "C:/Users/alsrb/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptool\esptool.py", line 529, 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

    _
    selected serial port_
    does not exist or the selected board does not connected


    During the compiling it doesn't make an issue. But whenever I'm trying to send it to the Board, it makes the problem .
    I can see the board is connected to COM4 on tool\serialport and I can see on . Device Manager\USB Serial Port (COM4)
    Can anyone tell me what the problem is?

    OS: Windows 10
    IDE: Arduino 1.8.15
    ESP8266 Board: NodeMcu Lua ESP8266 ESP-12E



  • Are you sure the serial port is not in use by another application?



  • Not sure why you need esptool. I use the Arduino development environment with NodeMCU installed as a device and it connects to my ESP8266 just fine.


  • Mod

    @Callahan i own a few wemos d1 minis that also just fail to be recognized during download. Do you have another esp that you can check out, just to rule out the board itself?



  • struggling with similar issue.... nodemcu 1.0 (esp8266EX) - connected on com6, but back of board says connect at 9600.
    serial monitor at 9600 can display correct messages at boot.. no AT command response, but then when i upload some simple code i get the following:

    ....
    Features: WiFi
    Crystal is 26MHz
    MAC: ec:fa:bc:27:cc:12
    Uploading stub...
    Running stub...
    Stub running...
    Configuring flash size...
    Traceback (most recent call last):
    File "C:\Users\jph1l\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.1/tools/upload.py", line 66, in <module>
    esptool.main(cmdline)
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 3599, in main
    detect_flash_size(esp, args)
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 2848, in detect_flash_size
    flash_id = esp.flash_id()
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 688, in flash_id
    return self.run_spiflash_command(SPIFLASH_RDID, b"", 24)
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 948, in run_spiflash_command
    old_spi_usr = self.read_reg(SPI_USR_REG)
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 562, in read_reg
    val, data = self.command(self.ESP_READ_REG, struct.pack('<I', addr))
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 386, in command
    p = self.read()
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 331, in read
    return next(self._slip_reader)
    File "C:/Users/jph1l/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.1/tools/esptool\esptool.py", line 2636, in slip_reader
    raise FatalError("Timed out waiting for packet %s" % waiting_for)
    esptool.FatalError: Timed out waiting for packet header
    esptool.FatalError: Timed out waiting for packet header

    any ideas - change usb cable, ports, confirmed the com not used elsewhere... any ideas?
    FYI - the blue LED on the NodeMCU does flash once you start the upload.. flash a couple of times then stops.

    Pressing the FLASH and holding down before the upload command or once it tries to connect etc there is no difference.


Log in to reply
 

Suggested Topics

  • 4
  • 37
  • 930
  • 10
  • 4
  • 1
  • 10

96
Online

10.3k
Users

10.7k
Topics

109.6k
Posts