[SOLVED] uploads fail from debian to due: "no device found on ttyacm0"

greetings all,

i recently received an arduino due; i'm running debian squeeze.
all upload attempts fail.

upon plugging in the due via programming port, dmesg gives:

[ 2509.432034] usb 5-1: new full speed USB device using uhci_hcd and address 5
[ 2509.629816] usb 5-1: New USB device found, idVendor=2341, idProduct=003d
[ 2509.629822] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 2509.629827] usb 5-1: Product: Arduino Due Prog. Port
[ 2509.629830] usb 5-1: Manufacturer: Arduino (www.arduino.cc)
[ 2509.629833] usb 5-1: SerialNumber: A4139363931351316291
[ 2509.629987] usb 5-1: configuration #1 chosen from 1 choice
[ 2509.632923] cdc_acm 5-1:1.0: ttyACM0: USB ACM device

ls -al /dev/ttyACM* returns:
crw-rw-rw- 1 root dialout 166, 0 Feb 12 06:58 /dev/ttyACM0

i'm using the latest IDE (1.5.2 linux-32) w/support for the due from the main site.
in the ide, i am able to select '/dev/ttyACM0' under Tools > Serial Port
and the board under Tools > Board > Arduino Due programming port.

everytime i attempt to upload a basic/empty sketch, i receive:

Binary sketch size: 9,624 bytes (of a 524,288 byte maximum) - 1% used
No device found on ttyACM0

whether i run the ide as root or normal user.
i've combed g**gle to no avail. none of the suggestions i've read in the 'duino forums seems to help or present the same problem.

ps - i attempted to upload under windows- only once though. the drivers install, but the ide closes immediately upon opening with a sound notification but no error window or message appears. i only tried once though and haven't since the initial install (i.e., no reboot).

any help or advice would be grandly appreciated.

thanks

also,
lsusb reports:

Bus 005 Device 005: ID 2341:003d
Bus 005 Device 003: ID 046d:c51b Logitech, Inc. V220 Cordless Optical Mouse for Notebooks
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 045e:0750 Microsoft Corp. Wired Keyboard 600
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 13b1:000e Linksys WUSB54GS v1 802.11g Adapter [Broadcom 4320 USB]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

should i be able to see the board explicitly?

oh- last addition:

the green power light is illuminated on the board.
the L (led, pin13?) blinks steadiily.
upon attempting to upload, the tx light blinks several times, rapidly, turns off, and then i'm presented on-screen with the upload error.

I assume that when you plug the due in you see entries in /var/log/messages?

I see :-

Feb 12 23:47:32 nigellap kernel: [ 3748.664298] usb 7-1: new full speed USB device using uhci_hcd and address 16
Feb 12 23:47:32 nigellap kernel: [ 3748.862679] usb 7-1: New USB device found, idVendor=2341, idProduct=0010
Feb 12 23:47:32 nigellap kernel: [ 3748.862688] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
Feb 12 23:47:32 nigellap kernel: [ 3748.862695] usb 7-1: Product: Arduino Mega 2560
Feb 12 23:47:32 nigellap kernel: [ 3748.862700] usb 7-1: Manufacturer: Arduino (www.arduino.cc)
Feb 12 23:47:32 nigellap kernel: [ 3748.862704] usb 7-1: SerialNumber: 7523733353635140F092
Feb 12 23:47:32 nigellap kernel: [ 3748.862948] usb 7-1: configuration #1 chosen from 1 choice
Feb 12 23:47:32 nigellap kernel: [ 3748.864644] cdc_acm 7-1:1.0: ttyACM0: USB ACM device

and this confirms the correct serial port.

