I connected the ESP8266 with my device using CP2102 USB to UART Bridge Controller, but ArduinoIDE is telling me that the port isn't there. The problem actually begin when the error "esptool" appeared, but it was fixed after I changed the versions of the board manager library by ESP8266 community. However, before and now, ArduinoIDE still can't find the port, and is giving me errors. Also, I went to device manager, and tried to update the USB as an attempt, but it responded that it wasn't able to "install" the USB. Any ideas?
Did you do the most beloved thing of each and every modern electronic device ( I mean restart / reboot)
What exact OS are you using?
Post a picture of what the device-manager is showing if you plugged in your ESP8266
and the steps how you tried to install the CP2102-driver.
best regards Stefan
Try using "Zadig" to find the correct driver for your programming device (whatever it is)
Show what you are using.
After going through your suggestions, I realized that that the driver is the problem, so I installed one that finally solved that error. But, another error popped out, "timed out waiting for packet header," which was solved after downgrading the library. Now, I'm facing a new error that I'm not sure the reason behind it:
error: espcomm_open failed
error: espcomm_upload_mem failed
Failed uploading: uploading error: exit status 2
I tried searching online, but I wasn't able to find the right solution.
Please help.
Please explain in detail what you mean in this case with
"downgrading the library."
you seem to use the word "library" in a different than the common way.
libraries in the common way have absolutely nothing to do with the uploading process.
This error-message is too short to analyse the real cause of the problem.
Please adjust the arduino IDE to full verbose output when compiling and uploading
Follow this tutorial to do these adjustments
best regards Stefan
By, "downgrading the library," I meant I changed the version of the library in the Board Manager by the ESP8266 community from 3.1.2 to 2.5.0 (This was by a suggestion posted in an old forum facing my issue). Regarding the error, I'm really sorry for not providing the long version:
esptool v0.4.13-1-gf80ae31 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM4
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
serialport_receive_C0: 65 instead of C0
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
serialport_receive_C0: 65 instead of C0
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
Failed uploading: uploading error: exit status 2
Again: what you update or downgrade in the board-manager are CORE-files
not libraries!
CORE-files are - somehow libraries yes. But they are stored at a different place than
what in the common sense are called libraries.
You seem to use a very old esptool Version v0.4.13-1 from 2014
If I do an upload with ESP8266-core I get this upload log
C:\Arduino-Pure-Portable\arduino-1.8.19\portable\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Arduino-Pure-Portable\arduino-1.8.19\portable\packages\esp8266\hardware\esp8266\3.1.2/tools/upload.py --chip esp8266 --port COM5 --baud 115200 --before default_reset --after hard_reset write_flash 0x0 C:\Users\dipl-\AppData\Local\Temp\arduino_build_625583/ESP8266-Blink-Demo-001.ino.bin
esptool.py v3.0
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 5c:cf:7f:0b:11:50
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0340
Compressed 270784 bytes to 199190...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 270784 bytes (199190 compressed) at 0x00000000 in 17.6 seconds (effective 122.9 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
This uses esptool.py v3.0 compared to your v0.4.13
So I suggest that you upgrade again to version 3.1.2.
Terminate the Arduino-IDE
and start Arduino-IDE new
then try again and if something does not work
post the upload-log
best regards Stefan
Its worth starting by running USBTreeView
its a portable app needs no installation.
Not sure why it didn't work before, but it worked just now, thanks so much!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.