nodemcu-devkit-v1.0 icon indicating copy to clipboard operation
nodemcu-devkit-v1.0 copied to clipboard

Impossible to flash/communicate

Open RataDP opened this issue 9 years ago • 19 comments

I'm having troubles to flash or connect my devkit v1. It arrived my home 2 days ago and I was not able to flash it or at least communicate with it.

I'm going to describe my case. I connect my devkit v1 via USB to microUSB with the CP2102 USBtoUARP, then the blue led of the ESP8266 blinks twice and stop. After this I can see the SSID "AI_THINKER_DA7E19" and connect to it, I got a 192.168.4.2 and the device .1. It answers to the ping but there is not webserver. Now I try to flash it, first I tried with Linux and ESPTool,

# python2 esptool.py --port /dev/ttyUSB0 write_flash 0x00000 firmware.bin
Connecting...

A fatal error occurred: Failed to connect to ESP8266

Well I read somewhere it could be a bug with ESPtool with high values of baudrate, so I tried with --baud 9600 but the same output also with different baudrates. Meanwhile the program is in the state connecting..., the blue led blinks. I tried to reset with the Flash button pressed and the same result, nothing change. Also I tried wiring the GPIO0 to GND but still the same error.

Now it is the turn for Windows, I tried with the nodemcu-flasher, the driver was correctly install and the port is assigned correctly too. Select the COM port and set the baudrate to 9600 and flash. The log says Begin to find ESP8266 enters in a loop and the blue led blinks every 1/2 seconds. Just to point it out, in the tab operation not appears any mac, it says "Waiting...". Just like before I changed the Baudrate and I tried all of them but nothing happens. (I also press flash and reset like before but nothing)

Screenshot0

After all this troubles I tried to communicate with the devkit via Serial port with putty and Screen. The connection seems to be established but nothing appears in it. Pressing RST it should write something... garbage or some characters but nothing.

I don't know if I'm doing something wrong or the devkit it's broken. Some solution or tip?

Thank you

PD: I posted it in the old devkit repository, now it is in the correct repository.

EDIT: @mrmonteith answered in the other repository.

I'm trying to remember when I first tried this. I think I used the flasher tool. You start the attempt at transfer, hold down the reset and flasher button, release the flasher button and then about a half second or so after release the reset. I don't have my device in front of me to check. Of course I only had to do it one time and I've had mine for about month. Hope it helps anyway. 

I tried too, but no works it.

RataDP avatar Feb 02 '16 13:02 RataDP

Same issue here... Still can't flash the firmware...

Update: I suggest you to try a new nodemcu. Those annoying errors has gone when I use a new one.

The RX on your nodemcu may broke:

  1. I can receive some messages from nodemcu, such like "Please run file.remove("user.lua") before first use." but doesn't reply me anything when I try to send command, for example: file.remove("user.lua") Maybe RX issue
  2. It always stuck on "Waiting MAC" when I try to flash firmware using firmware flasher. Maybe RX issue
  3. "A fatal error occurred: Failed to connect to ESP8266" when I try to use esptool flashing firmware Maybe RX issue

prob1995 avatar Oct 04 '16 04:10 prob1995

change the USB cable.. had the same issue, resolved after changing the cable.

gbhat618 avatar Oct 21 '16 01:10 gbhat618

And here same issue. I operate PC Windows 10, And Android...,.But it's waiting for mac

KOKONUTCREMEOG avatar May 29 '17 23:05 KOKONUTCREMEOG

Found this page when dealing with the same problem. Swapped out USB cables to no avail. A little bit more searching and I found this which wound up fixing it for me - maybe it might be helpful to others:

http://kig.re/2014/12/31/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html

ChrisHeerschap avatar Jun 22 '17 16:06 ChrisHeerschap

I realize this is a year later so unlikely someone still working on it... but in my case for a different board I had this same problem with RST/D0 were connected for deep sleep.

ShakataGaNai avatar Feb 22 '18 03:02 ShakataGaNai

