Hi,
It's been a while since the serial port via the Arduino Cloud Editor no longer works for me. The message is to check your connection. The connection is ok because I can upload sketches. If I use the local Arduino IDE it works instead so I find myself using both platforms. My MCU is LOLIND32 ESP32 and the cable is microusb. It worked fine until two months ago.
Thanks
Alessio
Any chance that an other application (e.g. the serial monitor in the IDE) is still keeping the port open?
It's the only thing I can think of; I'm not a cloud user.
no i check it, i tryed also on laptop without IDE installed and Cloud agent is updated.
Thanks
Hi @presidente75.
Where are you seeing the message? Are you seeing it in Arduino Cloud Editor itself, or in the window of the Arduino Cloud Editor Serial Monitor?
The issue is on the Arduino Cloud Editor. See the image, on the serial moniotr the port it is disconnected but on the cloud editor it is connected and I can load the sketches...
if I try to connect an Arduino mkr1010 wifi it works!
Thanks for the information. The problem is clear to me now.
I do need a bit more information:
Which operating system are you are using (e.g., "Windows")?
Which USB to serial bridge chip does your ESP32 board have? This is a black chip near the USB socket.
The chip will usually be identified by writing on the top. This might say something like "WCH CH340G" or "SILABS CP2102".
Examples:
WCH CH340
Silicon Labs CP2102
If it isn't clear, alternatively you can provide the link to where you bought the board from and we'll see if we can determine the chip from the product listing.
I read
WCH CH340C
Operating System Windows 10
Thanks
There is an incompatibility between the latest version of the CH340 driver and the Arduino Cloud Agent application that handles the serial port communication between the Serial Monitor and the board.
Until the bug is resolved, I can suggest the workaround of rolling back to a previous version of the CH340 driver. I found that Serial Monitor works perfectly when I am using that version of the driver.
- Close the Serial Monitor window if it is still open.
- Click the following link to download the previous version of the driver from the chip manufacturer's website:
https://www.wch-ic.com/downloads/file/65.html?time=2023-03-16%2022:57:59 - 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 open. 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.
The dialog will close. - Click the X icon at the top right of the "DriverSetup(X64)" dialog
The dialog will close. - 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 "Driver" 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.
The dialog will close.
- 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.
The "Driver Package rollback" dialog will close. - Click the "Close" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
- Close the Device Manager window.
Now try opening Serial Monitor again, just as you did before. Hopefully this time it will work as expected.
Please let me know if you have any questions or problems while following those instructions.
The Arduino developers are tracking this issue here:
If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:
Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.
thanks i will try the trick!
Hi,
I have the same problem since last week. I tried the suggested solution, but i had the message:
"The best drivers are already installed"
Can you please provide the alternative instruction in this case?
Much appreciated!
Hi @val75. I have found that when the driver installation gets into this state, it can be solved by uninstalling and then reinstalling the drivers. After that, the "roll back" option should be enabled.
I'll provide instructions you can follow to do that:
- 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 "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
- Click the "Uninstall Device" button.
The "Uninstall Device" dialog will open. - Check the box next to "β Attempt to remove the driver for this device.".
- Click the "Uninstall" button.
The "Uninstall Device" and "USB-SERIAL CH340 (COMn) Properties" dialogs will close. - Disconnect the USB cable of the Arduino board from your computer.
- Reconnect the USB cable of the Arduino board to your computer.
- Wait for the "USB-SERIAL CH340 (COMn)" device to appear under the "Ports (COM & LPT)" section of the Device Manager tree.
This will take a couple of minutes as Windows must first automatically reinstall the driver.
It might appear first as a "USB2.0-Serial" device under the "Other devices section of the tree. Just wait for a little longer and it will appear in its final place under the "Ports (COM & LPT)" section.
- Click the following link to download the previous version of the driver from the chip manufacturer's website:
https://www.wch-ic.com/downloads/file/65.html?time=2023-03-16%2022:57:59 - 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 open. 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.
The dialog will close. - Click the X icon at the top right of the "DriverSetup(X64)" dialog.
The dialog will close. - Switch back to the Windows "Device Manager".
- Double click on the "USB-SERIAL CH340 (COMn)" device under the "Ports (COM & LPT)" section.
The "USB-SERIAL CH340 (COMn) Properties" dialog will open. - Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
- 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.
- Click the "Close" button in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
The dialog will close. - 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.
The "Driver Package rollback" dialog will close. - 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 "can't set com-state
" error during the sketch upload.
Hi @ptillisch,
Thanks for you help! I followed your instructions and it worked.
Thanks
This worked thanks!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.