So here it goes what I did to run it correctly
- I am working in VS.NET 2005.
- I have installed Microsoft ActiveSync 4.2 installed
- In VS..NET IDE I start Device Emulator Manager from Tool menu
- I right click on the Emulator I want to use (this case Pocket PC 2002), and select Connect. On successful it Shows green Play like button.
- I again right click on PPC 2002 and select "Cradle", On successful it will change to a pipe connector like symbol.
- The active Sync starts getting the connection request from emulator.
- The Active Sync was set in the connection setting with the checking all check boxes and specially the checkbox for 'Allow Connections to one of the following, with "DMA" in the combobox below it.
- On successful connection the Active sync ask for the type New Partnership. Choose the Guest Partnership click on next button.
- Active Sync should show that the device emulator is connected. (If not successful See note 1) - In the emulator select the Configure menu under File menu. Select the Peripherals option. Map the Serial port 0 to the COM4 (or the port to which the GPS is sending the data. See note 2 )
- Run the program from VS.NET 2005, the program should check the port COM1 for receiving the data. (since we have mapped our desktop's COM4 to Serial Port 0. If we map the COM4 to Serial port 1 then we have to look for COM2 and so on. I have only tried Serial port 0 and reading from COM1.)
- And that's it it your program should start receiving the data from GPS.
Note 1: If you have activesync connected first time successfully and then you disconnect, and try to cradle the emulator again, it might not connect. Then quit the ActiveSync, stop the process 'wcescomm.exe' from the task manager. Exit the emulator, start activesync, start emulator again and cradle it again.
Note 2: If your GPS is sending data via bluetooth, to find the port to which it's sending data after it's connected via bluetooth, open the bluetooth Advanced Configuration, go to Client Applications Tab, find out the line saying Bluetooth Serial Port, and in that line under the COM port column the port name can be found which is used by the bluetooth device to send the data to the desk top. In my case it's COM4. I unchecked the "secure connection" checkbox. Never tried with secure connection, so not sure about it. I hope this helps to many people.