[SOLVED] USB device has 2 endpoints, only one is created by udev
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
USB device has 2 endpoints, only one is created by udev
I have a USB GPS receiver that works perfectly under Windows by creating two "virtual serial ports" (COM15 and COM16).
When I plug the unit to my Linux box I get instead a single serial port ttyACM0. Useless to say I need both.
Now, lsusb -vvv says this:
Code:
Bus 002 Device 003: ID 152a:8230 Thesycon Systemsoftware & Consulting GmbH
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x152a Thesycon Systemsoftware & Consulting GmbH
idProduct 0x8230
bcdDevice 1.10
iManufacturer 1 Septentrio
iProduct 2 Septentrio USB Device
iSerial 0
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 91
bNumInterfaces 4
bConfigurationValue 2
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 255 Vendor Specific (MSFT RNDIS?)
iInterface 0
CDC Header:
bcdCDC 1.01
CDC ACM:
bmCapabilities 0x0e
connection notifications
sends break
line coding and serial state
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 255 Vendor specific
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 255 Vendor Specific (MSFT RNDIS?)
iInterface 0
CDC Header:
bcdCDC 1.01
CDC ACM:
bmCapabilities 0x0e
connection notifications
sends break
line coding and serial state
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 255 Vendor specific
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 62
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Header:
bcdCDC 1.01
CDC ACM:
bmCapabilities 0x0e
connection notifications
sends break
line coding and serial state
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0001
Self Powered
Once plugged in, the kernel reports this in the logs:
Code:
[ 2738.788150] usb 2-1.2: new full-speed USB device number 3 using ehci-pci
[ 2738.876575] usb 2-1.2: New USB device found, idVendor=152a, idProduct=8230
[ 2738.876584] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2738.876590] usb 2-1.2: Product: Septentrio USB Device
[ 2738.876594] usb 2-1.2: Manufacturer: Septentrio
[ 2738.941229] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
[ 2738.942171] usbcore: registered new interface driver cdc_acm
[ 2738.942174] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN
As far as i understood that could be an issue with udev not being configured to do so for this specific device.
Can anyone provide me with some hint or pointer to documentation (other than the generic udev one)?
Many thanks in advance.
Last edited by Uqbar; 09-29-2015 at 02:00 AM.
Reason: Solved
I'm not familiar with this device, but it might be that additional driver support is required to handle this. I did find this old thread asking the same question for same device
The user was communicating with a couple of kernel developers. There I did read this advice
Code:
> The cdc-acm driver cannot handle those ports, but a more forgiving
> generic driver can. I don't recommend it for normal use because it
> abuses the option driver, but Ben could do a simple test like this:
>
> echo 2 >/sys/bus/usb/devices/usbportname>/bConfigurationValue
> modprobe option
> echo 152a 8230 > /sys/bus/usb-serial/drivers/option1/new_id
>
> Unless I missed something, this should result in two /dev/ttyUSBx serial
> devices.
Some experimentation would be needed, but I'm hoping that using the option driver might help with exposing the additional serial interfaces. Ideally, this device would be best supported by a dedicated driver, but the above may be sufficient to gaining access to the required control and communication interfaces.
Thanks @ferrari for the useful link.
It actually works manually but I need a way to have it working at boot.
I can load the option kernel module in /etc/rc.local, but where should I put those two echos?
I was thinking about /etc/udev/rules.d/ but am not sure on how to do it.
Any hint?
where I identify the device with the fist two predicates, switch to the second configuration and enable the serial interface (ttyUSB1, ttyUSB3) for that device.
Very likely it's possible to refine the solution (I personally don't like that shell spawning) but as of now I am in rush with a deployable solution and will keep it as it's now. Thanks to all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.