Go Down

Topic: Arduino 1.0.3 Going crazy (Read 5998 times) previous topic - next topic

sokopok

Hi, is anybody experiencing problems with arduino ide 1.0.3?

Eg: All menu items grayed out
Eg: Serial port randomly changing (even during compilation, or after opening the serial monitor)
Eg: Serial port menu showing non-existant ports (/dev/ttyACM2 ??? I only have 2 usb ports on my netbook)
Eg: random crashes (without error messages on the console)
Eg: failiure to upload sketches, sometimes I have to click upload +- 5 times for it to work)

sokopok

Sorry about the kind of rude message. I just lost it there for a bit.

My system:
tomas@tomas:~/arduino-1.0.3$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04
Codename:       precise

I already redownloaded arduino a couple of times, with no success.

I just bought 2 leonardos for a project I'm working on, so the version with ubuntu is not an option (no leonardo in the board menu)

Erdin

#2
Feb 19, 2013, 03:15 pm Last Edit: Feb 19, 2013, 03:17 pm by Erdin Reason: 1
I think you have an old version from the repositories combined with a new downloaded version. Or you downloaded a version which is not for Ubuntu 12.04.

Install the Arduino + java + javr rxtx + avr gcc from the repositories.
Remove the Arduino IDE environment.
I think you have to uninstall the "arduino" and "arduino-core" packages.
Download and install version 1.0.3, the 'precise' version for Ubuntu 10.04.

What happens if you run the IDE ?
Are the the options available ?
Can you compile code ?

The Arduino board creates a new serial port for you. Mostly called /dev/ttyACM0
Do you have a Arduino Uno, that would be easier to test.
If the Arduine IDE is running fine, but the Arduino board not, perhaps the USB voltage is less than 5V. That could explain the serial port randomly chaning.

The windows version of the Arduino IDE will run in wine. But the menu's are only shorty visible.

sokopok

Quote
I think you have an old version from the repositories combined with a new downloaded version.

