6.0.0-git
2024-03-29

Diff for ActiveSync between 85 and 86

[[toc]]

+ !ActiveSync

Horde 4 has support for allowing Horde to sync with mobile devices using the mobile device's support for Microsoft Exchange/!ActiveSync. The code that Horde's !ActiveSync implementation uses for handling the protocol communication is based in part on the Z-Push library (http://z-push.sourceforge.net).

++ People

[MichaelRubinsky Michael Rubinsky]

++ Description

The Horde !ActiveSync implementation provides over the air synchronization of contacts, calendar, and task data to devices such as the iPhone/iPod Touch, Android and any other system supporting !ActiveSync. This implementation supports Microsoft !ActiveSync protocol versions up to 2.5 - the version implemented by Microsoft Exchange 2003.

++ Setup

!ActiveSync support is fairly stable, but there are still devices on which it has not been tested yet. If you have used a device with Horde's !ActiveSync support that is not listed below, please feel free to let us know how it went.

To activate the server, it needs to be enabled in Horde's configuration, on the !ActiveSync tab. It's already enabled by default. The SQL tables that horde uses are created as usual from the Horde configuration screen.

Next, you will need to configure your webserver to redirect the URL /Microsoft-Server-ActiveSync to your horde/rpc.php file. How you do this depends on your webserver and it's configuration. For Apache, something like:
<code>
Alias /Microsoft-Server-ActiveSync /var/www/horde/rpc.php
</code>

or for lighttpd:

<code>
alias.url = ("/Microsoft-Server-ActiveSync" => "/var/www/horde/rpc.php");
</code>

++ What works

Contacts, Calendar and Task syncing are working. Note that not all devices support Tasks. Of the tested devices, iPhone/iPod and Android are both lacking native Task applications. The !TouchDown client and Windows Mobile emulator both support Tasks.

Client searching of an "Exchange Global Address List" (GAL) is supported, provided that Turba (or other application providing the //contacts// api) is configured to provide a GAL. See the Turba configuration for details.

Provisioning along with remote wipe is also working on devices that actually support it. 

This code has been reported to work on the following devices:
|| Device || Version(s) || Provisioning || GAL Searching || Notes ||
|| Android SDK Emulator|| 2.0.1 and 2.1 || Does NOT support provisioning and will NOT work with it set to //Force//.|| No native support. || Contacts only as the emulator does not have a native calendar application ||
|| HTC Desire Z / HTC Desire HD || 2.2 || ? || ? || Contacts and Calendar via native !ActiveSync, SSL untested ||
|| HTC Magic || Android 2.2.1 unbranded || ? || ? || Contacts, Calendars ||
|| iPod Touch / iPad / iPhone || 3.1.3, 4.3.3 || Yes || Yes || Contacts and Calendar ||
|| Motorola Droid || 2.0.1, 2.1, 2.2 || No (See above) || No native support, but the //Corporate Directory// app in the Marketplace works well. || Contacts and Calendar data, though the calendar does not issue PING requests, and does not seem to properly support exceptions to recurring events. On Froyo/2.2 SSL connections will NOT work with a self signed certificate even if the "Accept All Certificates" checkbox is selected. See http://www.google.com/support/forum/p/android/thread?tid=45e6836618212fdf&hl=en (A (Free) Level One certificate from http://www.startssl.com/ seems to work well here).||
|| Motorola Milestone || 2.1, 2.2 || ? || Yes, via //Corporate Directory// app || Contacts and Calendar ||
|| HTC Desire Z / HTC Desire HDNokia E90 || 2.2!MfE 3.0 || ? || ? || Contacts and Calendar via native !ActiveSync, SSL untestedverified to work. ||
|| Nokia N900 || Maemo 1.3 || No || ? || Client fails to send standard post variables, but Horde works around this. Contacts verified to work. Earlier versions of firmware are either completely broken, or only support !ActiveSync version 12.1. ||
|| !TouchDown For Droid || Version 5.1.0028 || Yes || Yes || Contacts, Calendar (You can **create** recurring events, but cannot edit them. See Touchdown website for details), and Tasks. ||
|| iPod Touch / iPad / iPhone || 3.1.3, 4.3.3 || Yes || Yes || Contacts and Calendar ||
|| Windows Mobile Device || 6.1 || ? || ? || Contacts reported to work. ||
|| Windows Mobile Emulator || 6.5 || Yes || Yes || Contacts, Calendars (with proper support for recurring events and exceptions), and Tasks. ||
|| Windows Phone 7 || 7.0 || ? || ? || Contacts, Calendars ||
|| Nokia E90 || !MfE 3.0 || ? || ? || Contacts verified to work. ||
|| Nokia N900 || Maemo 1.3 || No || ? || Client fails to send standard post variables, but Horde works around this. Contacts verified to work. Earlier versions of firmware are either completely broken, or only support !ActiveSync version 12.1. ||
|| HTC Magic || Android 2.2.1 unbranded || ? || ? || Contacts, Calendars ||

++ Setting up the device

It's beyond the scope of this page to go into detail for each individual device. In general, you will need to create a new account on the device. The account type should be something like //Microsoft Exchange// or //!ActiveSync//. Some devices use //Corporate//. You will need to enter your normal Horde username and password in the appropriate fields. In the field for the server address, you should enter the **root** of the webserver or virtual host that hosts Horde. For example, if you host horde at http://host.example.com/horde then you should enter http://host.example.com. You can ignore any reference to a //domain// entry. 

A special note for the iPhone/iPod (and possibly others) - if you do not use a SSL enabled site you may receive errors about not being able to find the !ActiveSync server. If this happens, just continue, or save, or whatever your option is to continue.  On the iPhone, after everything is completely set up, you must go back into the account settings and disable SSL.

After the connection particulars are entered, you should choose to enable the folders that you want sync'd. Contacts, Calendar and Tasks are supported, but your device also needs to support the requested folders.

++ Provisioning/!RemoteWipe

Provisioning allows devices to be more tightly registered with a particular server. It enables the server to be able to send policy settings to the device. These policy settings include things like requiring a PIN to unlock the device, the complexity of the PIN required, the number of failed login attempts allowed etc... Additionally, it enables devices to be remotely wiped so that if a device is lost or stolen, the user or administrator can request the device to be wiped.

Users can initiate a remote wipe, as well as view/manage their partnered devices in the !ActiveSync user preference.

Clicking //Wipe// in the Horde interfaces for device management flags the server to send the wipe command to the device the next time it synchronizes. The next time the device attempts to request a command other then PING or OPTIONS, it will be wiped. The !ActiveSync preference page shows the status of all the user's devices. If the status is listed as //Pending//, and you wish to cancel the wipe request, you may do this by clicking the //Cancel Wipe// button. You should see the status be reset to //Provisioned//. After it is wiped, the status will be shown as //Wiped//, if you wish to allow the device to connect to your server again, you need to explicitly remove the device as a sync partner by clicking the //Remove// button. If you do not remove this entry, the device will continue to be wiped each time it reconnects to the server.

++ What to do if you have problems (or How to help us help you)

**If you are not even able to get past the initial setup page on your phone**: you should first check to be sure you do not have SSL enabled on the phone when you're server is not serving SSL. The iPhone/iPod will not let you turn this off until after you save the configuration, so you must continue through all the errors and go back into the settings to disable SSL. You should also make sure that you have not enabled Provisioning support if your phone does not support it.

**If the configuration went well, but you are not seeing any contacts/calendar items appear on the device:** Some clients require a manual refresh or folder selection after setup when not using the "Automatic Discovery" facility of Exchange. With !TouchDown, for example, after setup you must select the folders you want sync'd under the Advanced settings tab. 

If all else fails and you can't figure out the issue, we will be happy to try to help you work it out, but you should be able to check/provide us with the following:

* Check the web server error logs and see if there are any PHP errors being logged. 
* Configure Horde to send !ActiveSync log messages to a separate logfile. This is configured on the !ActiveSync tab of Horde's configuration screen.
* If you are able to, it would also be useful to run a wireshark session to capture the network communication.
* In some cases, it might be useful for us to see the affected device's state records in the database.

++ Todo

* Implement more recent protocol version support - version 12 or maybe 12.1 (Exchange 2007??) should be fairly non-disruptive. Version 12 would get us more atomic policy settings, local wipe rules, as well as the ability to send the policy settings to the client as the more compact wbxml. 14 (Exchange 2010?) would probably be lots more work as it does away with PING, using SYNC for waiting for changes instead.

++ Resources

http://z-push.sourceforge.net
https://zimbrabackend.svn.sourceforge.net/svnroot/zimbrabackend/zimbra.php
Some discussion/issues/info on calendar sycing
http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=119&start=10

Some discussion on remote wipe issues with various devices
http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=802

Useful information/examples:
http://wiki.openchange.org/index.php/ActiveSync_Protocol

Another AS implementation in PHP - there is some good implementation information there for the taking.
https://svn.tine20.org/svn/trunk/tine20/ActiveSync

!TouchDown Client:
http://www.nitrodesk.com/dk_touchdownFeatures.aspx

Android SDK:
http://developer.android.com/sdk/index.html

iPhone/iPod Touch EAS:
http://manuals.info.apple.com/en_US/Enterprise_Deployment_Guide.pdf

Windows Mobile Emulators:
The cellular network emulator:
http://www.microsoft.com/downloads/info.aspx?na=47&p=2&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=38c46aa8-1dd7-426f-a913-4f370a65a582&u=details.aspx%3ffamilyid%3dA6F6ADAF-12E3-4B2F-A394-356E2C2FB114%26displaylang%3den

Device Images:
http://www.microsoft.com/downloads/details.aspx?familyid=38C46AA8-1DD7-426F-A913-4F370A65A582&displaylang=en

How to set it up:
http://www.devx.com/wireless/Article/40981/1954