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.

Join the Conversation


  1. The suggested command will not work because the shell redirect will not be run with sudo, only echo (which is pointless). Use thise instead:

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

  2. @Florian, You are completely right. I’m not sure how this old form was written…

  3. Be careful about using a cut-and-paste. You want to use the old-fashioned double quote (0x22) and not the right double quote (0x201D). Maybe this:

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

    1. Durn it… I think WordPress is missing with my double (and single) quotes…. Trying again.

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

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.