No ttyUSB0 in arduino IDE Ubuntu

I did a complete reinstall of ubuntu 10.04,
I installed the arduino 0018 using the personal package thing. The IDE is installed and looks fine, but I still can't get ttyUSB0 to show up. I use lsusb in a terminal and I see the ftdi show up.

Eberhard, the output of the first command is:

[ 2760.520456] INFO: task lsusb:3021 blocked for more than 120 seconds.
[ 2760.520460] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 2760.520464] lsusb         D 0060f8c8     0  3021      1 0x00000004
[ 2760.520476]  cc58be68 00000086 cc58be24 0060f8c8 00000000 c08874a0 cc580f7c c08874a0
[ 2760.520488]  b491f863 0000022f c08874a0 c08874a0 cc580f7c c08874a0 c08874a0 f690d500
[ 2760.520504]  b459e622 0000022f cc580cd0 7fffffff f761f498 cc580cd0 cc58bec8 c05b012d
[ 2760.520518] Call Trace:
[ 2760.520530]  [<c05b012d>] schedule_timeout+0x1ad/0x280
[ 2760.520538]  [<c020fdef>] ? __dentry_open+0x1af/0x290
[ 2760.520549]  [<c02ff4bd>] ? security_inode_permission+0x1d/0x30
[ 2760.520558]  [<c021ac2e>] ? inode_permission+0x9e/0xb0
[ 2760.520565]  [<c020ffcd>] ? nameidata_to_filp+0x5d/0x70
[ 2760.520572]  [<c0215050>] ? chrdev_open+0x0/0x200
[ 2760.520582]  [<c021e5f2>] ? do_filp_open+0x4d2/0x990
[ 2760.520589]  [<c05b0e6f>] __down+0x5f/0x90
[ 2760.520596]  [<c0174a69>] down+0x39/0x40
[ 2760.520602]  [<c04710ae>] usbdev_read+0x3e/0x250
[ 2760.520609]  [<c02fe3b4>] ? security_file_permission+0x14/0x20
[ 2760.520615]  [<c05b1b77>] ? unlock_kernel+0x27/0x30
[ 2760.520621]  [<c021227f>] vfs_read+0x9f/0x1a0
[ 2760.520629]  [<c02203c9>] ? do_vfs_ioctl+0x79/0x310
[ 2760.520634]  [<c0471070>] ? usbdev_read+0x0/0x250
[ 2760.520644]  [<c0212432>] sys_read+0x42/0x70
[ 2760.520649]  [<c0109763>] sysenter_do_call+0x12/0x28

There was no output when I entered the code after plugging in the arduino.

I apologize -- I failed to restart the computer as you asked in your instructions. I followed your instructions again and this is what I got after connecting the arduino.

blaise@king-desktop:~$ dmesg
[   77.408032] usb 4-1: new full speed USB device using ohci_hcd and address 3
[   77.635264] usb 4-1: configuration #1 chosen from 1 choice
[   77.686607] usbcore: registered new interface driver usbserial
[   77.686636] USB Serial support registered for generic
[   77.686687] usbcore: registered new interface driver usbserial_generic
[   77.686691] usbserial: USB Serial Driver core
[   77.699577] USB Serial support registered for FTDI USB Serial Device
[   77.699662] ftdi_sio 4-1:1.0: FTDI USB Serial Device converter detected
[   77.699710] usb 4-1: Detected FT232RL
[   77.699715] usb 4-1: Number of endpoints 2
[   77.699719] usb 4-1: Endpoint 1 MaxPacketSize 64
[   77.699724] usb 4-1: Endpoint 2 MaxPacketSize 64
[   77.699728] usb 4-1: Setting MaxPacketSize 64
[   77.701241] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0
[   77.701285] usbcore: registered new interface driver ftdi_sio
[   77.701290] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver

After I did this, I opened the arduino IDE and did not see the USB connection under tools -> serial ports.

I left the ide running and disconnected, then reconnected the arduino -- still no change in the serial port options.

What do you get if you enter:

ls -l /dev/serial/by-*

Show us the results.

Udo

Here you go:

blaise@king-desktop:~$ ls -l /dev/serial/by-*
/dev/serial/by-id:
total 0
lrwxrwxrwx 1 root root 13 2010-05-24 08:51 usb-FTDI_FT232R_USB_UART_A9007CJU-if00-port0 -> ../../ttyUSB0

/dev/serial/by-path:
total 0
lrwxrwxrwx 1 root root 13 2010-05-24 08:51 pci-0000:00:04.0-usb-0:1:1.0-port0 -> ../../ttyUSB0

Does this help? What should I do to have access to ttyUSB0 in the ide?

I really appreciate the help!

Has the group you're attached to the rights to open serial communication?

Hi,
the output says the arduino is detected by the operating system so it should also be detected by the IDE.

Which java version is installed on your machine?

sudo update-alternatives --config java

Are there any error messages printed to the console window if you start up the IDE from the commandline.

Eberhard

Eberhard,

This is what I got:

There is only one alternative in link group java: /usr/lib/jvm/java-6-openjdk/jre/bin/java
Nothing to configure.

fdufnews,

I think so -- how do I check?

Thanks!

Hi,
OpenJdk works fine for most arduino users. If there are problems with this version they are mostly related to graphics or window-menus not working.

The alternative is to use the sun-java6-jre package (install, then run the update-alternatives line again to select it).

Please have a look at the IDE's startup messages again. Are there any error reports.

The Serial Ports Menu is only populated when the Arduino is plugged in. It takes a few seconds for the /dev/ttyUSB* entry to be added to the menu.

Please show us the output of ls -l /devttyUSB*

Eberhard

blaise@king-desktop:~$ ls -l /devttyUSB
ls: cannot access /devttyUSB: No such file or directory
blaise@king-desktop:~$ ls -l /devttyUSB0
ls: cannot access /devttyUSB0: No such file or directory

I don't understand -- when I typed lsusb before I would see the ftdi and everything else usb related. Now it just hangs (no output).

Regarding errors during the start up of IDE -- I don;'t see any in the ide window or the terminal window.

It is the case that every time I click to open the IDE for the first time since the computer is restarted, nothing happens. The second time (and all times after that) the ide seems to start normally.

Hi,
sorry I didn't check what I typed, missed a slash

ls -l /dev/ttyUSB*

Eberhard

This is what I got:

crw-rw---- 1 root dialout 188, 0 2010-05-25 08:11 /dev/ttyUSB0

Ok,
now what is the output of the 'groups' command?
It should list you as a member of group dialout

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

if not add yourself to this group

sudo adduser blaise dialout

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

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

just to be sure:

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.

Eberhard

I am new to linux -- I typed arduino and got this:

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?

Eberhard

What's the timestamp on that lock file? Could it be leftover from some other application using the com port?

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

:slight_smile: