I'm trying to connect my Arduino Uno to the IDE, but it wont work. In the serial monitor it says "Could not connect to COM11 serial port". I tried different cables, an Arduino Nano, different ports, other IDE versions. When I tried it on a laptop it worked, but it's not working on my PC.
Can someone help?
Hi @gerardasst.
Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About (or Arduino IDE > About Arduino IDE for macOS users) dialog.
I ask for this information because I want to give you the appropriate instructions for the IDE version you are using.
Is that the full text of the message?
I ask because there is a specific error message shown by Arduino IDE 2.x that has a known cause:
Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM11 serial port.
Hey @ptillisch ,
The Arduino IDE version i use is 2.2.1 and here is the error screenshot:
OK, great. There were some previous reports of this "Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM3 serial port.
" error occurring specifically when Serial Monitor is opened in Arduino IDE while the port of a board that uses the WCH CH340 USB chip (and apparently only specific batches of those chips). The problem only occurs when using the latest version of the CH340 driver.
You might also notice that attempting to upload a sketch to the board fails with a "can't set com-state for ...
" error message.
The affected users have reported that doing a "roll back" to an older version of the driver was an effective workaround. You can give that a try.
I'll provide instructions:
- Open this tutorial from SparkFun in your browser:
https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all#drivers-if-you-need-them
ⓘ We are using this tutorial as a source for an older version of the CH340 drivers. Generally I recommend only obtaining drivers from the manufacturer of the device, but WCH does not provide older versions of their drivers and SparkFun is trustworthy. - Click the "Windows (EXE)" link you see in red under the "Drivers (If You Need Them)" section of the tutorial.
- Wait for the download to finish.
- Run the downloaded
CH341SER.EXE
file. - A "User Account Control" dialog may now appear asking "Do you want to allow this app to make changes to your device?". Click the "Yes" button.
- A "DriverSetup(X64)" dialog will appear. Click the "INSTALL" button in the dialog.
- Wait for the driver installation to finish, as indicated by the appearance of a "Driver install success!" dialog.
- Click the "OK" button in the "Driver install success!" dialog.
- Click the X icon at the top right of the "DriverSetup(X64)" dialog to close it.
- Close Arduino IDE if it is running.
- Connect the Arduino board to your computer with a USB cable.
- Open the Windows Device Manager.
- Select View > Devices by type from the Device Manager menus.
- Open the "View" menu.
- If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
- Open the "Ports (COM & LPT)" section of the Device Manager tree.
- You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
The "USB-SERIAL CH340 (COMn) Properties" dialog will open. - Select the "Drivers" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
- You will see a "Roll Back Driver" button in the dialog. If it is not clickable, perform the following instructions:
- Click the "Update driver" button.
An "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog will open. - Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
- You should now see the driver installation wizard update the driver. Wait for the update to finish, as indicated by the message "Windows has successfully updated your drivers" in the dialog.
It is possible you will instead see the message "The best drivers are already installed". If so, please stop following the instructions here and reply on the forum thread to let me know. I'll provide alternative instructions you can follow. - Click the "Close" button in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
- Click the "Update driver" button.
- Click the "Roll Back Driver" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
The "Driver Package rollback" dialog will open. - Click the radio button next to "My apps don't work with this driver" in the "Driver Package rollback" dialog .
- Click the "Yes" button.
- Click the "Close" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
Now start Arduino IDE again and repeat whatever you were doing before when you encountered that error before. Hopefully this time you will not encounter that "Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM3 serial port.
" error or a "can't set com-state
" error during the sketch upload.
I tried the steps, but it says that the best drivers are already installed.
I'm going to ask you to provide some additional information that might help us to understand how to proceed.
Please do this:
- Connect the Arduino board to your computer with a USB cable.
- Open the Windows Device Manager.
- Select View > Devices by type from the Device Manager menus.
- Open the "View" menu.
- If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
- Open the "Ports (COM & LPT)" section of the Device Manager tree.
- You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
The "USB-SERIAL CH340 (COMn) Properties" dialog will open. - Select the "Drivers" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
Now please reply here on the forum thread to tell us the version number you saw after "Driver Version" field in that "USB-SERIAL CH340 (COMn) Properties" dialog.
Well I have some good news, it randomly started working. When I installed the drivers it didn't work, but I tried it a bit later and randomly started working.
I'm glad it is working now. Thanks for taking the time to post an update!
Regards,
Per
5 posts were split to a new topic: ESP8266 resets unexpectedly: "rst cause:4, boot mode:(3,6)"
A post was split to a new topic: Upload fails: "not in sync: resp=0x00"
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.