Go Down

Topic: Problem with uploading to the Leonardo on Fedora 17 (Read 4856 times) previous topic - next topic

Mebus

Nov 01, 2012, 11:16 am Last Edit: Nov 01, 2012, 12:41 pm by Mebus Reason: 1
Hi!

I recently bought a Arduino Leonardo board.

I am now trying to upload programs with the Arduino IDE (1.0.1) on Fedora 17, 64bit.

When I plug it in, dmesg reports this:

Code: [Select]

[144825.697050] usb 3-1: new full-speed USB device number 14 using uhci_hcd
[144825.870055] usb 3-1: New USB device found, idVendor=2341, idProduct=0036
[144825.870059] usb 3-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[144825.870061] usb 3-1: Product: Arduino Leonardo
[144825.870063] usb 3-1: Manufacturer: Arduino LLC
[144825.873088] cdc_acm 3-1:1.0: ttyACM1: USB ACM device
[144833.526083] usb 3-1: USB disconnect, device number 14
[144833.737054] usb 3-1: new full-speed USB device number 15 using uhci_hcd
[144833.899134] usb 3-1: New USB device found, idVendor=2341, idProduct=8036
[144833.899138] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[144833.899140] usb 3-1: Product: Arduino Leonardo
[144833.899142] usb 3-1: Manufacturer: Arduino LLC
[144833.902167] cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
[144833.902187] cdc_acm 3-1:1.0: ttyACM1: USB ACM device
[144833.909194] input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.2/input/input23
[144833.909565] hid-generic 0003:2341:8036.000A: input,hidraw3: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:1a.0-1/input2


In the IDE I chose /dev/ttyACM1 as serial port. I guess, that's correct.

When I open the seriel monitor in the IDE, it reseivces "TESTATA" on this port.

BUT, if I try to upload my program, I get this error:

Code: [Select]

processing.app.debug.RunnerException: Couldn't find a Leonardo on the selected port. Check that you have the correct port selected.  If it is correct, try pressing the board's reset button after initiating the upload.
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:150)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1706)
at processing.app.Sketch.exportApplet(Sketch.java:1662)
at processing.app.Sketch.exportApplet(Sketch.java:1634)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2373)
at java.lang.Thread.run(Thread.java:722)


I found that someone here:

http://arduino.cc/forum/index.php?topic=127009.0

Has the same problem, but also didn't find a solution.

I also downloaded the Arduino IDE from the Arduino website and tried to it with it, but it also reported this error:

Code: [Select]
processing.app.debug.RunnerException: Couldn't find a Leonardo on the selected port. Check that you have the correct port selected.  If it is correct, try pressing the board's reset button after initiating the upload.
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:150)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1706)
at processing.app.Sketch.exportApplet(Sketch.java:1662)
at processing.app.Sketch.exportApplet(Sketch.java:1634)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2346)
at java.lang.Thread.run(Thread.java:722)


Could this be a udev problem? Because it seems to connect as a Mouse.

What am I doing wrong?

Thanks

Kind regards

Mebus


Mebus

I think the problem is, that it first connects correctly as

cdc_acm 3-1:1.0: ttyACM0: USB ACM device

but then after a few seconds:

get's recongnized has HID device:

[  322.722263] input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.2/input/input17
[  322.722609] hid-generic 0003:2341:8036.0005: input,hidraw3: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:1a.0-1/input2

Does anyone know how to fix this in udev or so?

Mebus


Mebus

I tested it on Ubuntu on the same laptop and there I could upload the program, but dmesg also showed this:

Code: [Select]

[  522.372097] usb 6-1: >new full-speed USB device number 10 using uhci_hcd
[  522.557147] usb 6-1: >New USB device found, idVendor=2341, idProduct=0036
[  522.557156] usb 6-1: >New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  522.557163] usb 6-1: >Product: Arduino Leonardo
[  522.557168] usb 6-1: >Manufacturer: Arduino LLC
[  522.560316] cdc_acm 6-1:1.0: >ttyACM0: USB ACM device
[  530.128218] usb 6-1: >USB disconnect, device number 10
[  530.404098] usb 6-1: >new full-speed USB device number 11 using uhci_hcd
[  530.578150] usb 6-1: >New USB device found, idVendor=2341, idProduct=8036
[  530.578158] usb 6-1: >New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  530.578165] usb 6-1: >Product: Arduino Leonardo
[  530.578171] usb 6-1: >Manufacturer: Arduino LLC
[  530.581256] cdc_acm 6-1:1.0: >This device cannot do calls on its own. It is not a modem.
[  530.581303] cdc_acm 6-1:1.0: >ttyACM0: USB ACM device
[  530.592183] input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.2/input/input20
[  530.592299] hid-generic 0003:2341:8036.0008: >input,hidraw3: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:1d.0-1/input2


So is it maybe a different problem?

Mebus


Mebus

#3
Nov 01, 2012, 05:17 pm Last Edit: Nov 01, 2012, 05:25 pm by Mebus Reason: 1
8)

I have found the problem.

The problem is: ModemManager.

You can see the process "modem-man" if you run "sudo lsof /dev/ttyACM0" right after you plugged in the Arduino Leonardo.

So I solved the problem by:

Code: [Select]
systemctl stop NetworkManager.service

and

Code: [Select]
sudo killall -TERM modem-manager

After that I could upload the program.

To fix this permanently, you can edit

/etc/udev/rules.d/77-mm-usb-device-blacklist.rules

and add:

Code: [Select]
# Arduino
ATTR{idVendor}=="2341",  ENV{ID_MM_DEVICE_IGNORE}="1"


See also:

https://bugzilla.redhat.com/show_bug.cgi?id=861620

Kind Regards

Mebus


medmuf

I had the same problem (except that I am uploading to Micro on Ubuntu 12.04). But executing your method stopping networking manager and kill all modem-manager processes didn't solve the issue, or even setting up udev rules.  So I think there is some other factor might cause the same error.

After some digging, I ran IDE with sudo

Code: [Select]
sudo ./arduino

The code gets uploaded and it is working. I know the better way shall be setting the right permissions for the user account. But I don't want to go through all the details as it is working on root.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy