Adventures in serial port.
andi at rhlx01.fht-esslingen.de
Mon Aug 16 13:03:24 CDT 2004
On Mon, Aug 16, 2004 at 06:43:45PM +1000, Scott Snell wrote:
> Hi All,
> I have been trying for several weeks to transfer our product to linux using
> wine. I am so close it hurts! The only issue has been the serial ports.
> Threads, sockets, and timers appear to be working as advertised (an
> impressive feat of wine as it is!). However the serial port has failed me.
> I have used versions 20040716 and 20040505 both as RPM's and source code
> (with various patches applied to the source). The major issue is
> reliability. I can successfully get test programs to echo back a character
> received on the serial port. However when I use the port in anger it often
> drops bytes. Calls to ReadFile will drop the last byte when the packet size
> is 30 bytes, and up to the last 5 bytes when the packet size is 200+ bytes.
> After a while calls to WriteFile will actually stop sending bytes even
> though it returns successfully. The program has several threads but I have
> modified it so that the calls to ReadFile/Writfile are in the same thread
> inside a loop. I set the timeout parameters to return immediately from a
> ReadFile with any available bytes. If you are interested I can post the
> shell of my code.
Yes, would be a good idea.
The best way would be to create a demo program that's as small as possible
exhibiting the problem. Then file it with a bug report.
But maybe something like WINEDEBUG=+file,+win32,+comm,+server,+relay
and a modified Wine with additional traces in the comm area could help?
Doesn't sound like it's extremely difficult to spot, but then I didn't
debug the program...
More information about the wine-devel