Hey, did you ever figure this one out? I'm having pretty much the same issue on a Mac with a nodeMCU Amica board (uses a CP102 USB-UART bridge, installed the SiLab driver, etc). I have tried multiple baud rates but always get the same response: A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header.

I have tried multiple USB cables and multiple NodeMCUs to no avail. Really bummed right now...

JayPalm avatar Jun 19 '18 09:06 JayPalm

@JayPalm did you try the link I listed in my last comment?

ChrisHeerschap avatar Jun 19 '18 17:06 ChrisHeerschap

Facing the same issue.. Anyone found the cause of the problem? or a solution that worked..

Parin810 avatar Jun 21 '18 23:06 Parin810

Any luck yet? I had a couple of thoughts. Mostly around possibly weak components. Do you have any sort of oscilloscope? I bought a Hantek digital one that connects to the computer and does fairly good. That would go a long ways to checking things like power supply voltages and noise on the lines. But without you can still probably locate the issue. A couple of things you can try. That is put a capacitor between 3v3 and Gnd as an extra filter. USB interfaces are notoriously noisy. There is also an Espressif forum for issues with the ESP8266 and ESP32 devices. You might post there too.

mrmonteith avatar Jun 29 '18 14:06 mrmonteith

Just reconnect the usb cable keeping the flasher open Look for log for below line ->

Note:Detect serial port changed. Note:Auto MAP serial port.Port-->COM5

Then you should be able to flash. Looks like the tool cannot detect already connected device.

VinayKadalagi avatar Nov 25 '18 15:11 VinayKadalagi

i had same issue. i change usb cable and tried different values for advanced setting on Nodemcu. and it worked by -Baudrate 9600, -flash size 4Mbyte, -flash speed 26.7mhz, -spi mode DIO

ersyncar avatar Mar 28 '19 15:03 ersyncar

Try holding down the GPIO/reset button on your MCU, and then flash whilst still holding down. This worked for me.

cnnrde avatar Mar 29 '19 19:03 cnnrde

Same issue. Won't flash

Joshverge avatar Mar 30 '19 06:03 Joshverge

Just reconnect the usb cable keeping the flasher open Look for log for below line ->

Note:Detect serial port changed. Note:Auto MAP serial port.Port-->COM5

Then you should be able to flash. Looks like the tool cannot detect already connected device.

Just reconnect the usb cable keeping the flasher open Look for log for below line ->

Note:Detect serial port changed. Note:Auto MAP serial port.Port-->COM5

Then you should be able to flash. Looks like the tool cannot detect already connected device.

That's not the issue, it's able to detect the right com port right from the start

Joshverge avatar Mar 30 '19 06:03 Joshverge

That's not the issue, it's able to detect the right com port right from the start

did you try by another usb cable. i had same issue and changed the cable. i tried by my printers cable and it worked :)

and i attached the picture of working settings on my ESP8266 -ESP 01

arduino connections nodemcu

ersyncar avatar Mar 30 '19 08:03 ersyncar

Okay I resolved this for me. You just need to hold down the flash button (on the board) until you see the status bar moving forward after pressing flash

Joshverge avatar Mar 30 '19 10:03 Joshverge

Mine was fixed by putting the board to an oven for two minutes. Looks like a weak components issue

horodchukanton avatar Aug 10 '20 10:08 horodchukanton

I am also having the same issue. It says “waiting mac” however my FTDI and ESP is flashing red and the ESP was also flashing blue for a couple seconds then stopped. Is there anything I am doing wrong here? 99D870D2-D4B2-4201-9E3B-251BE703811E BB4A4BF0-F4D3-4CF5-A17C-3AF7895D4456

Blazer9419 avatar Jan 26 '23 14:01 Blazer9419

I had the same problem but i solved it, it was my usb port. Looks like it the current of that one was to low. So try a different usb port!

TSRider85 avatar Nov 25 '23 21:11 TSRider85