* Linux USB Serial
@ 2012-09-17 19:28 Steven J. Ackerman
2012-09-17 20:07 ` Bjørn Mork
0 siblings, 1 reply; 9+ messages in thread
From: Steven J. Ackerman @ 2012-09-17 19:28 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Hello-
Looking to provide support under Linux for our device which implements
a USB virtual serial port using the Communications Device Class.
The device enumerates and communicates correctly under Windows XP,
and shows up under lsusb -v command as:
Bus 005 Device 005: ID 0c6a:0005
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0c6a
idProduct 0x0005
bcdDevice 1.00
iManufacturer 1 ACS
iProduct 2 ACS-LCD-Color-320x240
iSerial 3 1.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 32
bInterfaceProtocol 0
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 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 255
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 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
Device Status: 0x0000
(Bus Powered)
However it does not show up without the -verbose option.
Trying to load the usbserial module to activate the device results in the
following error:
FATAL: Module vendor=0x0c6a not found.
Can anyone provide assistance in how to troubleshoot why Linux is
not happy with this USB device ?
Thank you,
Steven J. Ackerman, Consultant
ACS, Sarasota, FL
http://www.acscontrol.com
mailto:steve-I01wfHm1r9xGyKhy+UYuEA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Linux USB Serial 2012-09-17 19:28 Linux USB Serial Steven J. Ackerman @ 2012-09-17 20:07 ` Bjørn Mork 2012-09-17 21:07 ` Steven J. Ackerman 0 siblings, 1 reply; 9+ messages in thread From: Bjørn Mork @ 2012-09-17 20:07 UTC (permalink / raw) To: Steven J. Ackerman; +Cc: linux-usb, linux-serial "Steven J. Ackerman" <steve@acscontrol.com> writes: > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 0 > bAlternateSetting 0 > bNumEndpoints 1 > bInterfaceClass 2 Communications > bInterfaceSubClass 32 Looks like your bInterfaceSubClass is nibble swapped. It should be 0x02 for ACM, not 0x20. Bjørn -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Linux USB Serial 2012-09-17 20:07 ` Bjørn Mork @ 2012-09-17 21:07 ` Steven J. Ackerman 2012-09-17 21:41 ` Greg KH 2012-09-18 6:46 ` Oliver Neukum 0 siblings, 2 replies; 9+ messages in thread From: Steven J. Ackerman @ 2012-09-17 21:07 UTC (permalink / raw) To: 'Bjørn Mork'; +Cc: linux-usb, linux-serial Bjrn- Thank you for your response. This change gets me closer. I can now successfully execute the modprobe without error, but the device still doesn't show up in /dev/ttyUSB? . sja@UBUNTU-10:~$ sudo modprobe usbserial vendor=0x0c6a product=0x0005 sja@UBUNTU-10:~$ lsusb Bus 005 Device 004: ID 0c6a:0005 Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 003: ID 045e:0048 Microsoft Corp. Office Keyboard 1.0A Bus 002 Device 002: ID 0557:7000 ATEN International Co., Ltd Hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub I guess it's still not happy about something... Steven J. Ackerman, Consultant ACS, Sarasota, FL http://www.acscontrol.com mailto:steve@acscontrol.com > -----Original Message----- > From: Bjørn Mork [mailto:bjorn@mork.no] > Sent: Monday, September 17, 2012 4:08 PM > To: Steven J. Ackerman > Cc: linux-usb@vger.kernel.org; linux-serial@vger.kernel.org > Subject: Re: Linux USB Serial > > "Steven J. Ackerman" <steve@acscontrol.com> writes: > > > Interface Descriptor: > > bLength 9 > > bDescriptorType 4 > > bInterfaceNumber 0 > > bAlternateSetting 0 > > bNumEndpoints 1 > > bInterfaceClass 2 Communications > > bInterfaceSubClass 32 > > Looks like your bInterfaceSubClass is nibble swapped. It should be 0x02 > for ACM, not 0x20. > > > Bjrn -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Linux USB Serial 2012-09-17 21:07 ` Steven J. Ackerman @ 2012-09-17 21:41 ` Greg KH 2012-09-17 21:56 ` Steven J. Ackerman 2012-09-18 6:46 ` Oliver Neukum 1 sibling, 1 reply; 9+ messages in thread From: Greg KH @ 2012-09-17 21:41 UTC (permalink / raw) To: Steven J. Ackerman; +Cc: 'Bjørn Mork', linux-usb, linux-serial On Mon, Sep 17, 2012 at 05:07:26PM -0400, Steven J. Ackerman wrote: > Bjrn- > > Thank you for your response. > > This change gets me closer. I can now successfully execute the modprobe > without error, but the device still doesn't show up in /dev/ttyUSB? . > > sja@UBUNTU-10:~$ sudo modprobe usbserial vendor=0x0c6a product=0x0005 Eeek, no, never do that with a device you actually want to use. This should be controlled by the cdc-acm driver, not the usbserial driver. That driver should be auto-loaded for this device, but it looks like the descriptor is wrong, so it's not binding to it. Are you able to test a patch and rebuild the kernel to see if we can get this to work properly? thanks, greg k-h ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Linux USB Serial 2012-09-17 21:41 ` Greg KH @ 2012-09-17 21:56 ` Steven J. Ackerman 2012-09-17 22:08 ` 'Greg KH' 0 siblings, 1 reply; 9+ messages in thread From: Steven J. Ackerman @ 2012-09-17 21:56 UTC (permalink / raw) To: 'Greg KH'; +Cc: 'Bjørn Mork', linux-usb, linux-serial Greg- Thanks for your response. Not sure if I need the cdc-acm functionality or not. This is a color lcd display that supports a usb serial interface to interact. I really just need to be able to send and receive characters and NAK the pipe back temporarily when my input buffer is full. The descriptors were supplied by the chip vendor - Renesas - as part of a CDC demo application. The VID/PID is ours. The device works great under Windows XP with the descriptors as shown previously - even with the Communications bInterfaceSubClass value wrong. Doing the modprobe, etc. was based upon some blog posts that purported to show how to add support for an unknown usb serial device. Looking at the descriptor for a FTDI USB serial to TTL cable it seems a lot simpler, but it does indicate vendor specific class, subclass and protocol - which means that it requires a custom driver - ftdi_sio - right ? I don't really want to have to develop and support that. I don't think that I have enough Linux experience to be able to test a patch and rebuild of the kernel, and I don't think that I can ask my customers to do that it order to use our product as a simple serial display. I'm running Ubuntu 10.10. Any additional pointers and/or ideas would be greatly appreciated. Thank you again, Steven J. Ackerman, Consultant ACS, Sarasota, FL http://www.acscontrol.com mailto:steve@acscontrol.com > -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Monday, September 17, 2012 5:42 PM > To: Steven J. Ackerman > Cc: 'Bjørn Mork'; linux-usb@vger.kernel.org; linux-serial@vger.kernel.org > Subject: Re: Linux USB Serial > > On Mon, Sep 17, 2012 at 05:07:26PM -0400, Steven J. Ackerman wrote: > > Bjrn- > > > > Thank you for your response. > > > > This change gets me closer. I can now successfully execute the modprobe > > without error, but the device still doesn't show up in /dev/ttyUSB? . > > > > sja@UBUNTU-10:~$ sudo modprobe usbserial vendor=0x0c6a > product=0x0005 > > Eeek, no, never do that with a device you actually want to use. This > should be controlled by the cdc-acm driver, not the usbserial driver. > That driver should be auto-loaded for this device, but it looks like the > descriptor is wrong, so it's not binding to it. > > Are you able to test a patch and rebuild the kernel to see if we can get > this to work properly? > > thanks, > > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Linux USB Serial 2012-09-17 21:56 ` Steven J. Ackerman @ 2012-09-17 22:08 ` 'Greg KH' 2012-09-17 22:27 ` Steven J. Ackerman 0 siblings, 1 reply; 9+ messages in thread From: 'Greg KH' @ 2012-09-17 22:08 UTC (permalink / raw) To: Steven J. Ackerman Cc: 'Bjørn Mork', linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-serial-u79uwXL29TY76Z2rM5mHXA A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Mon, Sep 17, 2012 at 05:56:46PM -0400, Steven J. Ackerman wrote: > Greg- > > Thanks for your response. > > Not sure if I need the cdc-acm functionality or not. > > This is a color lcd display that supports a usb serial interface to > interact. I really > just need to be able to send and receive characters and NAK the pipe back > temporarily when my input buffer is full. That's fine, the cdc-acm interface will work for that. > The descriptors were supplied by the chip vendor - Renesas - as part of a > CDC demo application. The VID/PID is ours. The device works great under > Windows XP with the descriptors as shown previously - even with the > Communications bInterfaceSubClass value wrong. But is your device really a CDC ACM device? Or is it something else? > Doing the modprobe, etc. was based upon some blog posts that purported > to show how to add support for an unknown usb serial device. Yes, but that's a one-off, and your kernel should have told you that you shouldn't be doing that, if you are using a modern kernel release. > Looking at the descriptor for a FTDI USB serial to TTL cable it seems a lot > simpler, > but it does indicate vendor specific class, subclass and protocol - which > means > that it requires a custom driver - ftdi_sio - right ? I don't really want > to have to > develop and support that. You wouldn't, if you use the ftdi serial chip in your device. Which begs me to ask, what type of usb to serial chip is in your device? What protocol does it use to talk to the host? > I don't think that I have enough Linux experience to be able to test a patch > and rebuild of the kernel, and I don't think that I can ask my customers to > do that it order to use our product as a simple serial display. They shouldn't have to do that, once we get it working, they get the update automatically from their distro. But if you can't test any changes we make to try to get this to work, there's not much we can do here, right? I think you need to figure out the protocol used by your device to talk to the host. If you get that worked out, we can help to get Linux working with it. Oh, and fix that descriptor up in your firmware, that might solve everything :) Hope this helps, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Linux USB Serial 2012-09-17 22:08 ` 'Greg KH' @ 2012-09-17 22:27 ` Steven J. Ackerman 0 siblings, 0 replies; 9+ messages in thread From: Steven J. Ackerman @ 2012-09-17 22:27 UTC (permalink / raw) To: 'Greg KH'; +Cc: 'Bjørn Mork', linux-usb, linux-serial > That's fine, the cdc-acm interface will work for that. > > But is your device really a CDC ACM device? Or is it something else? The device is a 3.5" color LCD display with touchscreen that can act as a serial terminal. It just needs to be able to send and receive characters over an USB serial port. > You wouldn't, if you use the ftdi serial chip in your device. Which > begs me to ask, what type of usb to serial chip is in your device? What > protocol does it use to talk to the host? The device is based upon a Renesas RX62N processor which has a USB interface in it. The protocol is supposedly based upon the CDC - a control endpoint and two bulk endpoints. The software was derived from a demo supplied by the manufacturer - and it does work under Windows. The device enumerates as a COM port and you can interact with the display using a program or a terminal emulator. Unfortunately the chip vendor doesn't have any support for Linux. > They shouldn't have to do that, once we get it working, they get the > update automatically from their distro. But if you can't test any > changes we make to try to get this to work, there's not much we can do > here, right? > I guess that I'm operating under the assumption that there is something wrong on my end - an incorrectly configured descriptor for example. It appears the other USB serial devices work OK under Linux - even without custom drivers. I'm hoping that I can find an error message somewhere that will tell me what I'm doing wrong - or that somebody who has been down that path before can't point to something obvious - like Bjrn did. > Oh, and fix that descriptor up in your firmware, that might solve > everything :) Going through the USB CDC documentation between e-mails. Other than the incorrect bInterfaceSubClass value - which I have corrected - nothing else seems wrong. > > Hope this helps, > > greg k-h Always appreciate your assistance - thank you! Steven J. Ackerman, Consultant ACS, Sarasota, FL http://www.acscontrol.com mailto:steve@acscontrol.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Linux USB Serial 2012-09-17 21:07 ` Steven J. Ackerman 2012-09-17 21:41 ` Greg KH @ 2012-09-18 6:46 ` Oliver Neukum [not found] ` <5789366.GGq3fAeCyr-ugxBuEnWX9yG/4A2pS7c2Q@public.gmane.org> 1 sibling, 1 reply; 9+ messages in thread From: Oliver Neukum @ 2012-09-18 6:46 UTC (permalink / raw) To: Steven J. Ackerman; +Cc: 'Bjørn Mork', linux-usb, linux-serial On Monday 17 September 2012 17:07:26 Steven J. Ackerman wrote: > Bjrn- > > Thank you for your response. > > This change gets me closer. I can now successfully execute the modprobe > without error, but the device still doesn't show up in /dev/ttyUSB? . It shouldn't. Your device follows the CDC ACM specification, aside from the incorrect subclass. Such devices don't generate /dev/ttyUSB devices nodes. They generate /dev/ttyACM nodes. > sja@UBUNTU-10:~$ sudo modprobe usbserial vendor=0x0c6a product=0x0005 That is the wrong driver. usbserial is for vendor specific serial devices. Your device follows a class specification. You need cdc_acm. As soon as the subclass is fixed, it should autoload. If cdc_acm doesn't bind, please post "dmesg". Regards Oliver ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <5789366.GGq3fAeCyr-ugxBuEnWX9yG/4A2pS7c2Q@public.gmane.org>]
* RE: Linux USB Serial [not found] ` <5789366.GGq3fAeCyr-ugxBuEnWX9yG/4A2pS7c2Q@public.gmane.org> @ 2012-09-18 14:00 ` Steven J. Ackerman 0 siblings, 0 replies; 9+ messages in thread From: Steven J. Ackerman @ 2012-09-18 14:00 UTC (permalink / raw) To: 'Oliver Neukum' Cc: 'Bjørn Mork', linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-serial-u79uwXL29TY76Z2rM5mHXA > It shouldn't. Your device follows the CDC ACM specification, aside from > the incorrect subclass. Such devices don't generate /dev/ttyUSB devices > nodes. They generate /dev/ttyACM nodes. > Thank you. I did some more research on this last night and found out that I was being mis-lead by observing how other USB Serial devices were working and used under Linux - without having to install a driver. Apparently these were all using the FTDI chip - and there is a driver that is already installed for them. > That is the wrong driver. usbserial is for vendor specific serial devices. > Your device follows a class specification. You need cdc_acm. As soon > as the subclass is fixed, it should autoload. > Yes - the driver now autoloads and I can communicate with the device using the /dev/ttyACM0 node. I was able to install picocom and talk to and from our display. Thanks to everyone who replied to this question for your assistance. Steven J. Ackerman, Consultant ACS, Sarasota, FL http://www.acscontrol.com mailto:steve-I01wfHm1r9xGyKhy+UYuEA@public.gmane.org -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-09-18 14:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 19:28 Linux USB Serial Steven J. Ackerman
2012-09-17 20:07 ` Bjørn Mork
2012-09-17 21:07 ` Steven J. Ackerman
2012-09-17 21:41 ` Greg KH
2012-09-17 21:56 ` Steven J. Ackerman
2012-09-17 22:08 ` 'Greg KH'
2012-09-17 22:27 ` Steven J. Ackerman
2012-09-18 6:46 ` Oliver Neukum
[not found] ` <5789366.GGq3fAeCyr-ugxBuEnWX9yG/4A2pS7c2Q@public.gmane.org>
2012-09-18 14:00 ` Steven J. Ackerman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).