-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Uploading Error #11962
-
Board
ESP32 Dev Module
Device Description
ESP32 NodeMCU with Silicon Labs CP2102
Hardware Configuration
Only a Micro-USB cable connected to the Computer.
Version
v3.3.0
Type
Bug
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
40 and 80 Mhz
PSRAM enabled
no
Upload speed
All
Description
It is not possible to Upload any Sketches, even though the Serail Monitor is working.
Sketch
void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }
Debug Message
Der Sketch verwendet 281339 Bytes (21%) des Programmspeicherplatzes. Das Maximum sind 1310720 Bytes.
Globale Variablen verwenden 20680 Bytes (6%) des dynamischen Speichers, 307000 Bytes für lokale Variablen verbleiben. Das Maximum sind 327680 Bytes.
esptool v5.0.0
Serial port COM3:
Connecting.....
A fatal error occurred: Invalid head of packet (0x00): Possible serial noise or corruption.
Fehlgeschlagenes Hochladen: Hochladefehler: exit status 2
Other Steps to Reproduce
I tried exactly the same on three different computers, two with Windows 11 latest version, 1 with Windows 10 latest version. It solely didn't work on one of the Windows 11 machines.
In case it helps, this is my computer:
Acer Aspire A515-45G
NX.A8AEV.00G
You can look up the specs on the Acer support website.
Thank you very much
Felix
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 25 comments
-
@PukkyPukPukt - If you set ESP32 to Download Mode before uploading, by holding the BOOT button pressed, pulsing RESET and then releasing both buttons, does it upload a new firmware?
Another possible solution is by changing the upload speed to 115200.
This can be done in the Arduino IDE -> Menu -> Tools -> "Upload Speed:" -> "115200"
Beta Was this translation helpful? Give feedback.
All reactions
-
Have you installed actual Silicon Labs CP2102 drivers?
Beta Was this translation helpful? Give feedback.
All reactions
-
same issue i am facing after updating
Beta Was this translation helpful? Give feedback.
All reactions
-
@PukkyPukPukt / @Vinayakahr10 - What board are you using? If possible post a picture/website of the board.
If you set the ESP32 board into Download mode (BOOT + RESET) while the sketch is compiled, it is able to upload the firmware?
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
@SuGlider i am not able to upload
This is very typical behavior of a bad cable. Do you get the boot logging on Serial Monitor?
Beta Was this translation helpful? Give feedback.
All reactions
-
@lbernstone yes
Beta Was this translation helpful? Give feedback.
All reactions
-
@PukkyPukPukt Just uninstall the Driver and reinstall it from https://www.silabs.com/software-and-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads
Beta Was this translation helpful? Give feedback.
All reactions
-
@PukkyPukPukt Just uninstall the Driver and reinstall it from https://www.silabs.com/software-and-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads
Did it solve the issue?
Beta Was this translation helpful? Give feedback.
All reactions
-
@SuGlider yes
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
As soon as I uninstalled the newest Version in the Board Manager, it worked again. The drivers are correctly installed and I made sure there are no other Programs interfering. I used the same Buttons on the board that I use always.
Beta Was this translation helpful? Give feedback.
All reactions
-
The cable is intact, I also installed Windows the drivers and the Arduino IDE freshly, but only downgrading solved the issue.
Beta Was this translation helpful? Give feedback.
All reactions
-
OK. It may be a problem related to preivous ESP32 Arduino instalation.
It may be possible to solve it by deleting some files and folders.
Please try this:
1- Delete all files in C:\Users\YOUR_USER_NAME\AppData\Local\Arduino15\staging\packages*.*
2- Delete the whole folder in C:\Users\YOUR_USER_NAME\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0
3- Reinstall the ESP32 board using the board manager for the Arduino Core 3,3.0
Beta Was this translation helpful? Give feedback.
All reactions
-
Same here. Works with 3.2.1
Beta Was this translation helpful? Give feedback.
All reactions
-
OK. It may be a problem related to preivous ESP32 Arduino instalation. It may be possible to solve it by deleting some files and folders.
Please try this: 1- Delete all files in C:\Users\YOUR_USER_NAME\AppData\Local\Arduino15\staging\packages*.* 2- Delete the whole folder in C:\Users\YOUR_USER_NAME\AppData\Local\Arduino15\packages\esp32\hardware\esp323円.3.0 3- Reinstall the ESP32 board using the board manager for the Arduino Core 3,3.0
As said, Windows together wirh the Arduino IDE has been installed freshly on an empty SSD.
Beta Was this translation helpful? Give feedback.
All reactions
-
Serial port COM3:
Connecting.....
A fatal error occurred: Invalid head of packet (0x00): Possible serial noise or corruption.
It indicates that there is an issue with the serial communication.
Using Win11, open the Device Manager application and check if COM3 is listed under Ports (COM & LPT) as "Silicon Labs CP210x USB to UART Bridge (COM3)"
If it is there, please open the Arduino IDE Serial Monitor using the COM3, select 115200 baud and press the ESP32 RESET button, you must see the boot log messages in the Serial Monitor.
Press BOOT + RESET button at the same time, release only RESET and later BOOT.
It shall display this message:
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
This is the download mode. ESP32 will wait for a firmware upload.
Go to the Arduino IDE select Menu->Tools->Upload Speed->115200 and start the Upload.
As soon as it says that it has compiled:
Der Sketch verwendet 281339 Bytes (21%) des Programmspeicherplatzes. Das Maximum sind 1310720 Bytes.
Press BOOT + RESET, release first RESET and then BOOT to start the download mode.
General Trouble Shooting:
To fix the "A fatal error occurred: Invalid head of packet (0x00): Possible serial noise or corruption" error on an ESP32, first try reducing the upload speed in your IDE to 115200, use a high-quality, data-capable USB cable and a direct USB port, and ensure no external components are causing electrical interference. If the issue persists, try holding the Boot button on the ESP32 while uploading, or check for and install the correct USB-to-serial driver (e.g., CP210x or CH340) for your board.
Common Solutions
1. Reduce Upload Speed:
The default upload speed may be too high for your board. Change the upload speed setting in your IDE (e.g., Arduino IDE) to 115200 and try uploading again.
2. Check Your USB Cable and Port:
Use a known-good, data-capable USB cable; many cheap cables are charging-only and can cause this error.
Try a different USB port on your computer, preferably a direct connection to the motherboard, and avoid USB hubs.
3. Inspect for Electrical Interference:
Ensure the ESP32 board is not touching anything conductive, such as a metal table or another board, as this can cause shorts.
If you have any shields, modules, or external circuitry connected, disconnect them and try uploading again to see if the issue is resolved.
4. Manual Boot Mode:
For boards like the ESP32-CAM or others that don't always enter boot mode automatically, press and hold the "Boot" (or "Flash") button on the ESP32 as you start the upload and release it after the upload begins.
Driver and Software Checks
1. Verify USB-to-Serial Drivers:
Incorrect or missing drivers can cause communication issues. If your board uses a CP210x or CH340 USB-to-serial chip, search for and install the correct driver for your operating system from the manufacturer (e.g., Silicon Labs for CP210x drivers).
2. Update IDE and Core Libraries:
Outdated software can sometimes lead to issues. Ensure your Arduino core for ESP32 or platform within PlatformIO is up-to-date.
Advanced Steps
1- Check for a Wrong Board Selection: Make sure you have selected the correct ESP32 board in your IDE.
2- Disconnect Serial Connections: If you have any other serial devices or pins connected to the ESP32's RX/TX pins, disconnect them, as they can interfere with the upload process.
Beta Was this translation helpful? Give feedback.
All reactions
-
Serial port COM3:
Connecting.....
A fatal error occurred: Invalid head of packet (0x00): Possible serial noise or corruption.It indicates that there is an issue with the serial communication.
Using Win11, open the Device Manager application and check if COM3 is listed under Ports (COM & LPT) as "Silicon Labs CP210x USB to UART Bridge (COM3)" If it is there, please open the Arduino IDE Serial Monitor using the COM3, select 115200 baud and press the ESP32 RESET button, you must see the boot log messages in the Serial Monitor.
Press BOOT + RESET button at the same time, release only RESET and later BOOT. It shall display this message:
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2)) waiting for downloadThis is the download mode. ESP32 will wait for a firmware upload.
Go to the Arduino IDE select Menu->Tools->Upload Speed->115200 and start the Upload. As soon as it says that it has compiled:
Der Sketch verwendet 281339 Bytes (21%) des Programmspeicherplatzes. Das Maximum sind 1310720 Bytes.Press BOOT + RESET, release first RESET and then BOOT to start the download mode.General Trouble Shooting:
To fix the "A fatal error occurred: Invalid head of packet (0x00): Possible serial noise or corruption" error on an ESP32, first try reducing the upload speed in your IDE to 115200, use a high-quality, data-capable USB cable and a direct USB port, and ensure no external components are causing electrical interference. If the issue persists, try holding the Boot button on the ESP32 while uploading, or check for and install the correct USB-to-serial driver (e.g., CP210x or CH340) for your board.
Common Solutions
1. Reduce Upload Speed: The default upload speed may be too high for your board. Change the upload speed setting in your IDE (e.g., Arduino IDE) to 115200 and try uploading again. 2. Check Your USB Cable and Port: Use a known-good, data-capable USB cable; many cheap cables are charging-only and can cause this error. Try a different USB port on your computer, preferably a direct connection to the motherboard, and avoid USB hubs. 3. Inspect for Electrical Interference: Ensure the ESP32 board is not touching anything conductive, such as a metal table or another board, as this can cause shorts. If you have any shields, modules, or external circuitry connected, disconnect them and try uploading again to see if the issue is resolved. 4. Manual Boot Mode: For boards like the ESP32-CAM or others that don't always enter boot mode automatically, press and hold the "Boot" (or "Flash") button on the ESP32 as you start the upload and release it after the upload begins.
Driver and Software Checks
1. Verify USB-to-Serial Drivers: Incorrect or missing drivers can cause communication issues. If your board uses a CP210x or CH340 USB-to-serial chip, search for and install the correct driver for your operating system from the manufacturer (e.g., Silicon Labs for CP210x drivers). 2. Update IDE and Core Libraries: Outdated software can sometimes lead to issues. Ensure your Arduino core for ESP32 or platform within PlatformIO is up-to-date.
Advanced Steps
1- Check for a Wrong Board Selection: Make sure you have selected the correct ESP32 board in your IDE. 2- Disconnect Serial Connections: If you have any other serial devices or pins connected to the ESP32's RX/TX pins, disconnect them, as they can interfere with the upload process.
All done. No effect. Only downgrading helped.
Beta Was this translation helpful? Give feedback.
All reactions
-
All done. No effect. Only downgrading helped.
Changing to Arduino IDE Menu -> Tools -> Upload Speed: "115200" ?
You can try other higher speed.
It may be a problem related to the USB cable.
The recommendation is to use shielded, high-quality USB cables, up to 1 meter long.
Avoid using USB Hubs or loose USB Port PCs.
Beta Was this translation helpful? Give feedback.
All reactions
-
All done. No effect. Only downgrading helped.
Changing to Arduino IDE Menu -> Tools -> Upload Speed: "115200" ? You can try other higher speed.
It may be a problem related to the USB cable. The recommendation is to use shielded, high-quality USB cables, up to 1 meter long. Avoid using USB Hubs or loose USB Port PCs.
I tried different cables, shielded, unshielded and different USB Ports, never a hub and nothing helped.
Beta Was this translation helpful? Give feedback.
All reactions
-
But when the upload speed is set to 115200, it works?
Another possibility is that this ESP32 board has some issue, maybe a problem with the UART-USB chip.
Beta Was this translation helpful? Give feedback.
All reactions
-
But when the upload speed is set to 115200, it works?
Another possibility is that this ESP32 board has some issue, maybe a problem with the UART-USB chip.
No, it didn't work. Only downgrading helped. I tried every setting and every tip but only downgrading helps.
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you try running the esptool from v3.3.0 directly?
Open a terminal screen.
cd to C:/Users/%USERNAME%/AppData/Local/Arduino15/packages/esp32/tools/esptool_py/5.0.0 .
Run esptool chip_id
If that works, run esptool erase_flash
Post your results from this.
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you try running the esptool from v3.3.0 directly? Open a terminal screen. cd to C:/Users/%USERNAME%/AppData/Local/Arduino15/packages/esp32/tools/esptool_py/5.0.0 . Run
esptool chip_idIf that works, runesptool erase_flashPost your results from this.
esptool didn't work either.
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you download esptool v5.0.2 from github, and see if esptool chip_id works with that version?
Beta Was this translation helpful? Give feedback.
All reactions
-
Install latest esptool v5.1.0. There was an issue with Windows and certain USB serial chips. This is fixed in latest esptool v5.1.0
Beta Was this translation helpful? Give feedback.