How to: Use ActiveSync with the Emulator

Connecting to the emulator through ActiveSync is important for convenience in moving files between the desktop computer and the emulator, as well as for testing and debugging custom ActiveSync synchronization providers. The emulator supports ActiveSync between the host computer (with Microsoft ActiveSync version 3.7 installed) and the emulator image.

To use ActiveSync with the emulator, two available serial ports on the development workstation and a serial cable are required. The cable should be a straight-through cable, sometimes called an extension or a null modem cable (Belkin part number F2N209-6 or equivalent).

Note   To use a GSM radio that is connected to the emulator simultaneously with ActiveSync, the workstation might require additional serial ports. Serial ports COM1 through COM4 are the only usable ports within the emulator. For more information about setting up this option, see How to: Use Radio-Provided Wireless GSM Telephony in the Emulator.

To configure the development development workstation to use ActiveSync

  1. Connect each end of the serial cable to an available serial port (for example, COM1 or COM2).

  2. 'Ensure that the following registration key is set (COM# can equal COM1-COM4):

    [HKLM\SOFTWARE\Microsoft\Windows CE Services]
    "SerialPort"="COM#"
    
  3. If a Pocket PC device is connected to the workstation, remove the device from its cradle and disconnect the cradle from the workstation.

  4. In the ActiveSync application, on the File menu, click Connection Settings.

  5. Ensure that the Allow serial cable or infrared connection to this COM port check box is selected.

  6. Set the communications (COM) port in the drop-down list box to COM2 (or one of the COM ports to which the serial cable is connected).

  7. Click OK to close the Connection Settings dialog box.

  8. If you are using eMbedded Visual C++, do the following:

    1. On the Tools menu, click Configure Platform Manager.
    2. In the device list, click Pocket PC 2003 Emulator and then click Properties.
    3. Click the Configure button to the right of the Startup Server drop-down list box.
    4. In the drop-down list box next to Serial Port 1, click COM1 (or the other COM port to which the serial cable is connected).
    5. Click OK to close the Emulation Configuration Settings dialog box.
    6. Click Test.
  9. If you are using Visual Studio .NET 2003, do the following:

    1. On the Tools menu, click Options.
    2. Click Devices Tools, and then click Devices.
    3. In the Show devices for platform drop-down list box, click Pocket PC.
    4. In the Devices box, click Pocket PC 2003 Emulator.
    5. Click the Configure button to the right of the Startup server drop-down list.
    6. Click Hardware, and then click the COM port that is connected to the serial cable in the Serial port 1 drop-down list box.
    7. Click OK twice to save the configuration.
    8. Click Test.
  10. When the emulator image is loaded and Platform Manager has completed its test, press and hold CTRL (equivalent to the Action key on the device) and then click and hold the clock in the upper right of the title bar. When the shortcut menu appears, click Run.

    Note   When the emulator image loads, ActiveSync might try unsuccessfully to connect to it. If a dialog box appears, asking whether to disconnect the port from ActiveSync or retry, click retry.

  11. In the Run dialog box, type repllog and then click OK. The Repllog.exe file is the device-side part of ActiveSync that initiates a connection to the partner computer.

  12. ActiveSync on the desktop computer side of the development workstation detects when a client is trying to connect without an established partnership, causing the New Partnership Wizard to be displayed. (The same wizard appears when a new or cold-booted device is connected to a desktop computer.) In this wizard, first choose whether to establish a partnership or to connect as a guest.

    Note   Establishing a guest connection is convenient when the sole purpose of the connection is to transfer files by means of ActiveSync.

  13. Type a name to be used to identify the partnership and to set the device name of the emulator image.

  14. Select the types of information to be synchronized with the emulator.

  15. After a partnership is established, use the Save Emulator State option when exiting the emulator. This option preserves the partnership and data for future use in the emulator. For more information, see How to: Shut Down the Emulator.

When the New Partnership Wizard is complete, ActiveSync synchronizes the selected data to the emulator. Thereafter, any change made to the information (either in the emulator or on the desktop computer) is synchronized.

See Also

Emulator

How to: Use ActiveSync over Virtual Switch

Send feedback on this topic to the authors.

© 2005 Microsoft Corporation. All rights reserved.