Hello everybody,


I just have a question concerning this error 10022 on HP ipac. I am trying
to use a socket connection in bluetooth but I get this error when I want to
connect to the remote device.
here is my code:
WORD wVersionRequested;
WSADATA wsaData;
int err;

wVersionRequested = MAKEWORD(1,0);

err = WSAStartup( wVersionRequested, &wsaData );
WSASetLastError(0);

if (err == 0) {
SOCKADDR_BTH sa;
BT_ADDR b = (BT_ADDR) 0x0050f2e46858;

SOCKET s = socket(AF_BT, SOCK_STREAM, BTHPROTO_RFCOMM);
fprintf(fp,"socket created %d\n", s);

memset(&sa, 0, sizeof(sa));
sa.addressFamily = AF_BT;
sa.btAddr = b;
sa.port = 1 & 0xff;
fprintf(fp,"Error %d\n",WSAGetLastError());
//HERE is where I get the 10022 error
(connect(s,....))
if(connect (s, (SOCKADDR *)&sa, sizeof(sa)))
{
fprintf(fp,"Error %d\n",WSAGetLastError());
}

closesocket(s);
fprintf(fp,"Connection done %d\n", err);
}
WSACleanup();
fprintf(fp,"Error %d\n",WSAGetLastError());



I read on a forum that I should buy and download the Broadco
SDK(http://64.233.161.104/search?q=cache:wRlSs7T2u3sJ:www.codecomments.com/archive425-2005-7-519040.html+btAddr&hl=en&lr=&strip=1)

Could someone confirm me this? Or otherwise help me to debug my program..

Thanks a lot for your help

Julien