(Mind I'm on 64 bit, and using a mega not a due)

Nige

cat /var/log/messages gives:
Feb 12 07:39:20 aude kernel: [10196.184023] usb 5-1: new full speed USB device using uhci_hcd and address 6
Feb 12 07:39:21 aude kernel: [10196.383289] usb 5-1: New USB device found, idVendor=2341, idProduct=003d
Feb 12 07:39:21 aude kernel: [10196.383295] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
Feb 12 07:39:21 aude kernel: [10196.383299] usb 5-1: Product: Arduino Due Prog. Port
Feb 12 07:39:21 aude kernel: [10196.383302] usb 5-1: Manufacturer: Arduino (www.arduino.cc)
Feb 12 07:39:21 aude kernel: [10196.383306] usb 5-1: SerialNumber: A4139363931351316291
Feb 12 07:39:21 aude kernel: [10196.383449] usb 5-1: configuration #1 chosen from 1 choice
Feb 12 07:39:21 aude kernel: [10196.386397] cdc_acm 5-1:1.0: ttyACM0: USB ACM device

from this post: Arduino Forum
i tried to reload usbserial and cdc_acm when i noticed usbserial hadn't loaded.
and usbserial doesn't load when i restart and replug in the due- even though dmesg reports the above.

so i modprobe usbserial and reload cdc_acm, but nothing changes.

setserial -G /dev/ttyACM0 gives:
Cannot get serial info: Invalid argument

...not really sure what to do think about that..

Sounds to me like Debian sees it ok, just the loader doesn't.

My version is 1.0.3 - 2012.12.10 (downloaded yesterday) but is the 64 bit version.

I downloaded the tgz, unzipped it and ran the executable as root.

However, I did do a fair amount of playing first (trying to get the command line to work), and am using a different board.

I'll have another play this evening, but I don't think I'm going to be much help.

Nige

so after spending hours surfing and testing, the solution was incredibly simple.
when i plug in the due, the baud rate is set at 115200 automatically. all i have to do is set the baud rate to 1200 before every upload and all uploads are successful from the ide!
i suppose i'll make that a more permanent fix (with udev?) but for now, i don't mind hitting [up] at the terminal.

for anyone having the same problem, i first found the solution while in windows.
i followed the instructions on this site to set the baud rate with the 'mode' command from a command prompt:

the linux equivalent, i got from:
Writing to the serial port from the Linux command line - Stack Overflow.

in case those sites aren't around as long as this one, the commands issued were:

mode com3: baud=1200 data=8 parity=n stop=1
from the command prompt
and

stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb
from the terminal.

cheers

Thanks aude, you fix worked for me.

Justin

I have the same problem as described at the top:
When trying to upload a sketch via the USB Programming Port the following error message appears:

No device found on /dev/tty.usbmodem1421

However, when I connect the Arduino via the Native USB Port the sketch is uploaded and runs just fine.

I am using an Arduino Due, Arduino IDE 1.5.4 and Mac OS 10.9 (Mavericks).
Would the problem in my case also be the Baud rate? If yes, how do I change it on a Mac?

I would be very happy about any help.

UPDATE March 2018:

For me the problem still exists with Ubuntu 16.04 and Arduino IDE 1.8.5 (only when using the programming port).

Solution that works for me (more or less):

-open terminal
-change permission for the port with:

sudo chmod 666 /dev/ttyACM0

-change baudrate with:

 stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb

-run the baudrate command several times !!!
-start the Arduino IDE with: sudo ./arduino (cd to the directory first)
-upload the sketch

When I want to upload again I have to close the IDE and again run the baudrate command several times.

Hello,

Unfortunately, I have the same problems here.

The commands mentioned by joe unfortunately do not help, does anyone have any further suggestions?

Try this page.

Even after trying everything on this page and the linked pages, I still could not upload a sketch.

What finally worked was pressing the onboard "Erase" button, wait a few seconds, then press the onboard "Reset" button, wait a few more seconds. You should now be able to upload, or atleast I was finally I able to.

figured it out after reading this: No device found on /dev/ttyACM0 Arduino Due. · Issue #57 · shumatech/BOSSA · GitHub

Even though the trick of "Erase" followed by "Reset" works, it only works for a single sketch upload.

If I want to modify the sketch and upload a new sketch, then I have to "Erase" + "Reset" again.

So I am now wondering why the "Erase" + "Reset" allows me to do the upload.

so, now while leaving Arduino IDE open, I can in a seperate terminal spam:

stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb

a few times, then tab back to Arduino IDE and it will upload the sketch....

seems it was supposed to be fixed, but i guess not: run stty when flashing arduino due by cloche-leythal-pastalia · Pull Request #1 · sqrtroot/toolchain · GitHub