Go Down

Topic: No ttyUSB0 in arduino IDE Ubuntu (Read 37905 times) previous topic - next topic


now what is the output of the 'groups' command?
It should list you as a member of group dialout
Code: [Select]

wayoda@rebooter:~$ groups
wayoda adm dialout cdrom plugdev lpadmin admin sambashare

if not add yourself to this group
Code: [Select]

sudo adduser blaise dialout

and start the IDE to check if you can now see the board


Code: [Select]
blaise@king-desktop:~$ groups
blaise adm dialout cdrom plugdev lpadmin admin sambashare

just to be sure:

Code: [Select]
blaise@king-desktop:~$ sudo adduser blaise dialout
[sudo] password for blaise:
The user `blaise' is already a member of `dialout'.


I don't know what else could be wrong.

You havn't posted the startup messages of the IDE yet.



May 25, 2010, 08:00 pm Last Edit: May 25, 2010, 08:03 pm by Blaise_Mibeck Reason: 1
I am new to linux -- I typed arduino and got this:

Code: [Select]
blaise@king-desktop:~$ arduino
Experimental:  JNI_OnLoad called.
Stable Library
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists

thats what you meant by start up message, correct?

It gives the same message for connected and unconnected arduino.


This is what is causing the trouble. But I don't really know why this is happening.

On my Ubuntu 10.04 the librxtx-java library does not create any lock files at all (with or without arduino board).

Some shots in the dark:
Remove the package librxtx-java and do a fresh install with a reboot inbetween

Try running arduino as root (sudo arduino) just to test if it makes any difference.

Are you on 32bit or 64bit ubuntu?



What's the timestamp on that lock file? Could it be leftover from some other application using the com port?
The art of getting good answers lies in asking good questions.


May 25, 2010, 10:55 pm Last Edit: May 27, 2010, 06:23 pm by Blaise_Mibeck Reason: 1
I disconnected every other USB device from the computer the other day so, this I don't think this is left over.

Eberhard, Thanks for all your help!

When I get home I will try out your suggestion.

I am using 32bit ubuntu.


I have read that librxtx is supposed to make a locked file for each connection to prevent another application from stepping all over the application that opened the connection.

I have also read that there is a way to configure the librxtx to not do this -- but the actual procedure alludes me.

I tried uninstalling/reinstalling the librxtx package to no avail.


Did you try deleting the lock file(s)?

First, remove all serial USB devices (if only the Arduino, unplug that).

Then, in a terminal, change to the directory for the lock files (/var/lock/), then type (without quotes) "sudo rm {filename}" where {filename} is the name of the lockfile. Remove all that relate to ttyUSB0.

Reboot the machine, then re-plug in the Arduino, and try starting the IDE (you may want to do this at a command line to see if the error messages recur).

If that works, then you need to exit the IDE, and try starting it again - if that fails, then something isn't able to remove those lock files. Check the user/group/permissions on those lock files that are created; see if you are in the group, if not, add yourself to the group, remove the lock files, and re-try the steps. If there is a process for keeping rxtx from creating the lock files, you might have to figure that out.

Good luck, and I hope this helps! I've never run into this kind of a problem with my Ubuntu setup - but you never know...

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


Interesting (well, frustrating for OP of course). I just did a little test on my 32-bit Ubuntu, and there are no lock files in /var/lock. Then I tried to upload a sketch, and while this happened, I quickly switched to a terminal and did a "ls":
is what it said. it disappeared after the upload attempt.

Maybe there is another process that takes over the ttyUSB0 when you plug it in? What process that would be I have no idea though.

Also, I had to write "sudo groups username", to get that list of groups.


May 27, 2010, 06:48 pm Last Edit: May 27, 2010, 06:49 pm by AverageGuy Reason: 1
This is a wag.  If your lock file is still there, try a
lsof /var/lock/LCK..ttyUSB0

If something is running that has that file open, it will list the process info.  

You may have to do a sudo lsof ...

Maybe that will tell you something.



May 27, 2010, 09:33 pm Last Edit: May 27, 2010, 09:36 pm by Blaise_Mibeck Reason: 1
First, I would like to thank everyone for their input and help.

Further experimenting shows this behavior: I delete the lock file, open arduino IDE, and in terminal there are no errors. I look for ttyUSB0 in ports and it is there! When I click on ports the lock file for ttyUSB0 appears. When I attempt to up load blink, the IDE stalls for ever.

If I leave the lock file and open IDE there appear two errors about the lock file already existing. When I look under ports I see ttyS0 but no USB. Each time I click on menu another error pops up.

I think the issue is with RXTX.jar and librxtxserial.so (these may not be correct spellings I am away from that machine).

A friend of mine mentioned an issue regarding the AMD cpu. I am using a AMD phenom chip. I have no problems with other USB devices. I have been troubleshooting with the other devices not plugged in.  I have done a clean install of ubuntu, I tried installing the IDE package two different methods.

So I give up. I am going to use another computer for this project -- so I am not high and dry -- simply baffled that this problem seems to have no answer.

I will try what Jim suggested.

I am open to any other experiments for the good of humanity in the face of this computer induced weirdness.

Wishing you all the best,


May 27, 2010, 10:20 pm Last Edit: May 27, 2010, 10:22 pm by raron Reason: 1
I am using a AMD phenom chip.

Just FYI, so am I.

When I click on ports the lock file for ttyUSB0 appears.

You have probablly tried this, but I'll ask anyway: Have you tried to not click on ports (I assume you mean the menu: Tools - Serial Port), only verify that ttyUSB0 is selected, and then upload a sketch?

Btw, did you try Averageguy's suggestion?

