Device not working with cdc_acm, but does with usbserial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

I bought this little USB device with Windows only support (using
usbser.sys - so pretty standard stuff I think). It connects through USB
and emulates a serial port. When I plug it in, the cdc_acm driver gets
loaded. However, the device doesn't work (as if it has no power). When I
unload cdc_acm and use usbserial (sudo modprobe usbserial vendor=0x04d8
product=0x000a) it does work.

I'd like the device to work with cdc_acm because I can not set the
serial baud rate using usbserial, and because my understanding is that
cdc_acm is a newer driver for the same functionality.

What can I do to get cdc_acm working with this device??

This is what I get from syslog when I insert the device (cdc_acm gets
loaded):
Apr  8 20:56:48 argon kernel: [ 8935.600089] usb 4-1: new full speed USB
device using uhci_hcd and address 12
Apr  8 20:56:48 argon kernel: [ 8935.761576] usb 4-1: configuration #1
chosen from 1 choice
Apr  8 20:56:49 argon kernel: [ 8936.354594] cdc_acm: This device cannot
do calls on its own. It is no modem.
Apr  8 20:56:49 argon kernel: [ 8936.355723] cdc_acm 4-1:1.0: ttyACM0:
USB ACM device
Apr  8 20:56:49 argon kernel: [ 8936.359019] usbcore: registered new
interface driver cdc_acm
Apr  8 20:56:49 argon kernel: [ 8936.360159] cdc_acm: v0.26:USB Abstract
Control Model driver for USB modems and ISDN adapters
Apr  8 20:56:49 argon NetworkManager: <debug> [1239217009.624247]
probe_modem(): Couldn't get caps

I then do the following:
- unplug the device
- unload cdc_acm
- blacklist cdc_acm
- replug the device

The device starts working. This is what I get from syslog:
Apr  8 21:01:46 argon kernel: [ 9232.952079] usb 4-1: new full speed USB
device using uhci_hcd and address 14
Apr  8 21:01:46 argon kernel: [ 9233.109605] usb 4-1: configuration #1
chosen from 1 choice

I only do not have a serial device yet, so I issue:
sudo modprobe usbserial vendor=0x04d8 product=0x000a

Then I get a /dev/ttyUSB0 and I can send commands. This is what syslog
shows:
Apr  8 21:03:08 argon kernel: [ 9315.302689] usbcore: registered new
interface driver usbserial
Apr  8 21:03:08 argon kernel: [ 9315.304050] usbserial: USB Serial
support registered for generic
Apr  8 21:03:08 argon kernel: [ 9315.305310] usbserial_generic 4-1:1.0:
Generic device with no bulk out, not allowed.
Apr  8 21:03:08 argon kernel: [ 9315.306778] usbserial_generic: probe of
4-1:1.0 failed with error -5
Apr  8 21:03:08 argon kernel: [ 9315.308100] usbserial_generic 4-1:1.1:
generic converter detected
Apr  8 21:03:08 argon kernel: [ 9315.309619] usb 4-1: generic converter
now attached to ttyUSB0
Apr  8 21:03:08 argon kernel: [ 9315.310808] usbcore: registered new
interface driver usbserial_generic
Apr  8 21:03:08 argon kernel: [ 9315.310819] usbserial: USB Serial
Driver core

/proc/bus/usb/devices does not exist, so I can not show you the output.

lsusb -vv gives the following:
Bus 004 Device 006: ID 04d8:000a Microchip Technology, Inc.
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               1.10
 bDeviceClass            2 Communications
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0        64
 idVendor           0x04d8 Microchip Technology, Inc.
 idProduct          0x000a
 bcdDevice            1.00
 iManufacturer           1 MDw
 iProduct                2 MISCHAKA BOOT
 iSerial                 0
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength           67
   bNumInterfaces          2
   bConfigurationValue     1
   iConfiguration          0
   bmAttributes         0xc0
     Self Powered
   MaxPower              300mA
   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 Header:
       bcdCDC               1.10
     CDC ACM:
       bmCapabilities       0x02
         line coding and serial state
     CDC Union:
       bMasterInterface        0
       bSlaveInterface         1
     CDC Call Management:
       bmCapabilities       0x00
       bDataInterface          1
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x81  EP 1 IN
       bmAttributes            3
         Transfer Type            Interrupt
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0008  1x 8 bytes
       bInterval             250
   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     0x02  EP 2 OUT
       bmAttributes            2
         Transfer Type            Bulk
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0040  1x 64 bytes
       bInterval             250
     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             250
Device Status:     0x0001
 Self Powered

In case it's relevant, stty -a -F /dev/ttyUSB0 gives:
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt
= ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon
-ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

Thanks in advance for any help or pointers you can give me.

With kind regards,

Jurrie

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux