Upload fails: avrdude: ser_open(): can't set com-state for "\\.\COM6"

Continuing the discussion from Failed uploading: uploading error: exit status 1:

didnt work for me

Global variables use 424 bytes (20%) of dynamic memory, leaving 1624 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\gaura\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\gaura\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM6" -b57600 -D "-Uflash:w:C:\Users\gaura\AppData\Local\Temp\arduino\sketches\136DC0CA53BBBA23D57A75937B2A593E/Snake.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\gaura\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: ser_open(): can't set com-state for "\\.\COM6"

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1```

What did not work for you?

Your problem does not seem to be related to the problem by OP.

See if Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM serial port - #49 by ptillisch solves your problem.

what?

What did not work for you?

i mean it doesnt upload after trying theese steps

ok bruh i have tried it earlier that link but it keeps showing that error

Can you please post more intelligent replies?

Which steps? Refer to a post number so we know what you're talking about.

You did not mention that so thanks for wasting my time.

does your arduino look like this (1):

or this (2):

and are you coding it using the online ide or the arudino ide app for a computer,

its a nano clone and im using an app

wlcm

1:

or 2:
Arduino Nano - Micro Center

Some causes of Exit Status 1 uploading error:

  • Arduino board is not connected properly
  • COM port is not selected
  • Right Arduino board is not selected
  • USB port of computer is not working
  • Using a USB mini charging cable instead of data cable
  • Serial COM port drivers missing.
  • Arduino Tx and Rx pins are under use by any other sensors
  • Outdated version of Arduino IDE
  • Wrong selection of COM port
  • In case of Arduino Nano using a new processor bootloader

I've got the same problem with the Arduino Uno (2),
I've already checked the Com-Port in the settings which is correct.
And the funny thing is it works with the same port & cable with 1 Board but 5 other boards don't work.

Hi @ardu1n0_098.

Just to make sure, when you say "same problem", do you mean that uploads are failing with the an "avrdude: ser_open(): can't set com-state for error message, like this?:

(of course, the COM port number could be different for you)

If so, did you try the fix linked to by @sterretje in post #2?

Yes. This is the detailed error message:

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\MINT\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM16
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: ser_open(): can't set com-state for "\.\COM16"

avrdude done. Thank you.

Fehlgeschlagenes Hochladen: Hochladefehler: exit status 1

Please answer the second question I asked in my previous reply:

I'm sorry. Didn't saw the 2nd question. I'll try to do that.

Thank you for your fast respond!

So the second image of the arduino will not work with a chromebook or just the online editor at all, the first image has a small chip next to the rx and tx lights on the board, and what that chip does is let the online browser see it as a device it can use. You can use the second arduino board for the IDE that you install on your computer. But only the first image works with the online IDE.

It might well be so for Chromebook (I don't have access to one or any knowledge about using Arduino Cloud with Chrome OS machines), but for PCs using other operating systems there is no problem using the cheap derivative boards with a general purpose USB to serial bridge chip like the one shown in the second image you shared.

I'll provide instructions for configuring Arduino Cloud for use with that type of board:

  1. Start Arduino Create Agent if it is not already running.
  2. Open a sketch in Arduino Cloud Editor.
  3. Connect the board to your computer with a USB cable.
  4. Click "SELECT DEVICE" on the Cloud Editor toolbar.
    The "Select device" dialog will open.
  5. You will see the serial port of your board in the dialog, labeled "Unknown", click on it.
    The "Unknown Device Found" dialog will open.
  6. Search through the list of boards in the dialog until you find the name of your board (or of a functionally equivalent board, which in this example would be "Arduino Uno"). Click on it.
    The dialog will close.

You can now compile, upload and use Serial Monitor in Arduino Cloud Editor with your board.

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