Pages: [1]   Go Down
Author Topic: Problem with uploading to the Leonardo on Fedora 17  (Read 2806 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
[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:
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:
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

« Last Edit: November 01, 2012, 06:41:36 am by Mebus » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
[  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

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley-cool

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:
systemctl stop NetworkManager.service

and

Code:
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:
# Arduino
ATTR{idVendor}=="2341",  ENV{ID_MM_DEVICE_IGNORE}="1"

See also:

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

Kind Regards

Mebus

« Last Edit: November 01, 2012, 11:25:29 am by Mebus » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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.
Logged

Pages: [1]   Go Up
Jump to: