Problem with async. comm from Wine to a USB->Serial-converter

Wolfgang Walter wine at stwm.de
Wed Jun 3 05:20:26 CDT 2009


Am Donnerstag, 28. Mai 2009 schrieb Henrik Jacobsson:
> Hi.
>
> I just got myself a USB-GPS (GlobalSat BU-353) and wanted to
> run SeaClearII, a navigation-program with it.
> Turns out that Wine got confused when the USB->Serial-driver
> wasn't acting like a real serial-device though.
>
> The app does what it's supposed to do, but Wine consumes
> 100% of the available CPU.
>
> After some googling I found a patch that resolved this
> issue perfectly, and I'm curious why it never made it into
> trunk.
>
> The patch:
> http://www.nabble.com/serial-04-04%3A-fix%3A-WaitCommEvent()-does-not-work-
>asynchronously--make-WaitCommEvent()-better-usable-when-TIOCGICOUNT-is-not-i
>mplemented-tc20980550.html
>
> I only managed to apply this patch to 1.1.17.  Later
> releases had changed too much for my non-programmer-brain to
> cope with..
>
> I would really appreciate if someone in the know could check
> the patch out and if possible apply it to wine-proper..
>
> Thanks in advance..
> /Henrik

I posted the patch on wine-patches. But nobody commented on it so I don't know 
if it is ok or not. As we need it for several applications we use I have a 
version for newer wine versions. It is attached.

The patch actually fixes 3 things:

1) Fix WaitCommEvent() when used asynchronously

2) make wait_for_event() detect when serial fd is not valid any more

3) make events work better with serial devices not supporting TIOCGICOUNT
(Most drivers of usb2serial adapters do not support TIOCGICOUNT, nor do pseudo 
terminals)

Fix for 3) could be separated from 1) und 2) but I can't test 1) and 2) 
without 3).

Regards
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts
Leiter EDV
Leopoldstraße 15
80802 München
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-serial-fix-WaitCommEvent-does-not-work-asynchron.patch
Type: text/x-diff
Size: 14614 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090603/2d0cf3dc/attachment-0001.patch>


More information about the wine-devel mailing list