>>>>> "Johan" == Johan Hovold <[email protected]> writes:
[...]
Johan> Ok, and you were using a terminal program such as minicom that
Johan> properly configures the port for say 8-bit words?
I was using GNU screen, which I don't specifically configure to be
8-bits, but I retried with minicom and specifically set a different byte
size (non-8) and then set it back to 8, and saw the same 5-bit like
behavior.
Johan> [...] But if I configure the port for 5-bit words, I get the
Johan> exact sequence you describe (i.e. the three most-significant bits
Johan> are masked out).
Johan> So my guess is that either you are not configuring the port
Johan> correctly (and are using the default settings), or the driver
Johan> fails to configure the port (and you are also stuck with the
Johan> default settings).
Johan> This may be a bit of long shot (or maybe not) but could you try
Johan> the below patch on top of usb-next as well? [...]
Your patch seems to have fixed it! Yay!
Johan> What is the lsusb -v output for you device? And what chip version
Johan> is reported when connect the device if you enable dynamic
Johan> debugging on usb-next (e.g. use "modprobe ch341 dyndbg==p").
# lsusb -v -d 1a86:7523
Bus 006 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1a86 QinHeng Electronics
idProduct 0x7523 HL-340 USB-Serial adapter
bcdDevice 2.54
iManufacturer 0
iProduct 2 USB2.0-Ser!
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 96mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 1
bInterfaceProtocol 2
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 0
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 1
Device Status: 0x0000
(Bus Powered)
dmesg shows this after reloading the ch341 module after rmmod/modprobe
as above:
[ 812.709627] usbcore: registered new interface driver ch341
[ 812.709643] usbserial: USB Serial support registered for ch341-uart
[ 824.444092] usb 6-2: new full-speed USB device number 4 using uhci_hcd
[ 824.622102] usb 6-2: New USB device found, idVendor=1a86, idProduct=7523
[ 824.622107] usb 6-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 824.622111] usb 6-2: Product: USB2.0-Ser!
[ 824.626324] ch341 6-2:1.0: ch341-uart converter detected
[ 824.626421] usb 6-2: ch341_control_in(c0,5f,0000,0000,ffff8d7fb5e77e80,8)
[ 824.628153] usb 6-2: Chip version: 0x30
[ 824.628156] usb 6-2: ch341_control_out(40,a1,0000,0000)
[ 824.629099] usb 6-2: ch341_control_in(c0,95,2518,0000,ffff8d7fb5e77e80,8)
[ 824.630097] usb 6-2: ch341_control_out(40,9a,2518,00c3)
[ 824.631096] usb 6-2: ch341_control_in(c0,95,0706,0000,ffff8d7fb5e77e78,8)
[ 824.632164] usb 6-2: ch341_control_out(40,a1,009c,b282)
[ 824.633098] usb 6-2: ch341_control_out(40,a4,ff9f,0000)
[ 824.634097] usb 6-2: ch341_control_in(c0,95,0706,0000,ffff8d7fb5e77e78,8)
[ 824.635309] usb 6-2: ch341-uart converter now attached to ttyUSB0
--
Russell Senior, President
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html