Hi
I have an unknown-vendor USB-RS232 connector (it sais
MADE IN CHINA and that it supports Windows/Mac/Linux!)
According to lsusb the ID is
058f:9720 Alcor Micro Corp
I'm trying to use the `generic` driver but when I'm trying
to use /dev/ttyUSB0 nothing happens. The debug messages of
`generic` say "usb_serial_generic_write - already writing".
- I've also tried the pl2303 driver with this ID but I got
an Oops.
- I also tried the ACM driver because according to acm.txt
the parameters match. The cdc-acm driver said:
cdc-acm.c : This device cannot do calls on its own. It is no
modem.
cdc-acm 3-1:1.0: ttyACM0: USB ACM device
And it is not usable...
So back to `generic`.
Here is the /proc/bus/usb/devices entry:
#############################################
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=058f ProdID=9720 Rev= 0.00
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=(none)
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00
Driver=usbserial_generic
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
Here is `lsusb -v` for the device:
###################################################
Bus 003 Device 003: ID 058f:9720 Alcor Micro Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x058f Alcor Micro Corp.
idProduct 0x9720
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
Remote Wakeup
MaxPower 100mA
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
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 bytes 16 once
bInterval 1
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x01
call management
bDataInterface 1
CDC ACM:
bmCapabilities 06
sends break
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 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 bytes 64 once
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 bytes 64 once
bInterval 0
Here is the dmesg sessions:
##########################################################
# Here I insmod usbserial
############################################################
usbcore: registered new driver usbserial
/linux-2.6.17.13/$PATH/usb-serial.c: Had to override the open usb
serial operation with the generic one.
/linux-2.6.17.13/$PATH/usb-serial.c: Had to override the write usb
serial operation with the generic one.
/linux-2.6.17.13/$PATH/usb-serial.c: Had to override the close usb
serial operation with the generic one.
/linux-2.6.17.13/$PATH/usb-serial.c: Had to override the write_room usb
serial operation with the generic one.
/linux-2.6.17.13/$PATH/usb-serial.c: Had to override the
chars_in_buffer usb serial operation with the generic one.
/linux-2.6.17.13/$PATH/usb-serial.c: Had to override the
read_bulk_callback usb serial operation with the generic one.
/linux-2.6.17.13/$PATH/usb-serial.c: Had to override the
write_bulk_callback usb serial operation with the generic one.
/linux-2.6.17.13/$PATH/usb-serial.c: USB Serial support registered for
generic
usbcore: registered new driver usbserial_generic
/linux-2.6.17.13/$PATH/usb-serial.c: USB Serial Driver core
# Now I plug the device
##############################################################
ohci_hcd 0000:00:03.1: wakeup
usb 3-1: new full speed USB device using ohci_hcd and address 3
usb 3-1: configuration #1 chosen from 1 choice
/linux-2.6.17.13/$PATH/usb-serial.c: descriptor matches
/linux-2.6.17.13/$PATH/usb-serial.c: found interrupt in on endpoint 0
usbserial_generic 3-1:1.0: generic converter detected
usbserial_generic 3-1:1.0: Generic device with no bulk out, not allowed.
usbserial_generic: probe of 3-1:1.0 failed with error -5
/linux-2.6.17.13/$PATH/usb-serial.c: descriptor matches
/linux-2.6.17.13/$PATH/usb-serial.c: found bulk out on endpoint 0
/linux-2.6.17.13/$PATH/usb-serial.c: found bulk in on endpoint 1
usbserial_generic 3-1:1.1: generic converter detected
/linux-2.6.17.13/$PATH/usb-serial.c: get_free_serial 1
/linux-2.6.17.13/$PATH/usb-serial.c: get_free_serial - minor base = 0
/linux-2.6.17.13/$PATH/usb-serial.c: usb_serial_probe - setting up 1
port structures for this device
/linux-2.6.17.13/$PATH/usb-serial.c: usb_serial_probe - registering
ttyUSB0
usb 3-1: generic converter now attached to ttyUSB0
# Now I fire up minicom which is setup to use /dev/ttyUSB0
###########################
/linux-2.6.17.13/$PATH/usb-serial.c: serial_open
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_open - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_tiocmget - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5402
/linux-2.6.17.13/$PATH/usb-serial.c: serial_set_termios - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_tiocmget - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_tiocmset - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5402
/linux-2.6.17.13/$PATH/usb-serial.c: serial_set_termios - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5402
/linux-2.6.17.13/$PATH/usb-serial.c: serial_set_termios - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5402
/linux-2.6.17.13/$PATH/usb-serial.c: serial_set_termios - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x540b
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5402
/linux-2.6.17.13/$PATH/usb-serial.c: serial_set_termios - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5402
/linux-2.6.17.13/$PATH/usb-serial.c: serial_set_termios - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_ioctl - port 0, cmd 0x5401
/linux-2.6.17.13/$PATH/usb-serial.c: serial_write - port 0, 1 byte(s)
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_write - port 0
generic ttyUSB0: usb_serial_generic_write - length = 1, data = 0d
/linux-2.6.17.13/$PATH/generic.c:
usb_serial_generic_write_bulk_callback - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: usb_serial_port_softint - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: usb_serial_port_softint - port 0
/linux-2.6.17.13/$PATH/usb-serial.c: serial_write - port 0, 1 byte(s)
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_write - port 0
generic ttyUSB0: usb_serial_generic_write - length = 1, data = 41
/linux-2.6.17.13/$PATH/usb-serial.c: serial_write - port 0, 1 byte(s)
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_write - port 0
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_write - already
writing
# minicom freezes at this point forever.......
#######################################
# Now I kill -KILL minicom
###########################################################
/linux-2.6.17.13/$PATH/usb-serial.c: serial_close - port 0
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_close - port 0
/linux-2.6.17.13/$PATH/generic.c: generic_cleanup - port 0
/linux-2.6.17.13/$PATH/generic.c:
usb_serial_generic_write_bulk_callback - port 0
/linux-2.6.17.13/$PATH/generic.c:
usb_serial_generic_write_bulk_callback - nonzero write bulk status received: -2
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_read_bulk_callback
- port 0
/linux-2.6.17.13/$PATH/generic.c: usb_serial_generic_read_bulk_callback
- nonzero read bulk status received: -2
######################################################################################
I suspect that this device is utter cheapware and does as little as possible --
if anything at all. For example its Name, Manufacturer and Serial are all NULL.
On the other hand, it sais
bInterfaceProtocol 1 AT-commands (v.25ter)
and on the serial part of the cable, I've attached a modem. Could this be a sign
of connection?
Can anyone help me go further with it?
For example, I can't find where we set `write_urb_busy` to 0.
Perhaps we should just send the data and assume it got there without
any confirmation (?)
(and BTW, should we add 9720 as a recognized ProductID for Alcor?)
Thanks,
jf.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users