DefProc

Sparkfun Pro Micro ‘Serial Device Busy’

When I first started using them, I did have a little trouble uploading code to the Sparkfun Pro Micro, under Ubuntu 14.04LTS, using the Arduino IDE 1.6.8.

The Pro Micro board definitions were installed as detailed in the Sparkfun guide for linux but the board just gave the same error every time I tried to upload:

Copy to Clipboard

A little googling did suggest that modemmanager might be capturing that particular serial device and while I was unhappy with the idea of just uninstalling modemmanager as a way of solving it (I’m assuming that it’s normally useful when using modems!), I did also find a suggested way of stopping modemmanager from interfering in specific arduino devices.

Although this didn’t work directly, I did find enough information in checking if this was the problem to confirm that it was definitely modemmanager that was at fault.

By running: tail -f /var/log/syslog while plugging in the Pro-Micro, I could see the culprit capturing the device:

Copy to Clipboard

So although ModemManger was unable to understand the device, it was still happy to hold on to it, an keep the serial port busy.

Fortunately, the syslog nicely contains the idVendor required to tell ModemManger to ignore it, so adding the line: ATTRS{idVendor}=="1b4f", ENV{ID_MM_DEVICE_IGNORE}="1" in the correct position in the udev rules will do that.

1b4f is the vendor ID for Sparkfun, so this setting will apply to any USB device from them.

Run:

Copy to Clipboard

to append that entry to the arduino.rules file (if it exists) and run:

Copy to Clipboard

to re-read the rules.

Then plugging in the Sparkfun board and watching the syslog should show nothing beyond the mtp-probe lines, and specifically nothing from ModemManager. Job done.

Share This Story, Choose Your Platform!

Exit mobile version