I don’t have it in front of me, but IIRC, it was COM3
On my laptop I’m getting the error:
avrdude: ser_open(): can't open device "\\.\COM1": The system cannot find the file specified.
whereas on my desktop I’m getting the error:
avrdude: ser_open(): can't set com-state for "\\.\COM5"
I suspect the two issues are related.
Neither using a new usb cable nor disabling my windows firewall helped. I didn’t really expect that to be the solution anyway.
Now that I know the windows firewall touches serial ports, this “feels” like the kind of thing that might need a reboot after toggling the firewall. Not that I really expect that to help.
@Javaru does
Arduino Nano - "avrdude: ser_open():system can't open device "\\.\COM1": the system cannot find the file specified" - Stack Overflow fix the laptop issue? (And by fix, I suspect I mean “make it behave like your desktop”)
It shouldn’t need a reboot. For my Robotics team, the software that flashes the robot’s firmware requires the Windows Firewall to be disabled. We are able to toggle it off, flash, then toggle it back on without a reboot.
EDIT: It too uses USB for COM.
Unfortunately not. I had already tried to change COM ports that way. You do have to reboot after that change otherwise you get a Java error (Arduino IDE is written in Java) about the port not being valid. Changing a COM port does seem like something that would require a reboot after. After the reboot, the same old avrdude: ser_open(): can’t open device “\.\COM1”: The system cannot find the file specified
happens regardless of which COM port I’m on (I tried 3 different ones)
You’re right, it didn’t help, but it was worth a try.
@jesse - is your windows firewall disabled? If you installed all the latest patches, it should be enabled by default. So if it’s on for you, and you can flash, we know that it likely isn’t that. It’s also on by default in Windows 10 where folks aren’t having issues.
To check the status, open the Windows Control Panel, and open Windows Firewall. If you are in “Category” view, it’s under “System and Security”. It’s pretty obvious if it’s on (green) of off (red):
@javaru - I’m far from the windows box at the moment, but should be able to try tonight.
I was wondering what’d happen if I compiled the firmware using Arduino, but flashed iusing avrdude directly from the command line. Arduino logs the avrdude and command line arguments to its output window, so I just copy pasted it into a cmd. I expected to get the same error message I always get, but I got a “programmer not responding” error instead. Dunno what it means. Working on my laptop now, that’s why its a different COM port this time.
C:\Windows\System32>“C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdu
de” -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -p
atmega32u4 -cavr109 -PCOM3 -b57600 -D -Uflash:w:C:\Users\UTC-BN~1\AppData\Local
Temp\arduino_build_9313/Model01-Firmware.ino.hex:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM3
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page
Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- —
eeprom 65 20 4 0 no 1024 4 0 9000 90
00 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 45
00 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 90
00 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0
0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0
0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
^C
Were you holding down the ‘prog’ key when you did this?
Yes of course. Tried it a few times with a different timing as well.
As near as I can tell, that occurs when avrdude doesn’t even see the Model 01 on the COM port. For example, If in the Arduino IDE I the port from “COM5 (keyboardio Model 01)” to “COM1” I get that error. You’ll also get the error if you try to flash and the model 01 isn’t even plugged into the PC (I did that as an experiment to see what the error would be.) For me, it takes a while before the programmer not responding
error comes up. So it’s seems like a timeout. Whereas the ser_open()
occurs quickly. To me that seems to indicate that with the ser_open()
errors, it’s at least “finding” the Model 01, but failing to open the connection.
If you have a serial terminal app for windows, can you try opening the port with that?
Mine is also the 64 bit version, I don’t think I’ve got the windows firewall enabled bit will check when I get home in a couple hours. One thing I noticed was the device switching in device manager from COM7 to COM8 when I forced the bootloader mode. I want to try flashing using avrdude and COM8 from the command line.
It shows that I’m connected. Not sure what commands I can send. Tried some old standbys like ?
, ver
, version
and help
, but I get no response at all
If you hold in Prog when connecting the keyboard and -then- connect, you should get a string.
The base firmware only uses the serial port for triggering a reset
When I do that, Windows assigns it to a different COM port (COM6 in my case) than what it is on normally (COM5 in my case). It’s only there for a few seconds before going away. With my preferred terminal, I can’t connect quickly enough. Another one I have will wait for a port (it’s a shame the other one does not have that capability as it is otherwise a much better terminal). The second one appears to connect, but I don’t get a string.
Does the COM port go away at the same time the prog key stops glowing red?
(And yeah, I’d expect the port number to change as the bootloader is technically a different USB device id)