views:

183

answers:

1

Hello,

Can anyone tell me how to send receive data between two applications over an ActiveSync connection?

In my scenario there will be one application running on a desktop and another on a windows mobile device, both these applications need to communicate among them. The connection between the desktop and the mobile device can be ActiveSync over USB or Bluetooth. I need the applications to exchange a continuous stream of data, more like a chat application. Ideally, the mobile device application will be sending out data 10-15 times a second (maybe more) and the desktop application will receive the data and display it.

For e.g., let’s consider the ‘Notes’ application for mobile device. Basically it allows user to save small textual notes. Now my application would be something similar, with the exception that it will send out all input it receives to the desktop application. The desktop app will receive the ‘inputs’ and process it.

Finally, I'm open to using any other option then ActiveSync, provided it supports Bluetooth.

Many Thanks!

~Vishal

A: 

You should check out ActiveSync api documentation for informations.

There is also an alternative solution, which I use.
Windows Mobile activates a temporary LAN when the device is connected on the USB.
You can use Window Sockets for the communication and avoid ActiveSync,
if it's not too much trouble for you.

Usually, the device gets IP 169.254.2.1 and the PC the 169.254.2.2.

Nick D
Thanks a lot for you response Nick D! I'll try to go with your suggestion of Windows Sockets since it does not require ActiveSync. However, I have one issue with that. Previously when I had Windows XP and when I used to connect my HTC Touch Diamond to it, the temporary LAN connection used to get created automatically. Now, I have Windows 7 and when I connect my phone via ActiveSync, the LAN connection does not get created. Any ideas on where I can start troubleshooting?Thanks again!
Vishal
@Vishal, I have tested the LAN solution only with the Windows XP / Windows Mobile 6.0 combination. I don't have Windows 7 but I can test it on Vista. Which Windows version has your phone?
Nick D
Windows Mobile 6.1 Professional. Thanks Nick!
Vishal
@Vishal, Vista doesn't recognize my PDA at this moment :-/ I tried Mobile Device Center 6.1 to connect the device. Did you had a similar problem? Anyway, I'll try to resolve this problem - probably on the weekend.
Nick D
Thanks for the test Nick! Windows 7 detected my device correctly the first time I attached it and installed Windows Mobile Device Center by itself, no issues with that. Yesterday, while meddling with my system, I noticed that the system does creates another LAN connection and names it 'HTC...' something. Now, when I checked its properties, I found that internet sharing was not enabled for it, I checked and enabled it but it still did not fix my problem. Thanks a lot for your R n D efforts buddy!
Vishal
no problem :) I'll need a solution too, in the near future, since my job involves PDA applications.
Nick D