That is correct. Is this a problem?
The version I downloaded is self-contained (in in it's own folder: /home/.../arduino-1.0.3). In my opinion they should not conflict with each other.
The version from ubuntu repositories: arduino (1:1.0+dfsg-9)
The version I downloaded: http://arduino.googlecode.com/files/arduino-1.0.3-linux32.tgz

Quote
The Arduino board creates a new serial port for you. Mostly called /dev/ttyACM0

I understand. But like I said: I only have 2 USB ports, so ttys will be assigned in order, I suppose: first /dev/ttyACM0, then /dev/ttyACM1, but /dev/ttyACM2 will never be used (since I don't have a third physical USB port on this machine). Please correct me if I'm wrong here.

I have never seen /dev/ttyACM2 before. Also it doesn't work: when I upload to /dev/ttyACM2:
a. arduino IDE freezes and I must kill the process, or
b. it freezes my whole computer, so I have to do a hard reboot (this is a linux, so this should NOT happen), or
c. arduino crashes without any error messages, or
d. I get the standard failed to upload ... message.

Quote
What happens if you run the IDE ?
Are the the options available ?
Can you compile code ?

The IDE runs fine. Some issues with the menus (menu items rendered on top of each other, sometimes serial port is greyed out, sometimes whole menus are greyed out or missing, ..., same as in 1.0.0)
The options are available, apparently it uses the same options file as 1.0.0.
Compilation works.

Quote
If the Arduino IDE is running fine, but the Arduino board not, perhaps the USB voltage is less than 5V. That could explain the serial port randomly chaning.

I have an UNO and it works flawlessly.
Also both Leonardos work fine: I've been having this problem for a while, so what I did was: mess around in 1.0.3 untill I got the sketch uploaded, then switch to the 1.0.0 version bundled with ubuntu to check the serial output. A very tedious process.


What I did to resolve the problem:
Code: [Select]
tomas@tomas:~$ sudo apt-get purge arduino arduino-core

Things seem to work now. Still I don't like this. (Again) in my opinion an application should
a. just do it's thing
b. do the same thing every time, not randomly change it's behaviour.
c. Why can't I run (or even have installed) 2 versions of the same software? This is linux, so this should be possible.

Erdin

Something changed. I used to download the 'precise' version for Ubuntu 'precise' (12.04).
But now it is one *.tgz file for all linux flavours.

It should be possible to have more than one running.
If you unpack the versions in different directories it should be possible, but the global installed Arduino software should be removed.
If they share settings or libraries it might result into a mix of old and new.

The Windows version includes everything, a subset of Java, the compiler, avrdude and so on.
The Linux version does not include Java, but this *.tgz file does include the avr compiler and avrdude.

sokopok

Ok. Another problem solved. Maybe a note on the download page, in the README or changelog would be a good idea?

I've had this problem for quite some time, and nearly quit the whole arduino business because of this.

Thanks for the info.

sokopok

#6
Feb 21, 2013, 06:38 am Last Edit: Feb 21, 2013, 06:53 am by sokopok Reason: 1
So, I was a bit fast writing that it works now... Since I bought these 2 Leonardos, I've had nothing but trouble...

I still have to upload many many times before the sketch actually gets uploaded. The serial ports still keep changing randomly.
Eg:
- I compile a sketch -> no problems here
- I verify the port in the menu -> /dev/ttyACM0 (or /dev/ttyACM1)
- I click upload -> compilation starts again
- upload takes way too long, so I check the serial port again
  -> 1. Serial port menu is greyed out
  or
  -> 2. the port changed to /dev/ttyACM1 (or /dev/ttyACM0 respectively), this port is not selected (no checkmark)

Eg:
- I manage to upload a sketch
- I want to open the serial monitor -> Serial port menu is greyed out

With the UNO board I have things seems to work as expected... (edit: this is not true, upload SEEMS to work better, but the serial port still changes itself)
I have no clue what's happening anymore....

sokopok

I wanted to continue working on my project a bit (testing on my UN0), so I deleted 1.0.3, and reinstalled the version from ubuntu repositories:

1:
Code: [Select]
tomas@tomas:~$ rm -fr arduino-1.0.3
tomas@tomas:~$ sudo apt-get install arduino arduino-core

2: verify: snapshot-1.jpg
3: plug in the UNO:
Code: [Select]
tomas@tomas:~$ tail -n2 /var/log/kern.log
Feb 21 08:18:49 tomas kernel: [ 2561.536126] usb 2-2: new full-speed USB device number 12 using uhci_hcd
Feb 21 08:18:49 tomas kernel: [ 2561.742307] cdc_acm 2-2:1.0: ttyACM1: USB ACM device

4: check the port: snapshot-2.jpg
5: click upload, wait a couple of seconds: snapshot-3.jpg
6: check the port again: snapshot-4.jpg
7: check kern.log again:
Code: [Select]
tomas@tomas:~$ tail -n2 /var/log/kern.log
Feb 21 08:18:49 tomas kernel: [ 2561.536126] usb 2-2: new full-speed USB device number 12 using uhci_hcd
Feb 21 08:18:49 tomas kernel: [ 2561.742307] cdc_acm 2-2:1.0: ttyACM1: USB ACM device

nothing changed in kern.log

arduino's error message:
Code: [Select]
Binary sketch size: 444 bytes (of a 32256 byte maximum)
processing.app.SerialException: Error opening serial port '/dev/ttyACM1'.
at processing.app.Serial.<init>(Serial.java:146)
at processing.app.Serial.<init>(Serial.java:76)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:75)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:88)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:66)
at processing.app.Sketch.upload(Sketch.java:1664)
at processing.app.Sketch.exportApplet(Sketch.java:1624)
at processing.app.Sketch.exportApplet(Sketch.java:1578)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2314)
at java.lang.Thread.run(Thread.java:679)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:213)
at processing.app.Serial.<init>(Serial.java:136)
... 9 more
processing.app.debug.RunnerException: Error opening serial port '/dev/ttyACM1'.
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:99)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:88)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:66)
at processing.app.Sketch.upload(Sketch.java:1664)
at processing.app.Sketch.exportApplet(Sketch.java:1624)
at processing.app.Sketch.exportApplet(Sketch.java:1578)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2314)
at java.lang.Thread.run(Thread.java:679)


All this is done in arduino 1.0.0 (I guess, ubuntu version: 1:1.0+dfsg-9)

So now nothing works anymore. I'm getting so very tired of this.

Erdin

