I’ve a bunch of USB FTDI USB-to-serial devices hooked up to ubuntu 12.04 64-bit.
The ports are of course randomly assigned as /dev/ttyUSB[0-9], so I added SYMLINKs to a new udev file like the code at the end. In that example that specific device’s port will always have a ttyUSB9 symlink i can hardcode. This link does show up correctly under ls /dev.
Any program i try (minicom, Matlab, etc) is unable to use the symbolic link. They do all open the port successfully, but i can’t read or write any characters. If I connect to the underlying port the link points to (eg ttyUSB1) then the connection works perfectly.
Someone else tried the exact same code on their system and it worked perfectly for them, ie the serial connection could send and receive characters.
What might be off on my system? I tried adding rw privileges with no change.
i changed to 99 not 9 since then, so with 99 here is the output:
rwxrwxrwx 1 root root 15 Aug 6 18:54 /dev/ttyUSB99 → bus/usb/003/053
I talked with the other person on whos system this worked, and they had one difference: SUBSYSTEM==“tty” instead of SUBSYSTEM==“usb”.
However on my system if i used the “tty” option, the alias will not show up.
An admin came around and poked around the system a fair bit (I couldn’t follow everything), and he also but couldn’t understand why the port wasn’t showing up. He believed everything was correct, except that he also thought it should have been “tty”; he did not know why it wouldn’t show up when I used that option. His last suggestion was to look for udev debugging tools.
Here’s the dmesg output:
[1734845.709119] usb 3-3: USB disconnect, device number 52
[1734845.709222] ftdi_sio ttyUSB4: FTDI USB Serial Device converter now disconnected from ttyUSB4
[1734845.709231] ftdi_sio 3-3:1.0: device disconnected
[1734848.672207] usb 3-3: new full-speed USB device number 53 using xhci_hcd
[1734848.739447] usb 3-3: New USB device found, idVendor=0403, idProduct=6001
[1734848.739449] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1734848.739451] usb 3-3: Product: FT232R USB UART
[1734848.739452] usb 3-3: Manufacturer: FTDI
[1734848.739453] usb 3-3: SerialNumber: A7045P4Z
[1734848.752461] ftdi_sio 3-3:1.0: FTDI USB Serial Device converter detected
[1734848.752483] usb 3-3: Detected FT232RL
[1734848.752484] usb 3-3: Number of endpoints 2
[1734848.752486] usb 3-3: Endpoint 1 MaxPacketSize 64
[1734848.752487] usb 3-3: Endpoint 2 MaxPacketSize 64
[1734848.752488] usb 3-3: Setting MaxPacketSize 64
[1734848.757488] usb 3-3: FTDI USB Serial Device converter now attached to ttyUSB4
That’s the serial number. Also, for another device that actually has a alphanumeric serial number, it still doesn’t work. Yeah, i tried “tty” after changing that.