Go Down

Topic: Pro Micro problems with Ubuntu 13.10 (Read 7569 times) previous topic - next topic


Hi all, could do with some help please.

Have been using my Nano 3 with Arduino 1.0.1 on Ubuntu 13.10 very successfully now for some time. Device appears as /dev/ttyUSB0. Sketch upload takes 6 secs for a 10K sketch. Serial Monitor works great at various speeds.

Have just purchased my first Pro Micro and have been trying to get the blink sketch running with no success.

Downloaded the add-on files from the Sparkfun site and saved to my Hardware folder.

Selected Pro Micro 5V/16MHz as the board and /dev/ttyACM0 as the serial port.

Loaded up the Blink sketch and set it to blink on pin 9 (have also tried 10).

Pressed Upload. There is some blinking of the RX and TX LEDs on the Pro Micro, but not as furious as I am used to from the Nano, and periods with no flashing going on at all. After around 10s, I get the "Done Uploading" message. My LED attached to pin 9 does nothing.

Tried adding lines to the sketch to send something to the PC (Serial.Begin(), Serial.println). Again, sketch claims to have uploaded OK. Tried to view Serial Monitor and got "Error opening serial port /dev/ACM0" and also this:

Code: [Select]
processing.app.SerialException: Error opening serial port '/dev/ttyACM0'.
at processing.app.Serial.<init>(Serial.java:178)
at processing.app.Serial.<init>(Serial.java:92)
at processing.app.SerialMonitor.openSerialPort(SerialMonitor.java:207)
at processing.app.Editor.handleSerial(Editor.java:2447)
at processing.app.Editor$17.actionPerformed(Editor.java:665)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:213)
at processing.app.Serial.<init>(Serial.java:163)
... 42 more

Once this error has happened, if I unplug and re-connect the USB cable, the device then appears as /dev/ttyACM1, 2, 3... The symptoms are the same.

Also tried using "cat /dev/ttyACM0" from a terminal to view any data from the Pro Micro. No error messages, no data either. This works fine with my Nano (/dev/ttyUSB0).

I have read about problems with a service running on Ubuntu called ModemManager, so created the following udev rule file (/etc/udev/rules.d/77-mm-usb-device-blacklist.rules):

Code: [Select]
# Arduino Pro Micro USB
ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9206", ENV{ID_MM_DEVICE_IGNORE}="1"

Then restarted the PC. This does not seem to have made any difference.

This is what lsusb shows:
Code: [Select]
Bus 002 Device 003: ID 05e3:070e Genesys Logic, Inc. USB 2.0 Card Reader
Bus 003 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 004 Device 002: ID 1241:1111 Belkin Mouse
Bus 004 Device 003: ID 04d9:a02e Holtek Semiconductor, Inc.
Bus 006 Device 008: ID 1b4f:9206 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

It is the "Bus 006 Device 008: ID 1b4f:9206  " that appears when the Pro Micro is plugged in.

Any suggestions what to try next please?




Resolved (mostly)!

Here's the paragraph I read several times but not carefully enough, from the Sparkfun troubleshooting page:

All SparkFun ATmega32U4 boards share the same VID - 0x1B4F, and they all have unique PIDs. 5V Pro Micros lay claim to PIDs 0x9205 and 0x9206 (one for the bootloader, one for the sketch). 3.3V Pro Micros will show up as 0x9203 and 0x9204 for bootloader and sketch, respectively. And the Fio v3 has 0xF100 and 0xF101.

So my udev rules file should have looked like this:

Code: [Select]
# Arduino Pro Micro USB
ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9206", ENV{ID_MM_DEVICE_IGNORE}="1"

i.e. entries for two product IDs corresponding to the bootloader and sketch.

Sketch upload now working. LED blinking.

However, I still get that error message when I try to use Serial Monitor.

I can however, see the serial data from a terminal window using "cat /dev/ttyACM0" or "screen /dev/ttyACM0"

Any ideas on getting Serial Monitor working please?



Many people simply remove modem-manager, it can be reinstalled if the removal causes problems. Uploading to a Leonardo often (always?) results in Linux re-enumerating the serial port. Check the port menu and see if a new port has appeared before opening the serial monitor.

Go Up