Hy Gaurav, it's fine,that should work correctly,so some little mistake anywhere that we are missing.can u change these line to count = NetLibReceive(AppNetRefnum, sockfd, recvBuffer, 7 , 0 ,NULL, &len, AppNetTimeout, &err); TO count = NetLibReceive(AppNetRefnum, sockfd, recvBuffer, 7 , 0 ,NULL, NULL,-1, &err);
And can u do device debug.or else at every line getting the error just put it in an alert,so that we can easily track where the error is getting.The device is not reachable,u mean the error at NetLibReceive?I was doing in GPRS,so getting the Dynamic IP of the device,just putting it from the sender program,I tested it Okey.So try it,and pl'z inform any status. Thankx Annada -----Original Message----- From: Gaurav Mengi [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 5:16 PM To: Palm Developer Forum Subject: Re: for Annada Prasana Hi Annada, The problem is that with tungsten C I'm not able to reach to the device .I can only send the packets from the device to the other m/c on the network but not from m/c to the device. AS u told me that I made even receive from NULL as u can see in the code....This is just a small prog where i'm expecting a HELLO packet from the m/c on the N/w to the tungsten c device.. /*************************************************************************** *******************/ bzero(&sockAddrP,sizeof(sockAddrP)); sockAddrP.family = netSocketAddrINET; sockAddrP.port = NetHToNS(6060); sockAddrP.addr =NetHToNL (netIPAddrLocal); len = sizeof(clientAddrP); sockfd = NetLibSocketOpen(AppNetRefnum,AF_INET,SOCK_DGRAM,0, AppNetTimeout,&err); result = NetLibSocketBind(AppNetRefnum, sockfd, (NetSocketAddrType *)&sockAddrP, sizeof(sockAddrP), AppNetTimeout,&err); NetLibSocketOptionSet(AppNetRefnum, sockfd, netSocketOptLevelSocket, netSocketOptSockNonBlocking, &flag, sizeof(flag), AppNetTimeout, &err); if(!result) { // count = NetLibReceive(AppNetRefnum, sockfd, recvBuffer, 7 , 0,(NetSocketAddrType *)&clientAddrP, &len, AppNetTimeout, &err); //As u had suggested receive from ADDR is NULL count = NetLibReceive(AppNetRefnum, sockfd, recvBuffer, 7 , 0 ,NULL, &len, AppNetTimeout, &err); if(count > 0) { result = StrCompare (recvBuffer, "HELLO"); if(!result) { FrmAlert(SuccessAlert); } else { FrmAlert(FailureAlert); } Thanx Gaurav Mengi..... /***************************************/ Click on the image to chat with me Powered by IMaround Patent pending presence and IM technology from Geodesic http://www.geodesiconline.com ----- Original Message ----- From: "Annada Prasana" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Friday, July 02, 2004 3:30 PM Subject: RE: for Annada Prasana > Hy Gaurav Mengi , > I was doing it for Treo 600.Can u tell me pl'z what exactly the problem u > r facing on device,wheather getting some junk value or not getting > anything.Actually when i got this type of problem ,firstly able to got some > junk values,then made the from address parameter of receive() to NULL,then > getting some value i have done for receive address.Pl'z tell what the things > u r getting on device. > Thankx > Annada > > -----Original Message----- > From: Gaurav Mengi [mailto:[EMAIL PROTECTED] > Sent: Friday, July 02, 2004 3:17 PM > To: Palm Developer Forum > Subject: Re: for Annada Prasana > > > Hi Annada, > Can U plzz tell me how did u overcome the problem of > NetLibReceive and On which device did u test that..I think I do the same as > ur code .... > I'm sorry for troubling u but i'm facing this problem from a > long time ..n don't find ne solution > > > Gaurav > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, > please see http://www.palmos.com/dev/support/forums/ > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
