When i try to upload any code into my Arduino Nano (2 years old) it says this error in output:
Sketch uses 3786 bytes (26%) of program storage space. Maximum is 14336 bytes.
Global variables use 218 bytes (21%) of dynamic memory, leaving 806 bytes for local variables. Maximum is 1024 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xaa
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xaa
Failed uploading: uploading error: exit status 1
i tried it still error
(i had same problem when i first buy the nano so i changed processor into ATmega328P Old bootloader then it worked but now it doesnt work)
Hi @cinaxoffical. I'm going to ask you to provide the full verbose output from an upload attempt.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
The "Preferences" dialog will close.
Attempt an upload, as you did before.
Wait for the upload to fail.
You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
This "can't set com-state for ..." error occurs when uploading to the boards that use specific batches of the WCH CH340 USB chip. The problem only occurs when using the latest version of the CH340 driver.
The workaround for the problem is to perform a "roll back" to an older version of the driver that is compatible with these problematic "CH340" chips. I'll provide instructions you can follow to do that:
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 topic 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 "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.
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.
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.
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 @klumpy7. I'm going to ask you to provide the full verbose output from an upload attempt.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
The "Preferences" dialog will close.
Attempt an upload, as you did before.
Wait for the upload to fail.
You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
Open a reply here on this forum topic by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Here is the error I get when uploading any code. I am using the Blink Example for this exercise. IT may also be worth mentioning that Arduino IDE does not automatically recognize my Nano. I have tried all the different Processors and most of the Programmer settings. Get Board Info isn't super helpful, and returns this:
Ok, thank you for the reply! The port /dev/cu.usbserial-110 appears and disappears immediately upon plugging and unplugging the nano. I have seen it (rarely!) come up as /dev/cu.usbserial-210 as well, but usually it's 110. I also have a Bluno nano V1.3 by DFRobot, and it works very well. It shows up as /dev/cu.usbmodem-1101.
You mentioned that you tried different processors.
This indicates the "new" bootloader. Please verify (again) that the "old bootloader" does not work.
Please take clear photos of the top and the bottom of the board and post them here; you can drag and drop them (but might need two posts). We should be able to read the print in the ICs (CH340 (according to the VID/PID) at the bottom, 328P on the top).