Can you get an Arduino Uno, or an other "normal" Arduino board ?
The Arduino Uno is always connected to the PC.
Because of the specific functions of the Arduino Leonardo, that board is reconnected during every upload and reset.

On my computer, the serial port is always the same /dev/ttyACM0, no matter what I do.

Could you try this:
- Connect only one Leonardo to the PC, never two.
- Don't connect anything else to the Leonardo Board.
- Don't use an usb hub, or use a powered usb hub.
- Measure the 5V of the Leonardo Board, if that is too low, the USB cable is too cheap.
- Try another USB cable, it may have bad connections.

Of nothing helps:
- Use a computer with Windows.
- Buy an other Arduino board, like a Uno, Nano, Mega.

sokopok

Quote
Can you get an Arduino Uno, or an other "normal" Arduino board ?

I have an UNO, previous post was tested with the UNO (see first line of previous post!!!)
This setup has worked (more or less) for 2 years, now all of a sudden it doesn't any more.
I'm beginning to understand I made a big mistake buying the 2 leonardos, they **** (fill in the blank). Since I got them things really started going haywire.

Quote
- Connect only one Leonardo to the PC, never two.

The point is: I need both boards. How else can I check the communication between them?

Quote
- Don't connect anything else to the Leonardo Board.

See previous post:
Code: [Select]
void setup() {} void loop() {}

Quote
- Don't use an usb hub, or use a powered usb hub.

See:
Quote
I understand. But like I said: I only have 2 USB ports, so ttys will be assigned in order, I suppose: first /dev/ttyACM0, then /dev/ttyACM1, but /dev/ttyACM2 will never be used (since I don't have a third physical USB port on this machine). Please correct me if I'm wrong here.


Quote
- Measure the 5V of the Leonardo Board, if that is too low, the USB cable is too cheap.

UNO: 5.03
Leonardo 1: 5.05
Leonardo 2: 5.07

Quote
- Try another USB cable, it may have bad connections.

I've tried every USB cable I own.

Quote
- Use a computer with Windows.

Excuse me???

Quote
- Buy an other Arduino board, like a Uno, Nano, Mega.

I just did, that's why I'm having these troubles now.

Seriously, any sane responses???

Erdin

Sorry for the "not so sane" reply. It is the best I could think of.
Using a PC with Windows seems the only option left.
Or a different operating system on a cdrom or usb stick, so you will be sure it is clean.
Perhaps your COM port on the PC has troubles. So testing it on another PC is worth trying.

I tried using the Windows version in wine in Ubuntu 12.04. I had to add a symlink to the serial port. That worked well with the Uno, but not so good with the Leonardo. But that situation is exceptional.

SurferTim

Have you tried the Arduino website version? I had bad luck with the Ubuntu repository versions.
http://arduino.cc/en/Main/Software

Download the appropriate version, then unpack it in a local directory. Navigate to that directory and run the arduino shell script there to run that version. Does that do any better?

sokopok

#12
Feb 21, 2013, 01:32 pm Last Edit: Feb 21, 2013, 01:34 pm by sokopok Reason: 1
Erdin:

Sorry for the rude response, but I'm really losing it here. I will try later on a Windows machine (I have none, and would like to keep it that way).

SurferTim:
Yes I did, that's when things really started to go wrong. I have removed 1.0.3 now and reinstalled the ubuntu version, but now this also doesn't work anymore.
I tried the 1.5 beta, but same thing.




Imho this is a software problem (probably the java side of things, that never works). I will try to install another jvm, maybe that will help.

One thing I really don't understand: things used to work for the UNO, but now even that is screwed up: this morning the IDE went up to /dev/ttyACM9, which cannot work since /dev/ttyACM1 is the highest possible port on this machine.

Someone should check (I'm no java developer) where this goes wrong...

SurferTim

The IDE version from the website has not interfered with my Ubuntu installs. The Arduino website version is relatively self contained. The libraries and avr-gcc are included. It doesn't use any of the Ubuntu stuff as far as I can tell.

I have the Arduino website v1.0.1, v1.0.2, and v1.0.3 on my Ubuntu box now. All work fine.

sokopok

I know a little bit more by now... See this thread on the Ubuntu forum:

see: http://ubuntuforums.org/showthread.php?t=2118715

Still no idea what's going on but anyway...

Go Up