Hello!
I recently got a NRF24L01 from wayintop and it came with 2 nano clones.
I tried using it like it said (using the old bootloader of the atmega328P) and it showed this:
(It's the blink exemple)
"C:\Users\\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM8" -b57600 -D "-Uflash:w:C:\Users\\AppData\Local\Temp\arduino\sketches\12EE38D2A30A72F02C4BE1D57C0B0946/Blink.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM8
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: ser_open(): can't set com-state for "\\.\COM8"
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
I did:
install the CH340 drivers
uninstalling the driver from the nano and reinstalling it
burn the bootloader with my uno
try a different cable
use the cloud editor and the arduino ide 1
use older versions of the AVR boards package
Now i'm here. It might be static damage but idk.
Have a great day!
disclaimer
Sorry for the ortographics errors. It's pretty late here.
And I know that there's already multiple posts about it but none resolved my problem.
That is not everything that you can try It's a driver issue and most people seem to be successful by rolling back the driver. Do a search on the forum for can't set com-state; I can't do that now.
That was an older technique that I found did not solve the problem for most users. I have since found a more reliable fix/workaround.
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.
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). Right 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 "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 "can't set com-state" error during the sketch upload.
btw while burning the bootloader I used the new one by accident (thinking it wouldn't work)
and now it uses the new one, so it works + it has a newer version of the bootloader .
thank you, I had same problem with new laptop and got pointed to this sollution. Problem solved for me as well.
Only difference, at first the drivers failed to install. I had to uninstall my drivers from device manager, then the (older) drivers installed with a message"drivers successfully preinstalled" or something to that effect.
figure I'd put that here for the next person with this problem
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.
This topic is specific to the "avrdude: ser_open(): can't set com-state for ..." error message:
The driver installation instructions here are only applicable to fixing that specific error message. They will not help at all with the "avrdude: stk500_recv(): programmer is not responding" error message, which has a completely different cause and solution.
Are you encountering a "avrdude: ser_open(): can't set com-state for ..." error message when attempting to upload?
OK, that is the version of the driver we want. Now please try uploading a sketch to your Arduino board again.
Hopefully the "can't set com-state ..." error will no longer occur.
If you still experience problems uploading (or if it comes back later), add a reply here on the forum thread to let us know and we'll try to provide further assistance.