Upload to Nano fails: "avrdude: ser_open(): can't set com-state for"

I have some Nano's I was using fine, but now a number of them are being rejected by the IDE

The message I get is avrdude: ser_open(): can't set com-state for "\\.\COM3" Failed uploading: uploading error: exit status 1

When I try the same Nanos on another PC they work fine, although the other PC I did not let it upgrade IDE on start

I made sure I used known good USB cables, I plugged into the same USB port on the PC, and tried different USB sockets on the PC, all that changes is the port number but I continue to get rejections.

Is this a known issue?

EDIT

A reboot didn't fix it

Version 2.3.4 installed

Assuming you have clone Nanos with CH340 you will have to roll back the driver. You can fin instructions here: Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM serial port - #49 by ptillisch

Thanks, will give that a go!

Are you able to download the driver? Every attempt I have, with different browsers have hung just over halfway

This is on my PC; I do not know the version for sure.

CH341SER.zip (583.1 KB)

Run a virus scanner over it; it should be OK but better safe than sorry.

thanks, appreciated!

Unfortunately that didn't work - I no longer get the comms error, but now whichever bootloader I use I get this message. The Nano I was testing is the ATmega328p (old bootloader type)

Sketch uses 3560 bytes (11%) of program storage space. Maximum is 30720 bytes.
Global variables use 446 bytes (21%) of dynamic memory, leaving 1602 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x98
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x06
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe6
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x98
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x06
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe6
Failed uploading: uploading error: exit status 1

Do you have the serial monitor view or the plotter window open? Maybe you can try the Workaround section from here: "Access is denied" error when uploading to board w/ FT232 USB chip with Serial Monitor/Plotter open · Issue #1783 · arduino/arduino-ide · GitHub.

I just tried it again with another Nano that wasn't previously working (same type) and that seemed to go fine, so it has resurrected that one but the one that still won't load will on the other PC. Bizarre...

Let me try the latest suggestion

The original error has returned.

I think for the time being I may have to accept that I can't use this PC for certain Nanos, at least I do have a PC I can use them with though

Which probably means that Windows updated the driver again. I did write a slightly different approach in Sudden Issue: BSODs on 4 Different Laptops Using Arduino Mega (CH341) in Classroom Today (First Time in 3 Months) - #13 by sterretje.

Once you followed those steps and you connected the board, Windows will update to the latest driver that it knows about (and does not work for you). But you can now roll back the driver (I did forget to mention that in that topic) and tell Windows that the current driver does not work on your current system.

To check which drivers are available you can click the update driver button as described in the linked post, select Let me pick from a list of available drivers on my computer; in the linked post there are three (don't ask me why), I currently have two.

You can roll back using the roll back button in the first image. Windows will ask you why you want to roll back. Tick the appropriate option and click Yes.

Windows will have rolled back the driver and should no longer update it automatically.

PS
The 2022/01/18 is the driver that I gave you earlier.

Thanks, let me try that

Thanks once more for the help