Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute script esptool the selected serial port Failed to execute script esptool does not exist or your board is not connected #1137

Closed
Abdulaziz95 opened this issue Feb 21, 2018 · 9 comments

Comments

@Abdulaziz95
Copy link

@Abdulaziz95 Abdulaziz95 commented Feb 21, 2018

Hardware:

Board: ?ESP32 Dev Module?
Core Installation/update date: ?11/jul/2017?
IDE name: ?Arduino IDE? ?Platform.io? ?IDF component?
Flash Frequency: ?40Mhz?
Upload Speed: ?115200?

Description:

Error when compiling a code to the microcontroller
this is the error message:

esptool.py v2.1
Traceback (most recent call last):
File "esptool.py", line 2524, in
File "esptool.py", line 2517, in main
File "esptool.py", line 2246, in main
File "esptool.py", line 177, in init
File "site-packages\serial_init
.py", line 88, in serial_for_url
File "site-packages\serial\serialwin32.py", line 62, in open
serial.serialutil.SerialException: could not open port 'COM8': WindowsError(2, 'The system cannot find the file specified.')
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected

Sketch:

#define led 2

void setup () {
pinMode(led, OUTPUT);
}

void loop () {
digitalWrite (led, HIGH);
delay(500);
digitalWrite(led, LOW);
delay(500);
}

Debug Messages:

Enable Core debug level: Debug on tools menu of Arduino IDE, then put the serial output here 
@lbernstone

This comment has been minimized.

Copy link
Contributor

@lbernstone lbernstone commented Feb 21, 2018

@Abdulaziz95

This comment has been minimized.

Copy link
Author

@Abdulaziz95 Abdulaziz95 commented Feb 23, 2018

I tried that, nothing worked.
also in the Arduino IDE I can't select
port
tools > port
it is in gray color

@beegee-tokyo

This comment has been minimized.

Copy link
Contributor

@beegee-tokyo beegee-tokyo commented Feb 23, 2018

I am guessing you are on Windows????

  • When you plug in your ESP32 to your PC, do you hear a sound? If not, try a different USB cable.
  • Does Windows say anything about installing drivers failed? You might need to manually install the drivers.
  • If you open the device manager of windows are there any USB devices listed (after you plugged in the ESP32) that have no drivers installed? Then you most likely need to manually install FTDI (USBtoSerial) drivers.
  • I needed to install separate drivers for the onboard USB of my ESP32. In my case it was for a CP2102 chip. You can find the drivers here: ESP32.net.
  • Did you try to use a different USB cable?

And last, some ESP32 boards need to be set manually into bootloader mode. On my board that would be pressing the RESET button and keep it hold, then press the USR button and keep it hold, then release the RESET button, then release the USR button. Might be different for your board.

@Abdulaziz95

This comment has been minimized.

Copy link
Author

@Abdulaziz95 Abdulaziz95 commented Feb 26, 2018

Thank you,,,
The problem was the driver CP210x is missing
and the cable wasn't good, even though I tried 4 or 5 different cables and finally I got one working.

Issue Solved

@beegee-tokyo

This comment has been minimized.

Copy link
Contributor

@beegee-tokyo beegee-tokyo commented Feb 26, 2018

Glad I could help.
Please push the CLOSE button for this issue.

@Shirola

This comment has been minimized.

Copy link

@Shirola Shirola commented Mar 8, 2018

Also, if you working on a laptop, make sure it is on full performance and plugged in.

@copercini copercini closed this Mar 8, 2018
@glkeeney1951

This comment has been minimized.

Copy link

@glkeeney1951 glkeeney1951 commented Apr 4, 2018

Holding down the "Boot" button on my ESP-WROOM-32 while the Arduino IDE download the program worked. After the download I had to push the "EN" button to run the program. It did NOT start on it's own.

@thedim-witted

This comment has been minimized.

Copy link

@thedim-witted thedim-witted commented May 13, 2019

Hey, anyone here? I have a similar issue but unlike this one, I can select my COM Port and the drivers are also up to date. However, what I am finding out of place is that in the COM Port list I am getting some 17 options for COM1 even though nothing else is connected to the laptop. Any ideas?

@rohithvishaal

This comment has been minimized.

Copy link

@rohithvishaal rohithvishaal commented May 22, 2019

Hey, anyone here? I have a similar issue but unlike this one, I can select my COM Port and the drivers are also up to date. However, what I am finding out of place is that in the COM Port list I am getting some 17 options for COM1 even though nothing else is connected to the laptop. Any ideas?

you can get those COM port options in Device Manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.