Like an idiot I did it again (tight Serial.print loop) -- but this time I've had no luck repeatedly smashing the "Upload" button in the IDE -- I guess the delay in the code is too small for me to "catch" it. I can no longer reprogram the Uno since it won't listen to me / present the OS with a working port for long enough to talk to it.
I'll try again on Windows or Mac later this week.
Edit (an hour later): This got me past my "bricked" condition, but after intentionally re-bricking I could not duplicate its success, so I think it was coincidence.
(IDE is open)
Step 1: rm /var/lock/LCK..ttyACM0
Step 2: Click "upload" again.
I put optiboot on a Duemilanove and it still works fine in this scenario, so it's not the bootloader.
It's a pretty serious usability regression compared to the Duemilanove. I hope they're focused on releasing the code for the 8u2 chip so that some progress can be made here in the community (although apparently the community of Linux Arduino Uno users is very small and non-vocal?)
I feel frustrated and with ever dimming hope of a solution.
I don't have a good understanding of what's going on here, so I'm hoping someone from the community can help figure out a good fix. The code for the 8U2 has been available since the Uno started shipping. It's in the hardware/arduino/firmwares directory of the release and online here: http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/. Maybe we can find a change that stops the 8U2 firmware from relaying serial data until a program on the computer opens the port?
Upload works 1 time out 7-9 times, serial monitor never (I use gtktty).
I use Ubuntu 10.04
mune@lello:~$ uname -a
Linux lello 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:26:08 UTC 2010 i686 GNU/Linux
and, despite the CPU is an AMD 64 dual core, it is a 32 bit system (more software).
The only non-standard thing is that I use already a USB-serial converter (/dev/ttyUSB0) to communicate with a little UPS; the system for my arduino uno creates a /dev/ttyACM0 device.
I use the latest (0.21) IDE
mune@lello:~/Apps/arduino-0021$ ./arduino
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
I have the same problem.
My arduino uno works well on my Mac and in windows 7 on parallels.
But on my desktop with Ubuntu 10.04 no!
I use 10.04 because is the LTS version.
The launchpad.net/~arduino-ubuntu-team/ version is a old version and don't have Arduino Uno interface.
After i connect arduino to USB Port and open 0021 the menus, like tools, are really slow to open. More than 15sec..
Add me to the list. My Duemilanove has/had no issues. Just got an Uno, and I'm seeing all of the same things. Uploads are now through ACM instead of USB, Tools menu is very sluggish. However, repeating does not ever seem to push the program through. The TX button seems to be permanently lit, and after each try, I have to delete the lock file from /var/lock and reselect ACM from Tools.
I'm running 10.04 as well. Suggestions would be very much appreciated!
Just don't call it in a tight loop. Or you can hold down the reset button for a while (maybe while unplugging and replugging the board) to upload again.
Suggestions welcome. I'm not really sure why this is happening on Linux.
Mee too. Ubuntu 9.10. IDE freezes to 10-15 secs & manages to find nothing.
The best thing about arduino - easy debug through serial port is now pertty much unusable! ( Can compare with Duemilanove with the same sketch ). I want Duemilanove back !!!! >:(
Upd: Adding delay(1000) in setup() made the problem less painful for now.., but still ....
I'm going to add to this, Ubuntu 9.1: Arduino Mega 2560.
It takes 10 seconds + to open the tools menu and the correct serial port randomly appears and disappears each time I try to open it (appears as /dev/ttyACM0).
It seems to me to be some sort of deadlock between the arduino writing to the serial port and the program trying to access the serial port.
I've got a Maxbotix sonar and servo setup outputting ranging values to serial as they are taken.
Here's some things I noticed that may or may not have anything to do with the problem:
cat < /dev/ttyACM0 sometimes works but sometimes gives: /dev/ttyACM0: Input/output error This almost seems random but does seem to work more often when the servo is at or near 0 degrees I.e when it's near the top of the loop and hasn't done much yet, (a buffer problem?).
-Occasionally cat < /dev/ttyACM0 will capture the last few values from the program before resetting the board and working correctly. Sometimes cat < /dev/ttyACM0 will reset the board and start reading from the top of the loop, sometimes it will simply start reading without reseting.
The tx light is permanently on when not reading from the serial port but rapidly blinks when reading from it.
No idea if any of that is helpful to anyone I'm pretty new to all this.
Just a suggestion (I don't have any uno boards yet)
How about hitting the reset button on the board just before clicking the upload icon. That way the board will already be going through a reset cycle and won't have had time to do any serial stuff.
i've had the last few days many of the probs of others in this thread and i've tried many things / tips found here and otherwhere. The solution for my prob is "hidden" in an "older" thread in this forum: put-the arduino-cc-FQDN-here/cgi-bin/yabb2/YaBB.pl?num=1228315338
Setting the serial.debug_rate=9600 (which was atm 38400, possibly a relict of testing something) solved all my problems.
My environment with the problems:
Kubuntu 10.04
Arduino UNO
Arduino-IDE 0021
Greetz
Thomas
P.S Excuse my english
P.P.S because of that this is my first post here, it isn't allowed to post active links
I look forward to trying this with my Arduino Uno, but note that you appear to have a Diecimila since your USB port is /dev/ttyUSB?. The Arduino Uno serial port device is /dev/ttyACM?. I have no problems with my Diecimila, only my Uno.
but note that you appear to have a Diecimila since your USB port is /dev/ttyUSB?
Did you mean me? I have an UNO, too. My device is also a /dev/ttyACMX.
My Arduino Mega arrived today but i have no time to test it atm, while my Ice Tube Clock Kit arrived at the same time and so my soldering-iron waits for it
Greetz
Thomas
P.S. The UNO-problems with /dev/ttyACMX when a sketch has often "serial.println" in it i could reproduce today with OpenSuse 11.1. But with OpenSuse it is enough to pull off an on the usb-plug.
Kubuntu 10.10 here, reporting in with the same issues. Brand new Uno out of the box. cat /dev/ttyACM0 with hang for 5-10 seconds then come back with "Input/Output error"
Trying it multiple times in succession will get me maybe 1 out of 10 tries that works and shows the data stream.
IDE acting wonky as well, delays on startup, delays on the tools menu, refuses to upload a new sketch, will not start the serial monitor.
Also tried on my Eee PC netwook running EEbuntu, unknown kernel version. Same results except when the cat command finally started streaming data, the machine went into a full kernel lock. :-[
The DigitalReadSerial example was the first sketch that triggered this. Took me almost an hour to replace it with a sketch that wasn't using Serial.println()
Before I found this thread I was convinced the board was faulty! You guys might want to issue a warning to linux users or else expect a bump in "faulty" returns. :-[
If there is any debugging I can do to help, please let me know. I am pretty much a linux expert, not so much an electronics expert!