Serial port busy for avrdude on Ubuntu with Arduino Leonardo Eth

Arduino Leonardo Eth

Doing test with new Arduino Leonardo ETH on Ubuntu (14.04) we had problem with programming this board:

avrdude: ser_open(): can't open device "/dev/ttyACM0": Device or resource busy avrdude: ser_send(): write error: Bad file descriptor Problem uploading to board. See for suggestions.

On Ubuntu (or other distro with ModemManager) ModemManager tries to connect to each new serial port. MM tries if this serial port is GSM modem. This is very convenient for most users, but it keeps serial port open, and Arduino IDE can not communicate with Arduino Leonardo. There is a list of ignored devices by ModemManager, but for now most Arduinos from are not included.

What to do? Just add own rule telling ModemManger to ignore all USB devices from Open new terminal (Ctrl+Alt+T) and issue command:

sudo echo 'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"' > /etc/udev/rules.d/77-arduino.rules

echo ‘ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"‘ | sudo tee /etc/udev/rules.d/77-arduino.rules

As noted in comments, there should be other form used, first one won’t work – will not write rule into file, will return Permission denided, thus this update

next You have to reload rules:

sudo udevadm trigger

That’s all.