usb-serial device doesn't appear in /dev. Need a udev rule?

My BBB is working fine under ubuntu, except that I can’t get my usb-serial device to mount. It’s a Startech ICUSB2321X. When I plug it in, I would expect to see a device like ttyUSB0, or something like that. I know the device is there, because lsusb shows the following:

Bus 001 Device 003: ID 14b0:3410 StarTech.com Ltd. 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

And dmesg shows these messages:

`
[ 1090.769610] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[ 1090.769766] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
[ 1090.769821] usb 1-1: USB disconnect, device number 2
[ 1090.769855] usb 1-1: unregistering device
[ 1090.769891] usb 1-1: unregistering interface 1-1:1.0
[ 1090.774514] usb 1-1: usb_disable_device nuking all URBs
[ 1090.887603] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
[ 1090.993074] usb 1-1: new full-speed USB device number 3 using musb-hdrc
[ 1091.114129] usb 1-1: ep0 maxpacket = 8
[ 1091.123467] usb 1-1: default language 0x0409
[ 1091.133129] usb 1-1: udev 3, busnum 1, minor = 2
[ 1091.133181] usb 1-1: New USB device found, idVendor=14b0, idProduct=3410
[ 1091.133220] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1091.133254] usb 1-1: Product: StarTech.com Adapter
[ 1091.133288] usb 1-1: Manufacturer: StarTech.com
[ 1091.133320] usb 1-1: SerialNumber: 00026722
[ 1091.137933] usb 1-1: usb_probe_device
[ 1091.137994] usb 1-1: configuration #1 chosen from 1 choice
[ 1091.139691] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 1091.140957] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[ 1091.141061] hub 1-0:1.0: port 1 enable change, status 00000103

`

usb-devices shows:

`
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=14b0 ProdID=3410 Rev=01.01
S: Manufacturer=StarTech.com
S: Product=StarTech.com Adapter
S: SerialNumber=00026722
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)

`

I’ve tried “modprobe usbserial”, but that doesn’t work. How do I create a usb serial device?

Thanks, for any help with this!

A quick search leads me to the 'ti_usb_3410_5052' module, is it being
loaded? You can check with lsmod:

~$ lsmod

~$ modinfo -d ti_usb_3410_5052
TI USB 3410/5052 Serial Driver

regards,
Nuno

Yes, I guess so.

`
ubuntu@weather:~$ lsmod
Module Size Used by
g_multi 56263 0
libcomposite 17081 1 g_multi

ubuntu@weather:~$ modinfo -d ti_usb_3410_5052
TI USB 3410/5052 Serial Driver

`

So, what does this tell me? I still don’t know how to get a serial device that my program can use. Or, should it just use /bus/usb/001/003? I tried ‘modprobe ti_usb_3410_5052’, and I get ‘ERROR: could not insert ‘ti_usb_3410_5052’: Operation not permitted’.

Thanks for the help. This is a bit new to me.

Try to do that using sudo or as root :slight_smile:

sudo modprobe ti_usb_3410_5052

If you want a more permanent solution that survives reboots, you can
either put that module into /etc/modules or setup udev to load it on
insertion.

regards,
Nuno

'ERROR: could not insert
'ti_usb_3410_5052': Operation not permitted'.

Thanks for the help. This is a bit new to me.

Try to do that using sudo or as root :slight_smile:

sudo modprobe ti_usb_3410_5052

If you want a more permanent solution that survives reboots, you can
either put that module into /etc/modules or setup udev to load it on
insertion.

Can you confirm this resolved your issue?

When I sudo, I no longer get an error on the modprobe (duh!), but it still doesn’t make a device at the /dev level, like /dev/ttyusb0 or similar. Should it? Or should I just have my software, which expects a serial device (it’s talking to a weather station) directly access /dev/bus/usb/001/003. If I want a tty-type device, is it enough to ‘ln -s /dev/bus/… /dev/ttyUSB’, either manually or with udev, or does a usb-serial device need some sort of pseudo-driver for serial protocols?

Thanks again!

Hi,
  you might want to take a look at 'dmesg' to see if a device is created
when inserting the kernel module.
  This is what I get when connecting a pl2303 based usb-rs232 adapter:

- (desktop x86 machine):
~$ uname -a
Linux antec 3.8.0-34-generic #49-Ubuntu SMP Tue Nov 12 18:00:10 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux

~$ lsb_release -a
LSB Version:
core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 13.04

[83848.138366] usb 2-1.8.6: new full-speed USB device number 8 using
ehci-pci
[83848.231040] usb 2-1.8.6: New USB device found, idVendor=067b,
idProduct=2303
[83848.231045] usb 2-1.8.6: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[83848.231047] usb 2-1.8.6: Product: USB-Serial Controller
[83848.231050] usb 2-1.8.6: Manufacturer: Prolific Technology Inc.
[83848.231337] pl2303 2-1.8.6:1.0: pl2303 converter detected
[83848.232879] usb 2-1.8.6: pl2303 converter now attached to ttyUSB0

