Wine and IrDA via Virtual Com Port

Ove Kaaven ovehk at ping.uio.no
Fri Nov 22 10:27:40 CST 2002


On Thu, 21 Nov 2002, Ryan Reading wrote:

> The program is based on the commercial Greenleaf Comm++ libraries.  It
> is designed to be utilized in Windows on top of a *virtual* Com port
> running IrDA.  The software itself knows nothing of IrDA, it's the
> *virtual* Com port's responsibility to provide that.  Apparently it uses
> IrCOMM and TinyTP, but I'm just learning exactly what that means.

They probably just meant that the IrCOMM wire(less) protocol is based on
TinyTP. The app would have to use winsock to use any other IrDA protocol
than IrCOMM, and wine has no support for that yet (although I've
occasionally been thinking about what it would take to implement it).

> I setup Linux to run IrDA through /dev/ttyS0 (the physical IR serial
> device) on /dev/ircomm0 (the IrDA device).  I set 
> 
> "Com4" = "/dev/ircomm0".  
> 
> in the wine config file.

Sounds like a setup that should work if you set up IrDA and IrCOMM
correctly (loaded all the right modules, such as ircomm and ircomm-tty,
started irmanager, and enabled IrDA discovery, etc)

> So my question involves how to approach this problem.  I actually
> modified the Wine code to "overlook" the bad hEvent variable in
> WriteFile(), ReadFile(), and GetOverlappedResult() just for kicks to see
> what would happen.  When I do that, it actually sends stuff over the IR
> connection and processes more ( additional ReadFile[Ex](),
> WriteFile[Ex](), GetOverlappedResult() calls ), but obviously the
> handshaking doesn't complete correctly since I'm ignoring the error
> checking.

The IR handshaking is the IrDA discovery protocol's and IrCOMM's
(TinyTP's) responsibility, not the app's, the app only sees a virtual com
port. I don't think handshaking is an issue.

But if the device is opened in overlapped mode (is it?), then I think wine
currently does need the hEvent to synchronize properly, though I think
Martin Wilck would be the expert on that. Perhaps he could give more
insight?





More information about the wine-devel mailing list