I am having peculiar difficulties with infrared sockets. I have
created a simple application that sends and receives data via an
infrared socket connection, acting either as a server (listening on a
socket) or a client (doing the discovery). A similar application
exists for Windows as well. The problem is that the infrared socket
connection between two Symbian devices or between two Windows machines
works perfectly, but when the machines are mixed the data flows only
to Symbian device but not to the Windows machine. The situation is the
same regardless which device (Symbian or Windows) is acting as a
server or what versions of Windows (NT, 2000, 98) or Symbian devices
(9210, 7650) are used.
At this point I am not sure whether the culprit is the Symbian or
Windows application, but I would like to know whether anyone has
succeeded in creating a working two-way irda socket connection between
a Symbian device and a Windows machine.
thank you for your code first
but when I integrate it to my code,complie and run
and the problem occured.the debugger poped(vc6)
and if i chose to go on,the "kenal erroe..."will pop in the emulator
the problem is the same with the code in the sdk
"How to create a simple beaming application"
why is that?
Hi can anyone help me out? i trying to use the simple beaming application and try to run the send program but then it crash as it cannot open the RHostresolver even though i put in the right parameters. Does anyone noe why? and could anyone be kind to post out their full workable infra coding?
to send some data to the PC, and on the PC I just call
len = recv(client_sock, buf, sizeof(buf), 0);
on the connected socket. The send call returns, and WaitForRequest returns ok - and I can do that several times with no problem. recv never returns though... at least not until the client closes the socket, at which point it returns 0 (I don't get any errors from WSAGetLastError() either).
Does anyone have any ideas why I might be able to establish a connection, but not be able to actually receive any data, even though the send seems to be working?
I think I've gone some way to solving this... I was using some example code from msdn for the server, and that code was setting some IrCOMM IAS attributes. As the IAS entry already exists (or at least I think it should do), there's no need to do that, and in fact messing about with it seems to break it
So, I just took that code out and now I can receive some data from the phone. Currently not everything I send get received, but it's better than it was!
Anyway, thought I'd post this in case anyone else has this problem.
Sounds like many of us have struggled with the same problems. I've been trying to get a simple send/receive application between a 3650 and a WinPC to work for sometime now. Very frustrating! I wish the Symbian documentation was better.
My server runs on the PC and the client on the 3650. At this point I can discover the server, query my service using IAS and connect to it from the 3650. So far, so good. But I can't seem to be able to send or receive anything. Send just hangs (never returns) and receive returns with error -5 (NotSupported)! As far as I know, I'm doing nothing special that should cause this failure. Any help would be much appreciated.
A second question, I tried discovery using the HostResolver and the Ioctl discovery indicator. If there is no peer, HostResolver returns with an error immediately, which means I need to loop constantly. The Ioctl blocks until a peer is discovered (good) but then the socket connect fails (bad)! Any insights?
My PC server is your basic code:
- load winsock
- create socket
- accept(new sock)
- send/recv on new sock
The 3650 code is:
- connect to socket server
- force load of TinyTP protocol
- open socket
- open host resolver
- get by name
- do IAS lookup, set address
- send/recv on socket