Red Hat Bugzilla – Bug 1261040
ModemManager interferes with Arduino upload, udev rule necessary
Last modified: 2016-11-19 16:20:00 EST
Description of problem:
When trying to upload a 'sketch' to an Arduino Micro device the IDE automatically resets the device, then there is a small time window where the device accepts the upload. By default, ModemManager interferes and tries to find a modem at that serial port - such that the upload fails.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. open Arduino IDE, journal -fa
2. connect Arduino micro
3. upload a sample sketch
You see how the reset works (tty device re-emerges, LED blinks slowly).
Then the ModemManager engages:
ModemManager: <warn> (ttyACM0) could not open serial device (2)
ModemManager: <warn> (Plugin Manager) (Iridium) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device ttyACM0: No such file or directory'
ModemManager: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2': not supported by any plugin
During that time the Arduino IDE aborts with:
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 http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Upload should succeed, e.g. with something like:
Sketch uses 4,862 bytes (16%) of program storage space. Maximum is 28,672 bytes.
Global variables use 151 bytes (5%) of dynamic memory, leaving 2,409 bytes for local variables. Maximum is 2,560 bytes.
Telling ModemManager to ignore all Arduino devices via udev fixes the situation, e.g.:
# cat /etc/udev/rules.d/77-arduino.rules
# udevadm trigger
(snippet is from: http://starter-kit.nettigo.eu/2015/serial-port-busy-for-avrdude-on-ubuntu-with-arduino-leonardo-eth/ )
After that uploading works as expected.
Thus, it would be great if Fedora would include such a udev file.
Either as part of the arduino package, the avrdude package or even as part of the udev base rule set.
Related: The old bug #861620 is about a similar issue.
In that case the exception was added to ModemManager, i.e. to
The current bug is about another vendor string, though.
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 21 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Updating the bug as it's still relevant in F23
Same problem here.
Submitted upstream: https://bugs.freedesktop.org/show_bug.cgi?id=97093
libqmi-1.16.2-1.fc25 ModemManager-1.6.4-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d33ca7cd57
ModemManager-1.6.4-1.fc25, libqmi-1.16.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d33ca7cd57
ModemManager-1.6.4-1.fc25, libqmi-1.16.2-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.