Can't open device "\\.\COM3"

Hello, I am currently working on a project that uses an Arduino Nano to read various sensors and control a servo. This project was going well and I had successfully tested the entire system on my breadboard. I then moved on to soldering the system to a more permanent configuration on a protoboard. I double-checked that my Nano was good by pushing a few sketches to it before soldering the header pins into the protoboard along with the rest of the components needed for the project. I then attempted to push code to the board for final system testing and was met with "avrdude: ser_open(): can't open device "\.\COM3": The system cannot find the file specified.".

here is the kicker this error only occurs when I attempt to upload code from my laptop as I was able to push code from other devices just fine, and my laptop can still push code to other near identical Nano boards just fine.

I have checked that I have the right comm (COM 3) port and board (Arduino Nano atmega328p, old bootloader) selected.

I have attempted to reinstall the Arduino IDE (2.04) 3 times

I even did a full reinstall of Windows(11).

but still, when I try to push code from my laptop to that specific nano I get that error.

I have spent the last 3 days trying to figure this out and this is my cry for help!

*oh I forgot to add my laptop is a Surface 4 that was purchased this year.
and the board had this driver (USB-SERIAL CH340)

Have you got a way of powering the nano separately whilst it is plugged into the programming PC? I have had issues with not enough power being given by the programming PC. Sometimes because of the PC, other times because the wire being used isn't great

It's definitely worth a try.

here is the verbose output.

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\korko\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

unfortunately this did not work

Have you tried using the Arduino cloud ide?

I couldn't get cloud to work before I broke the board.

Tbh I'm probably going to desolder the board and add female header pins instead

As far as I understand it, the Nano is on headers and can easily be removed. Did you take the Nano out of the PCB? Does it still work when you do that?

Double and triple check the PCB; you might have a short or bad soldering somewhere. Double check the Nano if all the headers are still OK and properly soldered.

How is your setup (PC and Nano) powered? A schematic diagram (photo of handdrawn is fine) would be useful; add all connections including every power and GND.

Is that when those Nanos are in the circuit?


Right now the board is soldered into the board by the male header pins. I want to remove them and add female headers instead so it is more simple to replace the board.

And no I have not tried to put a different nano into the system because it is hard to replace the nano.

It's normally powder by the cable plugged into the computers USB port but I also tried pushing when it was being powered by a separate 5v supply from a charger brick.

Hi,
DON'T solder the header pins! use a socket made up from a single strip cut to size 2 x 30, this way it;s easy to replace the Nano, and your not likely to "COOK it" soldering.

Have you got the right USB drivers installed? Nano's and clones use a lest 2 drivers that I know of.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.