Sorry if some of you have read this on other newsgroups, but I hadn't
seen developer.networking and this question may be more appropriate
here.
I have developed an application in Visual Studio 2003 using .NET
Compact Frameworks v1.0 and even tried the Visual Studio 2005 beta 1
with .NET CF v2.0. I have coded the application in both C# and Visual
Basic, with no difference in results. This application is to allow my
PocketPC (Mobile 2003) to talk to a Polar Heart Rate Monitor (TinyTP
IRDA protocol).
Here's my problem. I initate a connection from the PocketPC using the
rough sequence of commands:
irClient.DiscoverDevices
irClient.Connect(endPoint)
irStream=irClient.GetStream
I then proceed to transmit commands to the Polar device and receive
responses using the pair of commands:
irStream.Write(....)
irStream.Read(....)
I sucessfully transmit 4 commands (1 byte in length) and get the
receive data back (2-7 bytes in length). The fifth command is
transmitted (at least I know it returns from irStream.Write), but there
is no received data and the app hangs. It's not the command that is
causing the hang, because I can send the same request 5 times in a row,
and I hang on the fifth.
Here's the catch. I can run the exact same application on my laptop,
using its IR port, and all data is received from the Polar device.
Also, I can run the application allowing my PocketPC and laptop to
communicate together and that works flawlessly.
So, could there be a protocol negotiation problem between my PocketPC
and the Polar watch (even though laptop and watch work)?
I'd appreciate any suggestions, or if I should inquire about this on
another newsgroup, please direct me there.
Thanks,
Mike