Chris De Herrera's Windows CE Website

About
Discuss.Pocket PC FAQ Forum

Add Pocket PC FAQ to your Favorites
RSS    RSS Feeds
Wiki    Lost?
Custom Search
Subscribe    Print
Miscellaneous
Table of Contents
Mobile Format
News

[an error occurred while processing this directive]


 
Pocket PC Magazine Best Site

Website Awards
Website Updates

By Chris De Herrera 
Copyright 1998-2007
 All Rights Reserved
A member of the Talksites Family of Websites

Windows and Windows CE are trademarks of Microsoft
Corporation
and are used
under license from owner.
CEWindows.NET is not
associated with Microsoft 
Corporation.

All Trademarks are owned
by their respective companies.

ActiveSync 4.x Troubleshooting Guide - Connection Flow
By Chris De Herrera, Copyright 2005
 Version 1.07  Revised 12/19/2005

[an error occurred while processing this directive]

Sections:

    1. Installation

    2. Initial Configuration

    3. USB Issues

    4. Guest Issues

    5. Firewall and Proxy Issues

    6. Outlook Errors

    7. Synchronization Errors

    8. Mobile Information Server / Outlook Mobile Access

    9. Exchange ActiveSync Error Codes and Solutions

    10. Missing Calendar, Contacts or Tasks Items

    11. Security Advisories

    12. ActiveSync 4.x Troubleshooting Guide - General

    13. ActiveSync 4.x Troubleshooting Guide - Limitations

    14. ActiveSync 4.x Troubleshooting Guide - 85010014

    15. ActiveSync 4.x Troubleshooting Guide - Firewall, VPN, Proxy

    16. ActiveSync 4.x Troubleshooting Guide - Logs & Services

    17. ActiveSync 4.x Troubleshooting Guide - Connection Flow

    18. USB Advanced Network Functionality

    19. Microsoft ActiveSync 4.2 Troubleshooting

    20. Using ActiveSync 4.x and Visual Studio 2005 and the Emulator

    21. Understanding ActiveSync or WMDC Partnerships

Troubleshooting/Tips

This document provides an overview of the connection flow that ActiveSync uses to allow you to sync with your PC.

Installation - As part of the installation of ActiveSync 4.x, Microsoft installs:

  1. Install files for ActiveSync. Registers DLLs on the PC. The system creates the %temp%\activesync.log which lists the files installed.  Also, the %windir%\setupapi.log is created.  See the Windows SetupAPI White Paper for details.
  2. The RNDIS (Remote Network Driver Interface Specification) driver which creates a RNDIS interface.  The following protocols are bound to the RNDIS interface:
    a. TCP/IP (required)
    b. Client for Microsoft Networks (future use)
    c.  File and Print Sharing for Microsoft Networks (future use)
  3. Hot fixes for RNDIS
  4. Hotfix for Windows Media Player 10
  5. .INF file for all Pocket PC and Smartphone USB Vendor ID / Product IDs. The %windir%\setupapi.log is also created with the information on the driver installation.
  6. Adds exceptions to the Windows Firewall for ActiveSync -
    a. ActiveSync Application - C:\Program Files\Microsoft ActiveSync\WCESMgr.exe
    b. ActiveSync Connection Manager - C:\Program Files\Microsoft ActiveSync\wcescomm.exe
    c. ActiveSync RAPI Manager - C:\Program Files\Microsoft ActiveSync\rapimgr.exe, scope 169.254.2.0/255.255.255.0
    d. ActiveSync Service - TCP Port 26675, Scope 169.254.2.0/255.255.255.0
    Note: ActiveSync uses the following ports: 990 (RAPI), 999 (Status), 5678 (Legacy Replication), 5679 (Legacy Replication), 5721 (Desktop Passthrough), and 26675 (AirSync).

