Topic: USB 2.0 port not playing nice with USB 1.1 device: dual serial adapter

I'm currently struggling with, what appears to be, a driver problem when I attempt to connect a Manhattan Dual USB to Serial adapter to the Chumby One. The converter is a USB 1.1 device.

This works like a champ on the Chumby Classic.

When I connect the adapter and restart the chumby one, both Serial ports appear to be recognized ( /dev/ttyUSB0 and /dev/ttyUSB1 ).

However, when I attempt to access the second of the two devices (in either order), I get the following system error:

        pl2303 ttyUSB0: pl2303_open - failed submitting interrupt urb, error -28

This gets reported to my unix process as "Protocol Error", and the port  fails to work from that point on.

The requisite ftdi_sio driver is loaded properly and I've prevented getty from spawning a shell on ttyUSB0.

Searching for this same error message, I found another poor soul who was experiencing the EXACT same problem, but on a linux server:

http://lkml.indiana.edu/hypermail/linux … 00546.html

The solution to his problem was to configure the 2.0 port to behave like a 1.1 port using the following: echo 1 > /sys/class/usb_host/usb_host1/companion

Desperate as I am, I tried this and...  not surprisingly, it locked up everything having to do with USB.

It was implied in the linked thread that my problem is a symptom of the usb 1.1 device simply not being able to respond to interrupts fast enough.

I've tried resetting the USB hardware ( reset_usb.sh ) and restarting networking, but this merely clears the error. When I connect to the second port ( regardless of the order in which I connect to them ), the error recurs.

Any thoughts or suggestions?

-Sean

Re: USB 2.0 port not playing nice with USB 1.1 device: dual serial adapter

When you switch to the companion controller, it resets USB, including the wifi card.  Try running this:

echo 1 > /sys/class/usb_host/usb_host1/companion; start_network

Normally combining USB 2.0 and USB 1.1 devices isn't a problem, but perhaps that can at least get it working.

Re: USB 2.0 port not playing nice with USB 1.1 device: dual serial adapter

A very belated thank you for your suggestion.  I'm afraid the solution I found involved an ugly hack to the pl2303.c driver for the Prolific PL2303 USB-to-serial chip.

Basically, the pl2303_open function within the driver was receiving an error because the interrupt_in_urb structure associated with the serial port had an interval of 1, which was too short a wait-period for my slow, full-speed USB-to-Serial adapter.

Long story short, I hacked the pl2303.c file and set the interval to 32, recompiled the driver and it worked - at least for my specific adapter, which is fine. A sane person would have probably just bought an adapter with an FTDI chip... such is life under a deadline.

The pl2303 driver has gone through significant revisions since linux 2.6.28, so its possible this problem will magically fix itself when Chumby updates to the latest kernel source.

-Sean

Re: USB 2.0 port not playing nice with USB 1.1 device: dual serial adapter

As you mentioned a FTDI adapter is better. I have had several of the Prolific type and been frustrated about all of them. The drivers are incompatible with many devices and operating systems, even the newly updated drivers for Windows 7 and Linux. After I switched to the FTDI usb serial adapters I have had no problem. It a bit more expensive but its well worth the money.