avrdude: ser_open(): can't open device
Arduino Microcontroller Board
Severity: MinorWhat it means
Arduino IDE, while uploading: avrdude: ser_open(): can't open device, followed by the port and a reason.
No such file or directory: Arduino says the board on that port was disconnected or moved to a different port.
Device or resource busy, Resource busy, or access is denied: another program is holding the port.
Permission denied: on Linux, your user account lacks the permissions for serial ports.
Affected Models
- Arduino IDE 2
- Arduino IDE 1.8
How to Fix It
-
Check Tools > Port. Unplugging and replugging can give the board a new port, so pick it again.
On Windows you can set a fixed port number for the board so it stops moving.
-
Busy or access denied? Close other Arduino IDE windows, serial monitors and other software that may be using the port, then restart the computer.
-
Still busy after a restart? Arduino's way on Windows: find the port's device in Device Manager, then search for it in Microsoft's Process Explorer (Find > Find Handle or DLL) to see which program holds it.
If that program starts with Windows, Arduino suggests checking your startup apps.
-
Permission denied on Linux? Add yourself to the dialout group: sudo usermod -a -G dialout <username>, then restart the computer.
Arduino: if the group isn't found, it may have a different name on your system.