EmbeddedRelated.com
Forums

Cypress-based USB-serial converters and Linux

Started by Lewin A.R.W. Edwards December 12, 2004
(Xposted to c.a.e because we've been talking about these adapters there
recently).

I'm trying to use a Cypress-based USB-serial adapter to connect an 8-bit
embedded system (http://www.larwe.com/technical/current.html) to a
Linux-based computer. Actually, I want to get it working on PPC Linux
running on an MPC8241 but as a first step, I'm trying to get it to work on
a regular PC.

I upgraded to 2.6.10-rc3 specifically to get the cypress_m8 driver. It
loads OK when I insert the cable, but when I power up the external device
and it starts sending bytes, I get a kernel message:

usbhid: probe of 1-2.4:1.0 failed with error -5

(which is -EIO)

When I attempt to send any byte to the external device, I get:

cyphidcom ttyUSB0: cypress_write - usb_submit_urb (write interrupt) failed
with status -19

(which is -ENODEV)

Has anyone seen this kind of behavior? Any fixes?

On Sun, 12 Dec 2004 19:06:37 GMT, Lewin A.R.W. Edwards wrote:
> (Xposted to c.a.e because we've been talking about these adapters there > recently). > > I'm trying to use a Cypress-based USB-serial adapter to connect an 8-bit > embedded system (http://www.larwe.com/technical/current.html) to a > Linux-based computer. Actually, I want to get it working on PPC Linux > running on an MPC8241 but as a first step, I'm trying to get it to work on > a regular PC. > > I upgraded to 2.6.10-rc3 specifically to get the cypress_m8 driver. It > loads OK when I insert the cable, but when I power up the external device > and it starts sending bytes, I get a kernel message: > > usbhid: probe of 1-2.4:1.0 failed with error -5 > > (which is -EIO) > > When I attempt to send any byte to the external device, I get: > > cyphidcom ttyUSB0: cypress_write - usb_submit_urb (write interrupt) failed > with status -19 > > (which is -ENODEV) > > Has anyone seen this kind of behavior? Any fixes?
I'm not an expert on USB but I've been spending a bit of time with it lately. First when you plug it in check /proc/bus/usb/devices look for the entry that pertains to your device. Next check to see if the P: Vendor=0cd5 ProdID=0001 match what is in the source code of the driver. -- Linux Home Automation Neil Cherry ncherry@comcast.net http://home.comcast.net/~ncherry/ (Text only) http://hcs.sourceforge.net/ (HCS II) http://linuxha.blogspot.com/ My HA Blog
> I'm trying to use a Cypress-based USB-serial adapter to connect an 8-bit > embedded system (http://www.larwe.com/technical/current.html) to a > Linux-based computer. Actually, I want to get it working on PPC Linux > running on an MPC8241 but as a first step, I'm trying to get it to work on > a regular PC. > > I upgraded to 2.6.10-rc3 specifically to get the cypress_m8 driver. It > loads OK when I insert the cable, but when I power up the external device > and it starts sending bytes, I get a kernel message: > > usbhid: probe of 1-2.4:1.0 failed with error -5 > > (which is -EIO) > > When I attempt to send any byte to the external device, I get: > > cyphidcom ttyUSB0: cypress_write - usb_submit_urb (write interrupt) failed > with status -19 > > (which is -ENODEV) > > Has anyone seen this kind of behavior? Any fixes? >
The usbhid error -EIO just means that this subsystem should not claim the device, which is the standard when the device is hid based (purposfully blacklisted so usb-serial can take it over). The -ENODEV error however is new to me. Give me a few hours to prepare a patch for rc3 with the latest development build.
Hi Neil,

> I'm not an expert on USB but I've been spending a bit of time with it > lately. First when you plug it in check /proc/bus/usb/devices look
for
> the entry that pertains to your device. Next check to see if the P:
Thanks for the reply, but I'm a bit past that point - the driver is definitely loading correctly (PID, VID match what's in modules.usbmap and the driver hotplugs properly). Looks like a driver issue...
Hi Lonnie,

Great :) FWIW, I am running at 115k2 8N1 with no flow control, using
minicom (at the moment). I've also experimented with the uisp in-system
programming tool for the Atmel STK500 and while it doesn't show the
kernel errors,

BTW, I would have expected to get the blacklist error when the driver
loads, no? It doesn't seem to work that way. Seems like the driver
loads without any messages, then once the first byte arrives and the
calling app tries to read it, that's when it reports the -EIO err.
-ENODEV happens when the app tries to write to the port.

I have the system working with other USB-serial adapters, so I know
there isn't a systemwide problem (though I gotta say, USB-serial isn't
very reliable overall!)

Let me know if that patch works.  I'll be submitting the latest development 
release soon to usb-devel so it might make it into 2.6.10 before it's 
released over the holidays. 


Er... where did you post that patch? Happy to test it tonight as long
as I can find it :)