Greg KH said the following on 03/14/10 02:16:
On Sat, Mar 13, 2010 at 02:23:17PM +1100, Bernardo wrote:
I'm working on an embedded device which our customers can configure (and
run some diagnostics) using serial port. The new version of the device has
an USB port instead and there is an issue how to let the customers
use it to perform configuration in a similar fashion. BTW the customers,
for all practical purposes, *always* run Windows on their PCs.
After a bit of searching the net an obvious solution was to use the
gadget serial module. That worked -- to a degree. When the host was
running GNU/Linux everything was fine. However when the host was running
Windows (XP) the comms would lock up after a while, usually a few minutes
but sometimes in less than a minute. To get the comms working again we
needed to disable/enable the USB port on the host side and restart the
application on the device, not something that would be acceptable.
Is the lockup happening on the device side, or on the host side? If
it's on the device, we would have a chance to fix this up. This should
work properly, as lots of people use it like you are wanting to. I
would recommend working through this to try to solve the issues as it
seems you are almost there.
greg k-h
Hi Greg,
My impression was that the host side was seizing up. Don't remember
seeing anything unusual in /var/log/messages on the device but will
double check it when back at work.
Also, g_serial never had to be unloaded/loaded again to get things back
to normal, when i tried doing that - it made no difference. But on the
host side i did have to disable/re-enable the USB port to get the comms
going again. Given that with a Linux host everything was working just
fine it seemed like the Windows driver was flaky.
Initially I didn't want to unnecessarily confuse the issue but there is
a bit more to the story and it may be worth mentioning; our application
(on the device side) is a multi threaded one where a separate thread is
reading/writing to the port; when it was replaced with a bare bone test
program that just reads from USB port and echoes lines back (literally
less than 10 lines of code) I didn't see any lockups. This was puzzling
but I'd really need to write a test program on the host side, pumping
more input to confirm there is indeed no lockup. I was just using
Hyperterminal (and TeraTerm too, made no difference) for quick testing.
--
Rgds, Bernardo
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html