I am arush and i am facing this problem

i am using nodemcu esp8266 board but when i am trying to upload the code this error is comming:
. Variables and constants in RAM (global, static), used 30936 / 80192 bytes (38%)
║ SEGMENT BYTES DESCRIPTION
╠══ DATA 1556 initialized variables
╠══ RODATA 2532 constants
╚══ BSS 26848 zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 61247 / 65536 bytes (93%)
║ SEGMENT BYTES DESCRIPTION
╠══ ICACHE 32768 reserved space for flash instruction cache
╚══ IRAM 28479 code in IRAM
. Code in flash (default, ICACHE_FLASH_ATTR), used 258036 / 1048576 bytes (24%)
║ SEGMENT BYTES DESCRIPTION
╚══ IROM 258036 code in flash
"C:\Users\Lenovo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3" -I "C:\Users\Lenovo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2/tools/upload.py" --chip esp8266 --port "COM4" --baud "115200" "" --before default_reset --after hard_reset write_flash 0x0 "C:\Users\Lenovo\AppData\Local\Temp\arduino\sketches\D1A67E17F7FC1CF003DBFACF9222E17A/sketch_aug29a.ino.bin"
esptool.py v3.0
Serial port COM4
Connecting...

A fatal esptool.py error occurred: Write timeout

when i searched on google it showed that i have to switch "show verbose output to upload". i did it but still same error is comming

Sorry I am not familiar with that board. That verbose setting will not fix it, just better tell us what is going wrong. use the copy button and past the entire block that is given showing the error. Be sure the correct board is selected.

1 Like

Your topic has been moved. Please do not post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.

Hi @arushbnbkjcbjk. This error might be caused by having the wrong port selected from the Tools > Port menu in Arduino IDE.

Please perform this experiment to verify that the port you have selected is your Arduino board:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Select Tools > Port from the Arduino IDE menus.
  3. Take note of the ports (if any) listed in the menu.
  4. Close the Tools menu.
    :exclamation: The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  5. Connect the Arduino board to your computer with a USB cable.
  6. Select Tools > Port from the Arduino IDE menus. - If a new port is listed in the menu, that is the port of your Arduino board.

If you saw a new port appear at the last step, select that port from the Tools > Port menu and try uploading again.

If this doesn't solve the problem, please reply here on this forum thread with the answers to the following questions:

  • While following those instructions, did you see a port in the Tools > Port menu at step (6) that was not present at step (3)?
  • If you did see a new port, was the upload successful after you selected that port?
1 Like

Did you do all this?

And if so, have you seen this?

Bonus: just stumbled across this guide:
https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html
by @PieterP that he posted in this thread:

The guide seems to be packed with useful info.

1 Like

Its always worth checking your usb connection. Many cables supplied with devices - such as phones are not "data cables" but only for charging.

You will find the following utilityes very useful. They are portable, no installation needed.

@ptillisch i am not using arduino board i am using NODEMCU ESP8266 Board

By "Arduino board", I meant the board you are using with Arduino. So now follow the instructions I provided. If seeing "Arduino board" in the instructions causes you some distress or confusion, then simply replace every occurrence of "Arduino board" in the instructions with "NODEMCU ESP8266 Board".

@ptillisch I DID WHATEVER YOU TOLD ME:-
1- WHEN I CONNECTED IT AGAIN I WAS NOT ABLE TO SEE ANY NEW PORT ALL I SAW WAS THE SAME OLD PORTS.HERE IS THE IMAGE:-

Please try this troubleshooting procedure and then report your results in a reply on this forum thread:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Open the Windows Device Manager.
  3. Select View > Devices by type from the Device Manager menus.
  4. Open the "View" menu.
  5. If there is a to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  6. Take note of the contents of the "Other devices" and "Ports (COM & LPT)" sections of the Device Manager tree.
  7. Connect the Arduino board to your computer with a USB cable.
  8. Select Action > Scan for hardware changes" from the Device Manager menus.

Did you see any new device appear in the Device Manager tree after doing this? If so, please tell us where it is located in the tree and what it is named.

You can repeat steps 5-8 multiple times if you are not sure.

@ptillisch I DID NOT SEE ANY NEW DEVICE IN DEVICE MANAGER. YOU TOLD ME TO CHECK IF A NEW DEVICE APPEARED IN PORTS (COM & LPT) AND OTHER DEVICES BUT THERE WAS NO NEW DEVICE.IMAGE:-

It was already mentioned by @johnerrington in post #7, but you didn't say whether you checked it, so I'll repeat:

Make sure the USB cable is completely plugged into both the Arduino board and the PC.

If that doesn't help, you may have a damaged/defective or charge-only USB cable. Try a different cable.

Either of the above can result in the power connections being made (and thus LEDs lit on the board), but no data connections (and thus no port for the board).

@ptillisch I when I connected it the led on the board was lit so the power was supplied. So I assume that it is a charge only cable. Please reply.

If you have another cable, switch to using the other cable, then check to see whether a new port appears after you connect the ESP8266 NodeMcu board to your computer with that cable.

If you don't have another cable, try connecting some other device to your computer with the current cable. If the computer recognizes that device while it is connected with the cable, then you will know that the cable is working correctly.

@ptillisch As you told me I changed the usb cable and as you asked me to do in post #11 it is showing me a new port in "Ports(Com & Lpt)" and the name is "USB-SERIAL CH340(COM5)". Now what to do next.

Great news!

The first thing I recommend doing is attaching a label to the other cable that indicates it is a charge-only cable. This will ensure you don't suffer from the same confusion later.

After that, select COM5 from Arduino IDE's Tools > Port menu and try uploading the sketch to your ESP8266 board again. Hopefully everything will work as expected this time.

your current solution has fixed my problem but i have one confusion


now here the last statement Hard resetting via RTS pin. is this a sign that the code is uploaded because i dont think so as in my blynk cloud the device is still offline.

Yes.

Try to upload blink; you should see the same Hard resetting via RTS pin and the onboard LED should blink.

I'm glad it is working now.

Yes. You will also see a "Done uploading." notification that will tell you that the sketch was uploaded. The notification is automatically hidden after a few seconds, but you can see it if you open the "notification center" by clicking the bell icon at the right side of the status bar at the bottom of the Arduino IDE window:

It has some other cause. You can add some Serial.println calls at strategic points in your sketch, then open the Arduino IDE Serial Monitor while the sketch is running. That should give you some idea about what is going wrong.