Or how about installing the 64-bit Ubuntu? I tried that on another computer ( I was a bit "cautios" on my main computer, as I thought driver support etc. was better on the 32 bit one), but I have had no issues, as far as I know. Haven't tested it extensively, but Arduino IDE and ttyUSB0 works there too.


I appear to be having a very similar experience - No detection of an Arduino Duemilanove in the IDE but it's detected by the OS as ttyUSB0.  

I originally downloaded Arduino IDE 0021 for Ubuntu 10.10 (64 bit edition).  Everything worked great - detection, flashing, etc.  Life was good.

I recently did a "do-release-upgrade -d" to get the latest revision of Ubuntu, Natty Narwhal 11.04 (64 bit edition).  Since the upgrade, detection of my Arduino - no workie.  I plugged in the same Arduino to another laptop and it works well enough to program it to spin a servo.  

I'd prefer to use version 0021, so that I can add my own libraries, however, before anyone suggests to install the package Ubuntu provides...already attempted.  I leveraged apt-get to install arduino/arduino-core/librxtx-java and it's the same ol' song as before - detection in the OS as ttyUSB0 but no detection in the Arduino IDE.

I'd prefer to troubleshoot this because I believe this may be a systemic issue that could very easily be impacting other users.  The sense I get is that this issue may be a bug or a combination of bugs between the Arduino IDE/Java and/or Ubuntu (Perhaps a kernel or module bug in ftdi_sio or my favorite package to hate, apparmor).  Here are the steps I've tried so far:

# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

 Selection    Path                                      Priority   Status
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
 1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
 2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode

Kernel details:
# uname -a
Linux <host> 2.6.37-6-generic #17-Ubuntu SMP Mon Nov 22 20:05:19 UTC 2010 x86_64 GNU/Linux

CPU details:
# cat /proc/cpuinfo
processor      : 0
vendor_id      : GenuineIntel
cpu family      : 6
model            : 37
model name      : Intel(R) Core(TM) i7 CPU       M 620  @ 2.67GHz
stepping      : 5
cpu MHz            : 1199.000
cache size      : 4096 KB
physical id      : 0
siblings      : 4
core id            : 0
cpu cores      : 2
apicid            : 0
initial apicid      : 0
fpu            : yes
fpu_exception      : yes
cpuid level      : 11
wp            : yes
flags            : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt aes lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips      : 5320.25
clflush size      : 64
cache_alignment      : 64
address sizes      : 36 bits physical, 48 bits virtual
power management:

FTDI/USB Serial Modules:
# lsmod | grep ftdi
ftdi_sio               34351  0
usbserial              38523  2 ftdi_sio,mct_u232

Unplugging and re-plugging in the device returns the following response from dmesg:
[158887.476756] usb 1- new full speed USB device using ehci_hcd and address 50
[158887.606373] ftdi_sio 1- FTDI USB Serial Device converter detected
[158887.606444] usb 1- Detected FT232RL
[158887.606449] usb 1- Number of endpoints 2
[158887.606454] usb 1- Endpoint 1 MaxPacketSize 64
[158887.606460] usb 1- Endpoint 2 MaxPacketSize 64
[158887.606464] usb 1- Setting MaxPacketSize 64
[158887.606905] usb 1- FTDI USB Serial Device converter now attached to ttyUSB0

Here's the block device that exists in Ubuntu 11.04
# ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 2010-11-26 17:40 /dev/ttyUSB0

Here is the user associated with the "dialout" group:
# grep dialout /etc/group

Output from lsof on the PID of Arduino IDE 0021 (I believe the warning is due to lsof's interaction with the gnome virtual file system (gvfs).  I guess gvfs prefers to act like a donkey:
# lsof -p 9166
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/cerberus/.gvfs
     Output information may be incomplete.
arduino 9166 cerberus  cwd    DIR  252,1     4096 22812793 /usr/local/arduino-0021
arduino 9166 cerberus  rtd    DIR  252,1     4096        2 /
arduino 9166 cerberus  txt    REG  252,1   109736  7864352 /bin/dash
arduino 9166 cerberus  mem    REG  252,1  1572232 11534645 /lib/libc-2.12.1.so
arduino 9166 cerberus  mem    REG  252,1   141072 11534670 /lib/ld-2.12.1.so
arduino 9166 cerberus    0u   CHR  136,1      0t0        4 /dev/pts/1
arduino 9166 cerberus    1u   CHR  136,1      0t0        4 /dev/pts/1
arduino 9166 cerberus    2u   CHR  136,1      0t0        4 /dev/pts/1
arduino 9166 cerberus   10r   REG  252,1      408 22813770 /usr/local/arduino-0021/arduino

Strace Returns Nothing of Value:
# strace -p 9166

NOTE: I tried to obtain information from STDERR/STDOUT while executing ./arduino from a terminal emulator however nothing displayed in my terminal (No issues displayed about /var/lock, etc).

The last thing I checked was apparmor because it's notorious for breaking stuff.  I ran the following commands:
/etc/init.d/apparmor teardown && /etc/init.d/apparmor stop

Here are the remaining profiles:
# apparmor_status
apparmor module is loaded.
0 profiles are loaded.
0 profiles are in enforce mode.
0 profiles are in complain mode.
0 processes have profiles defined.
0 processes are in enforce mode :
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

I wonder if I need to unload the module because the Arduino IDE still won't detect /dev/ttyUSB0, ugh.  

Any other suggestions or things to try?  Any help would be greatly appreciated.

Best Regards!


The paint is barely dry on 10.10 and you;re 'upgrading' to nest April's release ? I give it a couple months AFTER the official release before I risk upgrading.  Running a daily build of next years release is asking for trouble.

Go Up