Go Down

Topic: trouble uploading on ubuntu 12.04 (Read 11663 times) previous topic - next topic

SurferTim

I just tried a couple uploads to a Mega on 12.04, and all worked fine. No /var/lock/ entry (except whoopsie). Maybe something about the Uno and 12.04?

Have you looked in /dev/ to see the file attributes for the arduino?
Code: [Select]
cd /dev
ls -l ttyACM*


Mine looks like this:
Quote
tim@tim-desktop:/dev$ ls -l ttyACM*
crw-rw---- 1 root dialout 166, 0 Sep 16 12:33 ttyACM0


Mine matches:

Code: [Select]
$ ls -l /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 Sep 16 09:41 /dev/ttyACM0


What happens when you start the Arduino IDE from the command line?  Do you see what I see, or do we have different RXTX versions? 

Code: [Select]
$ ./arduino
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7


This is very frustrating!  I don't know what to do!

So I tried following the directions here http://arduino.cc/playground/Linux/All#NoUSB

Previously I had only been looking at the debian and ubuntu help.

Do Linux find the USB? 
Whatever that means, yes, linux does:
Code: [Select]
$ dmesg | tail
[165994.229966] usb 1-1.6: USB disconnect, device number 3
[165996.470303] usb 1-1.6: new full-speed USB device number 4 using ehci_hcd
[165996.565719] cdc_acm 1-1.6:1.0: ttyACM0: USB ACM device


Setting UDEV rule
But lsusb doesn't find the device...?  Arduino UNO's Product ID should be 0001, but no USB devices found via lsusb have that product ID!
Code: [Select]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 006 Device 002: ID 11b0:6558 ATECH FLASH TECHNOLOGY
Bus 002 Device 003: ID 046d:c315 Logitech, Inc. Classic New Touch Keyboard
Bus 002 Device 004: ID 045e:0029 Microsoft Corp. IntelliMouse Optical
Bus 001 Device 004: ID 2341:0043 


SET THE PERMISSION[\b]
looks like I pass all these tests...
Code: [Select]
$ ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Sep 17 18:48 /dev/ttyACM0
$ groups
userName adm dialout cdrom sudo dip plugdev lpadmin sambashare
$ ls -ld /var/lock
lrwxrwxrwx 1 root root 9 Sep 15 19:53 /var/lock -> /run/lock
$ ls -ld /run/lock
drwxrwxrwt 4 root root 100 Sep 17 21:10 /run/lock

elnorbii

I have exactly the same problem, but i think it's de rxtx library, try to uninstall it.

Few months ago i uploaded without problems, recently i installed MPIDE and I install rxtx library, the MPIDE works perfect, but arduino no.

so i tried uninstalling and reinstalling arduino, arduino-core, and rxtx from the debian packages available here:  http://arduino.cc/playground/Linux/Ubuntu

unfortunately, the arduino debian package doesn't see the rxtx package that I installed!

Code: [Select]
$ sudo dpkg -r arduino
[sudo] password for user:
(Reading database ... 305279 files and directories currently installed.)
Removing arduino ...
Processing triggers for shared-mime-info ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...

$ sudo dpkg -r arduino-core
(Reading database ... 305239 files and directories currently installed.)
Removing arduino-core ...

$ sudo dpkg -r librxtx-java
dpkg: warning: there's no installed package matching librxtx-java

$ sudo dpkg -i librxtx-java_2.2pre2-11_i386.deb
(Reading database ... 304441 files and directories currently installed.)
Preparing to replace librxtx-java:i386 2.2pre2-11 (using librxtx-java_2.2pre2-11_i386.deb) ...
Unpacking replacement librxtx-java:i386 ...
Setting up librxtx-java:i386 (2.2pre2-11) ...
Processing triggers for doc-base ...
Processing 2 changed doc-base files...
Registering documents with scrollkeeper...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

$ sudo dpkg -i arduino-core_1.0.1+dfsg-6_all.deb
Selecting previously unselected package arduino-core.
(Reading database ... 304441 files and directories currently installed.)
Unpacking arduino-core (from arduino-core_1.0.1+dfsg-6_all.deb) ...
Setting up arduino-core (1:1.0.1+dfsg-6) ...

$ sudo dpkg -i arduino_1.0.1+dfsg-6_all.deb
Selecting previously unselected package arduino.
(Reading database ... 305240 files and directories currently installed.)
Unpacking arduino (from arduino_1.0.1+dfsg-6_all.deb) ...
dpkg: dependency problems prevent configuration of arduino:
arduino depends on librxtx-java (>= 2.2pre2-3); however:
  Package librxtx-java is not installed.
dpkg: error processing arduino (--install):
dependency problems - leaving unconfigured
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Errors were encountered while processing:
arduino


what's going on? 

Hey everyone.  I'm still having trouble here.  Anyone have any advice?  Is anyone having luck with ubuntu 12.04?

Hi,
I just ran into exactly the same problem. I have no idea what was going on, but deleting ~/.arduino/preferences.txt fixed it for me.

NomadAU

After a lot of faffing around, I have found a solution that works for me (thanks to an append I read on a different forum).  I had exactly the same symptoms as the original reported problem....the answer was to edit the preferences.txt file in <home>.arduino directory...and set the debug rate to 9600.  Mine was previously set to 14400.

sdbvideo

Well i also looked in the file preferences and it was set at 9600.
I also places (removed) it somewhere else. Than arduino cant open at all.
I also installed Java 7 instead of 6.
The first time i ran adruino it worked again, and then just gives the 500 error again.

this sucks.
Is it Ubuntu or arduino?

elnorbii

With the solution of NomadAU it works for me. And i don't have more problems.

AgeBee

Hi,
I was facing the same problem as others here in that thread.
For whatever reason the following line was constantly set in ~/.arduino/preferences.txt:

Code: [Select]
serial.debug_rate=38400

Changing that line to
Code: [Select]
serial.debug_rate=9600
made that /dev/ttyACM0 appeared just before uploading. But still I received the error:
Code: [Select]
...processing.app.SerialException: Error opening serial port '/dev/ttyACM0'...
What helped me is change the entry to serial.debug_rate=9600, then I made the file read-only.
I restarted the IDE and the above mentioned line was kept to serial.debug_rate=9600.
Very strange....
Regards
AgeBee


Hi,
I just ran into exactly the same problem. I have no idea what was going on, but deleting ~/.arduino/preferences.txt fixed it for me.

If anyone is still interested.

I have an Arduino Uno. 

It seems the serial port must be set to 9600 baud.  Mine got set to 38400, and it broke Uploading on both Ubuntu and a Mac.

If anyone is interested in more details let me know.

One more thing to note:

If you install arduino logging (from here http://playground.arduino.cc/Code/Logging) , it defaults to setting the serial port to 38400 baud.  Then the next time you open the serial monitor, this gets written into the preferences.txt file. 

From then on until you finally figure this out after hours of googling and experimentation, you are stuck.

Go Up