problem with ttyUSB0 in slackware

Hi. I scanned the forum looking for exactly my issue. Forgive me if I missed it and created this topic in duplication of another.

I followed this page at playground/Linux/Slackware and performed some basic configuration and verified the kernel is detecting the device. Kernel is 2.6.31.6 by the way.

My main problem is the lack of a serial port config that can work. In the arduino IDE, that part of the menu is greyed out. I have followed some 'troubleshooting' hints i found here and there, but they are vague at best.

Not being new to linux (but relatively new to slackware) I understand the concepts on that page. I now duplicate some relevant information from my system to help paint the picture:

---snip from /var/log/messages
slacktop kernel: [17089.461241] usb 5-1: new full speed USB device using uhci_hcd and address 6
slacktop kernel: [17089.645288] usb 5-1: New USB device found, idVendor=0403, idProduct=6001
slacktop kernel: [17089.645293] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
slacktop kernel: [17089.645298] usb 5-1: Product: FT232R USB UART
slacktop kernel: [17089.645302] usb 5-1: Manufacturer: FTDI
slacktop kernel: [17089.645305] usb 5-1: SerialNumber: A6008uUp
slacktop kernel: [17089.645431] usb 5-1: configuration #1 chosen from 1 choice

root@slacktop:~# lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

root@slacktop:/etc/udev/rules.d# cat 09-local.rules
SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001",
ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_$attr{serial}"
SUBSYSTEMS=="usb", ATTRS{product}=="ARDUINO NANO", ATTRS{idProduct}=="6001",
ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_nano_$attr{serial}"

root@slacktop:~# ls -l /dev/arduino*
lrwxrwxrwx 1 root root 15 2009-11-27 01:28 /dev/arduino -> bus/usb/005/006
lrwxrwxrwx 1 root root 15 2009-11-27 01:28 /dev/arduino_A6008uUp -> bus/usb/005/006
lrwxrwxrwx 1 root root 15 2009-11-27 01:28 /dev/arduino_nano_A6008uUp -> bus/usb/005/006

That page I linked up at the top has this to say:

You may find that /dev/ttyUSBn doesn't exist, even if the kernel appears to have seen it and attached it to a device. This is likely because you're using Slackware with udev, and it has placed the device in /dev/tts/USBn. Check permissions; the default mode is 660 (or 600) and the group is tty, so your user either needs to be in group tty or you need to change the udev rules to change the permissions. The udev rules are in /etc/udev/rules.d/udev.rules

...OK, I don't really understand what this paragraph is saying. In my system as you can see above, it does not attach it to /dev/tts/foo but rather /dev/bus/usb/005/00n and I don't know how to make a /dev/ttyUSBn. Is this a job for mknod, and if so, what would the command be?

I think I found part of my problem.

I had enabled everything in the kernel I could find in menuconfig for ‘ATMEL’ or ‘ATMEGA’ or ‘ARDUINO’, but I had not configged for anything FTDI.

In the kernel config I selected USB_SERIAL_FTDI_SIO=m, then ran make, make modules, and make modules_install. I then grepped the modprobe list:

root@slacktop:/usr/src/linux-2.6.31.6# modprobe --list | grep ftdi
kernel/drivers/usb/serial/ftdi_sio.ko

root@slacktop:/usr/src/linux-2.6.31.6# modprobe ftdi_sio

root@slacktop:/usr/src/linux-2.6.31.6# lsmod
Module Size Used by
ftdi_sio 46836 0
usbserial 27028 1 ftdi_sio

I then replugged the Duemilanove, and checked /dev/arduino once more:

root@slacktop:/usr/src/linux-2.6.31.6# ls -l /dev/arduino*
lrwxrwxrwx 1 root root 7 2009-11-27 12:43 /dev/arduino → ttyUSB0
lrwxrwxrwx 1 root root 7 2009-11-27 12:43 /dev/arduino_A6008uUp → ttyUSB0

I still have a greyed out menu in the arduino IDE. My permissions for /dev/ttyUSB0 are, rather oddly, this:

<[ briareus@slacktop ]> ~/.arduino$ ls -l /dev/ttyUSB0
crw-rw-r-- 1 root dialout 188, 0 2009-11-27 12:52 /dev/ttyUSB0

dialout?

Hi,
maybe it helps if you add another symlink in your 09-local.rules file

root@slacktop:/etc/udev/rules.d# cat 09-local.rules
SUBSYSTEMS==“usb”, ATTRS{product}==“FT232R USB UART”, ATTRS{idProduct}==“6001”, ATTRS{idVendor}==“0403”, SYMLINK+=“arduino arduino_$attr{serial}”
SUBSYSTEMS==“usb”, ATTRS{product}==“ARDUINO NANO”, ATTRS{idProduct}==“6001”, ATTRS{idVendor}==“0403”, SYMLINK+=“arduino arduino_nano_$attr{serial}”

that creates links in /dev/ttyUSBX format

SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001",
ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_$attr{serial}" , SYMLINK+="ttyUSB%n"
SUBSYSTEMS=="usb", ATTRS{product}=="ARDUINO NANO",    ATTRS{idProduct}=="6001",
ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_nano_$attr{serial}" , SYMLINK+="ttyUSB%n"

Eberhard

Thank you! I just relogged into X after adding myself to the dialout group, and now the serial menu works in the arduino IDE and I can point it to /dev/ttyUSB0, so it looks like most of my problem is solved.

I do appreciate your input and I'm going to try that rule addition. Anything that will improve the functionality, eh? Thanks for the response.

Incidentally, do think anyone will mind if I re-write that arduino slackware page? I'd really like to improve it with what I just learned.

I just relogged into X after adding myself to the dialout group, and now the serial menu works in the arduino IDE and I can point it to /dev/ttyUSB0, so it looks like most of my problem is solved.

Then there should be no need to change your rules file. Most other distributions create the /dev/ttyUSBXX udev nodes in "50-default.rules" but its a bit inconsistent how the permisssions are set. KUbuntu allows every user to talk to a USB2Serial-converter like the one used on the arduino, others want the users to be in a special group.

Incidentally, do think anyone will mind if I re-write that arduino slackware page? I'd really like to improve it with what I just learned.

Go ahead, most of the linux-devoted pages are a bit outdated ...

Eberhard

OK! Thank you for the feedback. This weekend I will take all this and put it into a readable form, then look at updating that playground page.