How ActiveSync Worked in Windows Mobile 6.5
ActiveSync served as the primary data synchronization engine for Windows Mobile 6.5, enabling devices to exchange emails, contacts, calendar entries, tasks, and files with desktop computers and corporate servers. This article explains the underlying mechanisms of ActiveSync in Windows Mobile 6.5, detailing its local desktop integration, the Exchange ActiveSync (EAS) protocol for over-the-air communication, Direct Push technology, and conflict resolution systems.
Connection Architecture: Desktop vs. Over-the-Air
Windows Mobile 6.5 handled synchronization through two distinct channels: local desktop connections and direct over-the-air (OTA) server connections.
For local connections via USB, Bluetooth, or Infrared:
- On Windows XP systems, the device connected directly to the standalone Microsoft ActiveSync desktop application.
- On Windows Vista and Windows 7, the desktop role was handled by the Windows Mobile Device Center (WMDC), which utilized the underlying ActiveSync protocol.
- The desktop software acted as an intermediary between the mobile device and local applications—primarily Microsoft Outlook—translating data through Messaging Application Programming Interface (MAPI) pipelines and synchronizing user files via dedicated partner folders.
For remote synchronization, Windows Mobile 6.5 bypassed the desktop computer entirely by communicating directly with Microsoft Exchange Server (or compatible third-party mail servers) using Exchange ActiveSync (EAS) over cellular networks or Wi-Fi.
The Exchange ActiveSync (EAS) Protocol
Exchange ActiveSync operated as a client-server protocol built on top of standard web protocols:
- Transport and Security: EAS used HTTP and secure HTTPS (TCP port 443), allowing synchronization traffic to pass easily through firewalls and mobile carrier proxies without requiring specialized VPN connections.
- Data Formatting: To preserve mobile bandwidth and processor cycles, EAS used WBXML (Wireless Binary XML). Rather than sending verbose text-based XML payloads, WBXML tokenized common XML tags and data into compact binary representations, drastically reducing payload sizes.
- Commands: The protocol relied on specific HTTP
commands, including
SYNC(to upload and download object changes),PING(to monitor folders for updates), andPROVISION(to apply device management and security policies).
Direct Push Technology
A standout feature of ActiveSync in Windows Mobile 6.5 was "Direct Push," which delivered near-instantaneous email and calendar updates without the battery drain associated with constant polling.
Direct Push functioned through long-lived HTTP requests:
- The Windows Mobile 6.5 device sent an HTTP
PINGrequest to the Exchange server, specifying the folders it wanted to monitor and a "heartbeat" interval (typically between 8 to 30 minutes). - The server held the connection open and did not respond immediately.
- If new data arrived (such as an incoming email) during the heartbeat
period, the server responded to the
PINGrequest, notifying the device of the change. The device then initiated a standardSYNCcommand to fetch the new item. - If no changes occurred before the heartbeat interval expired, the
server sent a simple "OK" response. The device immediately sent a new
PINGto maintain the open line of communication. - If a connection dropped due to network fluctuations, the device dynamically adjusted the heartbeat interval downward to establish a more reliable connection.
Synchronization Anchors and Conflict Resolution
To maintain data integrity and prevent duplicate entries, ActiveSync tracked changes using synchronization keys ("SyncKeys"):
- Each folder on the device maintained a unique SyncKey provided by the server.
- Whenever a synchronization transaction completed successfully, the server generated a new SyncKey and sent it to the client.
- If a sync session was interrupted, the device presented its last known SyncKey during the next attempt. If the keys did not match, the system initiated a recovery sync to reconcile the differences.
When changes occurred on both the device and the server simultaneously (such as editing a contact on the phone while modifying it in desktop Outlook), ActiveSync resolved the collision according to user- or administrator-defined rules. By default, the server version took precedence over the mobile device, overwriting the local change to preserve the corporate master record.