Hi,

I have been trying for some time to get Palm and PC communicating through IrDA. On the 
PC side I use the following code (I am using VC 6.0):
------------------------------------------------------------------

SOCKADDR_IRDA   ServSockAddr  = { AF_IRDA, 0, 0, 0, 0, "TEST" };
SOCKET Sock;
if ((Sock = socket(AF_IRDA, SOCK_STREAM, 0)) == INVALID_SOCKET)
    {
         return;
    }    
    if (bind(Sock, (const struct sockaddr *) &ServSockAddr, 
             sizeof(SOCKADDR_IRDA)) == SOCKET_ERROR)
    {
        return;
    }
    if (listen(Sock, 5) == SOCKET_ERROR)
    {
         return;
    }
 
     RecvBuf = (char*)LocalAlloc(0, RXBUF_SIZE);

    while(1)    
    {    
         if ((NewSock = accept(Sock, (struct sockaddr *) &PeerSockAddr, 
               &sizeofSockAddr)) == INVALID_SOCKET)
          {
              return;
          }
     .....
    }

--------------------------------------------------------

On the Palm side I have:

IrOpen
IrBind
IrSetConTypeLMP
IrSetDeviceInfo
IrDiscoverReq
IrDataReq

The devices can see each other however I can not make them talk. Can anyone tell me 
what I need to do to? Any sample code or suggestions are welcome.

Thanx,
Drago




 ----- 
http://www.torba.com
http://www.uaportal.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to