- (beaglebone black)
~$ uname -a
Linux bb2 3.8.13-bone28 #1 SMP Fri Sep 13 01:11:14 UTC 2013 armv7l
armv7l armv7l GNU/Linux
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10

[ 472.737991] usb usb1: usb wakeup-resume
[ 472.738086] usb usb1: usb auto-resume
[ 472.738138] hub 1-0:1.0: hub_resume
[ 472.738259] hub 1-0:1.0: port 1: status 0101 change 0001
[ 472.840661] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[ 472.840787] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[ 472.946041] usb 1-1: new full-speed USB device number 2 using musb-hdrc
[ 473.065944] usb 1-1: default language 0x0409
[ 473.066357] usb 1-1: udev 2, busnum 1, minor = 1
[ 473.066401] usb 1-1: New USB device found, idVendor=067b, idProduct=2303
[ 473.066439] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 473.066473] usb 1-1: Product: USB-Serial Controller
[ 473.066505] usb 1-1: Manufacturer: Prolific Technology Inc.
[ 473.071233] usb 1-1: usb_probe_device
[ 473.071294] usb 1-1: configuration #1 chosen from 1 choice
[ 473.072221] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 473.080129] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[ 473.080247] hub 1-0:1.0: port 1 enable change, status 00000103
[ 473.175207] usbcore: registered new interface driver usbserial
[ 473.175427] usbcore: registered new interface driver usbserial_generic
[ 473.175638] usbserial: USB Serial support registered for generic
[ 473.193055] usbcore: registered new interface driver pl2303
[ 473.193317] usbserial: USB Serial support registered for pl2303
[ 473.193446] pl2303 1-1:1.0: usb_probe_interface
[ 473.193487] pl2303 1-1:1.0: usb_probe_interface - got id
[ 473.193564] pl2303 1-1:1.0: pl2303 converter detected
[ 473.206726] usb 1-1: pl2303 converter now attached to ttyUSB0

  As you can see, there's a ttyUSB0 device being created. Can you show
what you get from 'dmesg' or /var/log/kern.log ?

    Cheers,
      Nuno

The Startech device, with the TI chipset, continues to have the same problem. I’ve tried a couple of other converters, Keyspan and Trendnet, both of which use the Prolific chipset, and they do work, making both /dev/serial devices and /dev/ttyUSB0. It may be fixable with the Startech converter, but since the other converters work straight out of the box, I’m just going to use one of them and move on to the next step of making my system work.

Thanks for the help, Nuno!

Hi,

  if you feel brave enough, you could try to patch the kernel
drivers/usb/serial/ti_usb_3410_5052.{c,h} files and add the startech usb
vendor id, see attachment.
  Since I don't have that device, I cannot test it myself, but if works
with you it can then be sent upstream.
  Which kernel do you have (cat /proc/version)? I could compile the
module for you, if you are willing to test it.

  regards,
    Nuno

startech_usbserial.patch (1.55 KB)

My Startech device worked on my Windows 7 box, but not on my BBB / Rev C. The Solution: I ran a usb cable from my BBB to a USB hub that has its own power supply, then ran the Startech PL2303 from the hub to my modem. Worked fine. It was apparently a problem of not having enough power to operate correctly.

Hi - I have one of these startech devices - and I see the same behavior - out of the box if I plug it in, I get:

lsusb says:

Bus 001 Device 023: ID 14b0:3410 StarTech.com Ltd.

the kernel log says:

Sep 21 16:06:09 overkill kernel: [104648.529334] usb 1-1.5.1.3: new full-speed USB device number 23 using ehci-pci
Sep 21 16:06:09 overkill kernel: [104648.655372] usb 1-1.5.1.3: New USB device found, idVendor=14b0, idProduct=3410
Sep 21 16:06:09 overkill kernel: [104648.655379] usb 1-1.5.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 21 16:06:09 overkill kernel: [104648.655383] usb 1-1.5.1.3: Product: StarTech.com Adapter
Sep 21 16:06:09 overkill kernel: [104648.655387] usb 1-1.5.1.3: Manufacturer: StarTech.com
Sep 21 16:06:09 overkill kernel: [104648.655390] usb 1-1.5.1.3: SerialNumber: 00001321

But it does not attach to a ttyUSB port.

I don’t know how to patch / compile the kernel driver as noted below - could someone walk me through this, or could someone compile the patch below, and let me know how to test it?
It would be nice to get this fixed in the kernel.

I’m currently testing on:

Linux overkill 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:02:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Thanks,

Dan