I am using Arduino Nano which I bought recently from an online shop. A friend of mine can upload the blinking code from his computer, but I keep getting error when uploading.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
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\X.....X\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: ser_open(): can't set com-state for "\.\COM3"
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
I have tried many things:
Reinstall driver manually from CH341.EXE
Remove device from device manager and let it instal the CH340 driver it self
Restart computer more than 5 times right now
Bought a spare cable and arduino nano for comparison (all the same...)
I already use the same setting which is using Old booter ATmega328p and programmer AndroidISP
if you select normal or "old bootloader" and can't upload then you use other Arduino as ArduinoAsISP programmer for uploading new bootloader and using normal or for uploading sketch
I already tried this method aswell. I even restart the laptop just in case. No luck.
Here is the last upload I tried:
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\X....X\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: ser_open(): can't set com-state for "\.\COM3"
When you select the board type look for Nano, and under processor select "AtMega328P Old bootloader" - you may need to find and download a library update for this.
I already selected Old booter and Arduino Nano as the board type. Also, it is a blink code from the example. So, I don't think it needed to download any library
I'm sorry to hear that. Some of the users who experienced these errors 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.
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 (COM_n_)" under the "Ports (COM & LPT)" section (where "COM_n_" is some serial port e.g., COM4). Right click on that item.
A context menu will open.
Select the "Drivers" tab of the "USB-SERIAL CH340 (COM_n_) Properties" dialog.
You will see a "Roll Back Driver" button in the dialog. If it is not clickable, perform the following instructions:
Select "Update driver" from the context menu.
An "Update Drivers Device - USB-SERIAL CH340 (COM_n_)" dialog will open.
Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COM_n_)" 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 (COM_n_)" dialog.
Click the "Roll Back Driver" button in the "USB-SERIAL CH340 (COM_n_) 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 (COM_n_) Properties" dialog.
Now start Arduino IDE again and repeat whatever you were doing before when you encountered that error. Please reply here to let us know whether the error still occurs.
I was thinking is it because of Windows 11? because my friend laptop is windows 10. Also, my fathers old computer works in windows 7 with Arduino 1.8.19 IDE with the same setting. And they both work, the file got uploaded so....... is it?
Have you tried uploading something to your board using your father´s old computer or your friend´s laptop?
I have recently bought 2 Nano clones that don´t need the "Old bootloader" stuff anymore. Just selecting Nano with regular bootloader was ok to both of them.
PS: The same store that sold me these 2 Nanos have another variant produced by Gravitech which uses a FTDI chip instead of the CH340. Your picture in post #1 doesn´t show the other side of the board. Are you sure your board has the CH340?
Well... same code which is just a blink code from the example (We already finished our project together using his laptop since mine is.... not usable). And yes, it was descripted on the store that it is ch340 and it is a clone.
Some of my friend also bought the arduino from this store aswell. They didn't have any problem. Well... most of them at least. Some the kids cannot upload the program like I did so... we borrow others working laptop.