Go Down

Topic: Problems with 0021 on Ubuntu 10.04 Lucid Lynx (Read 29530 times) previous topic - next topic

Stephan_84

#15
Nov 02, 2010, 07:01 pm Last Edit: Nov 02, 2010, 08:31 pm by Stephan_84 Reason: 1
Same Problem here with the uno and:
2.6.32-25-generic-pae #45-Ubuntu SMP Sat Oct 16 21:01:33 UTC 2010 i686 GNU/Linux

*edit*

Only workaround for me: use an ethernet shield for output. Without any serial... commands the uno seems to work.

Nice start with my first arduino  ;)

Fatboy

Add me to the Uno serial problem list.  So using Serial.println() is a bust on Linux, or should it just never get called in a tight loop?

mellis

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.  

Alex S

#18
Nov 07, 2010, 03:59 pm Last Edit: Nov 07, 2010, 04:41 pm by als2002 Reason: 1
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 ....

twostix

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.







Folderol

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.

MeneMeiner

Hi,

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

MeneMeiner

#22
Nov 17, 2010, 08:35 pm Last Edit: Nov 17, 2010, 08:37 pm by MeneMeiner Reason: 1
now, in my second post, i hope i can post the link (that solved my problem) in the right way: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228315338

Bingo... and than for all, who can understand german text my story about my problems one more link http://www.elchs-kramkiste.de/lapurd/node/143

Hth
Thomas

rgm

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.

MeneMeiner

Quote
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.

RMB Webs

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!  :)

wayoda

Quote

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!

I wish someone with a (fair) bit of Linux knowledge would compare the USB traffic when running the serial-loop sketch that locks up the board.

It would be nice to see the difference between an UNO and one of the FTDI-based boards (Nano, Dicemilia, ...).

The linux kernel provides the usbmon framework for this.
A search for "[glow]linux usbmon[/glow]" will return a few tutorials on how to use it.

Eberhard
(who doesn't have a Uno, otherwise he would do this himself)

RMB Webs

Quote

I wish someone with a (fair) bit of Linux knowledge would compare the USB traffic when running the serial-loop sketch that locks up the board.

It would be nice to see the difference between an UNO and one of the FTDI-based boards (Nano, Dicemilia, ...).


I'll see what I can find out when I get home this evening (EST), although I don't have anything other than the Uno for a diff

Unfortunately I left it unplugged or I'd do it over ssh right now ;)

stimmer

Quote
I wish someone with a (fair) bit of Linux knowledge would compare the USB traffic when running the serial-loop sketch that locks up the board.

It would be nice to see the difference between an UNO and one of the FTDI-based boards (Nano, Dicemilia, ...).


I've tried this (using wireshark), it gives a thoroughly unpleasant mess of message packets going back and forth. Unfortunately comparing a UNO and a Duemilanove isn't helpful, because UNO uses a standard CDC-ACM protocol but the FTDI uses its own protocol and they are not comparable. What you need is another device using CDC-ACM - some mobile phones do.

I agree that they really should give linux users a warning that the software isn't quite ready yet. The best advice from my own experience and from the boards is this:

1) Avoid using serial if possible
2) If you have to use serial, put delay(5000); before Serial.begin to give yourself a chance to open the serial monitor or gtkterm before the output starts
3) Avoid the tools menu as much as possible and never select speeds of 14400 or 28800 in the serial monitor
4) Don't unplug the Arduino and immediately plug it back in. Wait for a few seconds before plugging it back in. Otherwise it can change ports from ttyACM0 to ttyACM1, and then you will need to go to the tools menu, which you don't want to do.
5) If you are really stuck and cannot upload to the device, unplug the Arduino, wait a few seconds, then hold down the reset button for a few seconds while plugging it back in. Then upload.

Has anybody else managed to get a working LUFA setup on linux for updating the firmware? I've been experimenting with altering the firmware and had some success, I wondered if anyone else had tried.
Due VGA library - http://arduino.cc/forum/index.php/topic,150517.0.html

atmelino

I bricked my UNO by uploading the DigitalReadSerial example (Ubuntu 10.10, IDE 21)! I have tried all the suggestions listed here, and have even tried Windows to restore it (by uploading a sketch without serial print), but without success.

Question: If I get a USBtinyISP and re-burn the bootloader, is that also going to wipe out the existing serial sketch?

Note: serial communication under Ubuntu with the Duemilanove works without any problems.

Go Up