Windows CE IRDA Architecture

The IrDA related Windows CE components are Irdastk.dll, Ircomm.dll and an IrDA NDIS miniport driver - typically Irsir.dll is used. For platforms with DMA based IrDA hardware, a platform specific IrDA NDIS miniport driver will be used.

 

Protocol Driver

The irdastk.dll component implements the IrDA protocol. It provides support for AF_IRDA Winsock sockets. It is an NDIS protocol driver and it binds to an underlying NDIS IrDA miniport driver.

 

Serial Based NDIS IrDA Miniport Driver

The irsir.dll component is a special IrDA NDIS miniport driver that talks to IrDA hardware that is exposed as a serial port. Early in IrDA history, it was appropriate to expose the IrDA hardware as a special serial port due to the lower speeds and simpler hardware abstraction. When irdastk.dll binds to the irsir.dll NDIS miniport, irsir.dll converts the NDIS miniport driver commands into appropriate Win32 serial port function calls. For instance, when irdastk.dll calls NdisSend(), NDIS routes the call to irsir.dll’s miniport SendHandler which in turn calls WriteFile() on the Irda serial port.

Many Windows Mobile devices still expose their IrDA hardware as a serial port.

 

Virtual Serial Port

The ircomm.dll component implements a virtual serial port. A serial port based application can communicate over IrDA without change just by using the serial port presented by ircomm.dll (i.e. “COM3:”). For each Win32 serial port function, ircomm.dll calls an appropriate AF_IRDA Winsock function. For instance, if an application calls WriteFile() using the ircomm.dll serial port handle, it causes ircomm.dll to call the Winsock send() function.

The serial port presented by Ircomm.dll has the index found under the registry key [HKEY_LOCAL_MACHINE\Drivers\Builtin\Ircomm] in the REG_DWORD value named “Index”.