I’m trying to flash my Wemos D1 mini with ESPHome to control my Garage door and I’m getting this error:
Unexpected error: could not open port ‘COM4’: PermissionError(13, ‘Access is denied.’, None, 5)
then followed by this error:
Unexpected error: ESP Chip Auto-Detection failed: Failed to connect to Espressif device: Timed out waiting for packet header
I’ve spent the last couple of hours on Google trying to figure out the fix by installing drivers etc, but nothing’s working. I’ve also tried flashing another Sonoff Basic that I had lying around and the same problem is happening, so I don’t think it’s the board.
I’m attempting this on a windows machine, using the flash tool and my code is the following
Change usb cable.
Unplug, and plug back your Wemos D1 mini. Then, double-check that you’ve selected the right serial port in the Tools > Serial menu. Then, click the “ Connect/disconnect ” button to establish a serial communication.
This error might also mean that you have your serial port being used in another program (like a serial terminal or in the Arduino IDE).
I know this is an old topic, but I was able to get around this error on windows 10 (amd ryzen 5 chipset with asus mb) by simply running the x86 package instead of the x64.
Sorry if not an apporiate bump, but there really wasn’t an answer here.
for the people who are still having this issue… i had this with my D1 mini V3. you should check if your soldering is good. ( mine had bad soldering, the header pins were not straight causing errors) i bent them straight retried the flashing. worked like a charm so for me it was a case of bad circuiting.
I was having this problem too, x86 didn’t work (permission denied). I removed the Wemos from the breadboard, reconnected USB and then it started flashing, so might be something to the header pins suggestion.