Initial Connection

  1. PC detects via USB. The user will see the following bubbles on the Task Bar "Generic RNDIS Device Detected", "Windows Mobile-Device Detected". "Found New Hardware - Your New Hardware is Installed and Read to Use" along with the new device sound.  It installs the driver via Plug and Play from the .INF file. If the Plug and Play service is stopped or the .INF is missing the system will not detect the device.  Windows 2000, Windows XP and Windows Server 2003 have the USB Plug and Play service started and set to Automatic by default..  This process only occurs the first time a device is plugged in.  If the device is detected ok and the driver is installed, then the device will be visible Device Manager (click Start - Run - devmgmt.msc).  Or you can use USBView (from Windows Device Driver Kit)
  2. Once the device is detected the Pocket PC or Smartphone is a DHCP server with the IP address 169.254.2.2.  The device provides an IP address of 169.254.2.1 to the PC (DHCP Client).  The user will see the RNDIS adapter acquiring an IP address (animated icon w/ circle moving left to right).   If the command ROUTE PRINT is entered you will see the following routes in addition to any other routes you had before ActiveSync was started:
    c:\route print
    ===========================================================================
    Interface List
    0x1 ........................... MS TCP Loopback interface
    0x30005 ...80 00 60 0f e8 00 ...... Windows Mobile-based Device #7
    ===========================================================================
    ===========================================================================
    Active Routes:
    Network Destination        Netmask          Gateway       Interface  Metric
            127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
          169.254.2.0    255.255.255.0      169.254.2.2     169.254.2.2       30
          169.254.2.2  255.255.255.255        127.0.0.1       127.0.0.1       30
      169.254.255.255  255.255.255.255      169.254.2.2     169.254.2.2       30
            224.0.0.0        240.0.0.0      169.254.2.2     169.254.2.2       30
      255.255.255.255  255.255.255.255      169.254.2.2     169.254.2.2       1
      255.255.255.255  255.255.255.255      169.254.2.2               2       1
    Default Gateway:       
    ===========================================================================
    Persistent Routes:
      None 
    
    Also, if you issue the command NETSTAT you will see a list of open ports similar to:
    c:\netstat -n
    
    Active Connections
    
      Proto  Local Address          Foreign Address        State
      TCP    169.254.2.2:990        169.254.2.1:1116       ESTABLISHED
      TCP    169.254.2.2:990        169.254.2.1:1117       ESTABLISHED
      TCP    169.254.2.2:5678       169.254.2.1:1118       ESTABLISHED
      TCP    169.254.2.2:5678       169.254.2.1:1119       ESTABLISHED
      TCP    169.254.2.2:5721       169.254.2.1:1212       TIME_WAIT
      TCP    169.254.2.2:5721       169.254.2.1:1213       TIME_WAIT
      TCP    169.254.2.2:5721       169.254.2.1:1215       TIME_WAIT
      TCP    169.254.2.2:5721       169.254.2.1:1218       TIME_WAIT
      TCP    169.254.2.2:5721       169.254.2.1:1219       TIME_WAIT
      TCP    169.254.2.2:5721       169.254.2.1:1220       TIME_WAIT
      TCP    169.254.2.2:26675      169.254.2.1:1222       ESTABLISHED
  3. ActiveSync detects the device and begins synchronization.  The ActiveSync icon begins to spin, turns Green and plays the ActiveSync start .wav file.  The PC opens the %temp%\wcescomm.log, %temp%\wceslog.log, %temp%\wcesmgr.log, %temp%\outstore.log.  These logs can be used to identify problems once the ActiveSync connection has started.
  4. Once ActiveSync has been able to successfully connect to the Pocket PC or Smartphone, the ActiveSync Icon on the taskbar will show Connected when you mouse over it.
  5. ActiveSync opens the new partnership dialog which allows the user to select the items to synchronize.

You may find that the use of the following tools can assist you with confirming that ActiveSync is working correctly:

  1. Ethereal or Netlog- This is a network sniffer for your PC.  It allows you to see the actual packets of data being sent or received over a network connection including the RNDIS connection.  Please note that this tool can expose your data to persons that view the logs it creates.   The logs require a significant level of technical detail to understand the information presented.
  2. Exchange Error Codes - Since ActiveSync uses the same AirSync protocol many of the errors are similar.
  3. ActiveSync 4.x Troubleshooting Guide
  4. ActiveSync 4.0 USB Connection Troubleshooting Guide

If your problem is not resolved here, try Bev Howard's Solving ActiveSync Issues, the Microsoft ActiveSync Troubleshooter or Microsoft's Knowledge Base search on ActiveSync or Microsoft's Knowledge Base search on Mobile Information Server.

[an error occurred while processing this directive]

Return to Chris De Herrera's Windows CE Website