I am using irsockets to connect my Nokia 6100 with my computer. The device is correctly discovered when I use getsocketopt() with IRLMP_ENUMDEVICES. The problem comes when I try to connect to the mobile phone it gives error.
Here is the discription from msdn:

10061:Connection refused.

I cannt seem to understand is the computer client or server in the IR communication. Also the address structure for IR is:

SOCKADDR_IRDA address = {AF_IRDA, 0, 0, 0, 0, "My service"}
It is passed to the connect call and the four zeros are set to the device id.Here the last argument is the service name to connect to or in case bind with. The client connects to the mobile with this service name and a lookup is performed against it for LSAP-SEL entry. What would be the value of this entry in case the mobile or PC.

The other way to get the LSAP-SEL entry is through the IAS_Query option to getsocketopt(). The structure for IAS query is:
typedef struct _WINDOWS_IAS_QUERY
u_char irdaDeviceID[4];
char irdaClassName[IAS_MAX_CLASSNAME];
char irdaAttribName[IAS_MAX_ATTRIBNAME];
u_long irdaAttribType;
LONG irdaAttribInt;
u_long Len;
u_char OctetSeq[IAS_MAX_OCTET_STRING];
} irdaAttribOctetSeq;
u_long Len;
u_long CharSet;
} irdaAttribUsrStr;
} irdaAttribute;
where I have obtained the DeviceID and I know that the AttributeName is IrDA:IrLMP:LsapSel. The thing that I do not know is the ClassName which is the sevice name to which the LSAP-SEL is bound.