none
How to get automatic ping command in activesync server implementation RRS feed

  • Question

  • We are implementing a very very limited version of ActiveSync server protocol to talk to mobile devices. We are in touch with Microsoft for desired licensing agreement.  I want to know what kind of to-from messaging are required to get a Ping command from the client after in installation of Exchange ActiveSync profile. 

    I observerd folowing commands:- 

    OPTIONS->PROVISION->OPTIONS->SYNC->SETTINGS etc.

    But the ping and folder sync is sent to server only if someone clicks mail box on mobile device. I want to know what kind of response server should sent to the protocol during provision and sync to get a PING so that a connection will be maintained between client and server immediately.

     

    We are supporting only PING, SYNC, PROVISION, SETTINGS and FOLDERSYNC commands. Please help me resolve this issue. We don't have any mail server setup for this server.

    • Changed type omanandvatsa Wednesday, July 27, 2011 7:34 AM
    Wednesday, July 27, 2011 4:01 AM

Answers

  • Hi Omanand,

     

    To specifically answer the protocol question; Yes, maybe there should be a Ping following the server response in the trace snippet you sent.  However, why there is no Ping could be any number of things related to a general support issue, “specific device, device implementation, protocol version, configuration, infrastructure, etc”.  In your scenario it is up to the client implementation to send a Ping, per the specification I pointed to previously, and that is device implementation which we do not control.  We don’t know the client implementation so we don’t know how it is working, or why it is working this particular way.

     

    There is an informative document Understanding Exchange ActiveSync that may be useful for your review.  Sections on Understanding Direct Push and Understanding Remote Device Wipe may be relevant since you have mentioned the related topics.

     

    I hope this helps.

     

    Regards,

    Mark Miller

    Escalation Engineer

    US-CSS DSC PROTOCOL TEAM

    Wednesday, August 10, 2011 5:39 PM

All replies

  • Hi omanandvasta,

     

    Thanks for your question.

     

    Someone from our team will contact you shortly to work with you on this request.

     

    Thanks and regards,


    SEBASTIAN CANEVARI - MSFT Escalation Engineer Protocol Documentation Team
    Wednesday, July 27, 2011 3:02 PM
  • Hi Sebastian,

     

    Thanks for the response. I am waiting for the resolution. Let me simplify my question:- I want to know when a device send a provision command followd by foldersync, settings and Sync commands, what kind of response from the server is required so that it starts sending ping command.

    I tested in Apple devices, it is sending Ping command only when i try to refresh the INBOX.

     

    Please help me resolve this issue.


    Regards, Omanand Jha Vatsa
    Thursday, July 28, 2011 1:53 PM
  • Omanand,

    I don't think the protocol requires the client to ever send ping (i.e. specific circumstances that you can reliably cause on the server), and since there are multiple implementations, I don't think you can expect that all devices do so.

    Can you explain why your server requires constant client traffic? It seems that the whole point of AS is to minimise such traffic.

    Brad

     

    Thursday, July 28, 2011 9:01 PM
  • Hi Brad,

    Thanks for the reply. If the device doesn't send the ping command with appropriate heartbeat interval, then the mail service is become a pull service. If the device has enabled push service, server required a ping command for long live connection to send any updates as soon as it is available. We want to send the policy settings as soon as it is available. It may the Remote Wipe of the device in case of out of compliance settings.

     

    Please let me know if you need any more information. Your help will be appreciated to resolve this issue.


    Regards, Omanand Jha Vatsa
    Friday, July 29, 2011 4:40 AM
  • Somone please help me to resove this issue.
    Regards, Omanand Jha Vatsa
    Tuesday, August 2, 2011 7:16 AM
  • Hi omanandvatsa,

     

    Perhaps I’m not completely clear on what you want to accomplish.  However, what you seem to be wanting to accomplish in your implementation is not per protocol specification.

     

    If you have not already, please refer to Section 2.2.2.11 Ping, which describes in detail how the Ping command works from the Client (Request) and Server (Response) perspective per protocol:

     

    The server does not immediately issue a response to the client's Ping request (section 2.2.2.11.1). Instead, the server waits until one of two events occur: either the time-out that is specified by the client elapses, or changes occur in one of the folders that the client specifies. The response that the server issues indicates which of these events has happened so that the client can react appropriately.

     

    Further, refer to Section 2.2.3.75.1 HeartbeatInterval (Ping), as described HeartbeatInterval (Ping) specifies the length of time, in seconds, that the server SHOULD wait before notifying the client of changes in a folder on the server.

     

    Note, the specification states how long the server SHOULD wait, _not_ how long the server MUST wait, as conditions on the server determine when it will respond to a client ping HeartbeatInterval.  If the server can honor a ping time-out interval it will.

     

    Regards,

    Mark Miller

    Escalation Engineer

    US-CSS DSC PROTOCOL TEAM

    Tuesday, August 2, 2011 3:37 PM
  • Thanks  Marks. Now i am very much clear about the limitations for protocol specification for my requirement. I have one more query regarding retrieving User Information by setting commands:-

    Sample Request:

     

    <?xml version="1.0" encoding="utf-8"?>

    <Settings>

    <UserInformation>

    <Get/>

    </UserInformation>

    </Settings>

     

     

    Response:

     

    <?xml version="1.0" encoding="utf-8"?>

    <Settings>

    <Status>1</Status>

    <UserInformation>

    <Status>1</Status>

    <Get>

    <EmailAddresses>

    <SMTPAddress>abc@test.com</SMTPAddress>

    </EmailAddresses>

    </Get>

    </UserInformation>

    </Settings>

     

     

    In My case SMTP Address is a dummy one and some randomly generated string. Let's say the ActiveSync profile configuration has following configuration:

    Email Address:- abc@test.com

    User:- someuserstringnotmatchingwithemail

    password:- password

    server:- watch.activesync.com

     

    So there is no relationship between email, user and server strings. But when i am sending setting response to the activesync agent, agent stooped monitoring the folders created with my exchange server and says no such account exists. But once we go manually and try to update data, the agent is sending sync followed by ping commands.

     

    So is there any issue with my dummy email address? Please help me solve this problem.

     

     


    Regards, Omanand Jha Vatsa
    Friday, August 5, 2011 10:28 AM
  • Perhaps the problem isn't with the dummy email address. Perhaps its in some other part of the reply (e.g. the Status node). Can you show the whole transaction?

    Brad

     

    Friday, August 5, 2011 10:40 AM
  • Thanks Brad.

     

    Please find the detail transaction logs:

    1. 

    Request: 

     

    <Provision>

    <Policies>

    <Policy>

    <PolicyType>MS-EAS-Provisioning-WBXML</PolicyType>

    </Policy>

    </Policies>

    </Provision>

    Response:
    <Provision>
    <Status>1</Status>
    <Policies>
    <Policy>
    <PolicyType>MS-EAS-Provisioning-WBXML</PolicyType>
    <Status>1</Status>
    <PolicyKey>3942919513</PolicyKey>
    <Data>
    <EASProvisionDoc/>
    </Data>
    </Policy>
    </Policies>
    </Provision>
    2. 
    Request:
    <FolderSync>
    <SyncKey>0</SyncKey>
    </FolderSync>
    Response:
    <FolderSync>
    <Status>1</Status>
    <SyncKey>1</SyncKey>
    <Changes>
    <Count>1</Count>
    <Add>
    <ServerId>5</ServerId>
    <ParentId>0</ParentId>
    <DisplayName>Inbox</DisplayName>
    <Type>2</Type>
    </Add>
    </Changes>
    </FolderSync>
    3. 
    Request:
    <Settings>
    <UserInformation>
    <Get/>
    </UserInformation>
    </Settings>
    Response:

     

    <Settings>

    <Status>1</Status>

    <UserInformation>

    <Status>1</Status>

    <Get>

    <EmailAddresses>

    <SMTPAddress>abc@test.com</SMTPAddress>

    </EmailAddresses>

    </Get>

    </UserInformation>

    </Settings>

    4.
    Request:

    <Sync>

    <Collections>

    <Collection>

    <SyncKey>0</SyncKey>

    <CollectionId>5</CollectionId>

    <Options>

    <FilterType>2</FilterType>

    <MIMETruncation>1</MIMETruncation>

    <MIMESupport>0</MIMESupport>

    <BodyPreference>

    <Type>1</Type>

    <TruncationSize>500</TruncationSize>

    </BodyPreference>

    </Options>

    </Collection>

    </Collections>

    </Sync>

     

    Response

    <Sync>

    <Collections>

    <Collection>

    <Class>Email</Class>

    <SyncKey>1</SyncKey>

    <CollectionId>5</CollectionId>

    <Status>1</Status>

    </Collection>

    </Collections>

    </Sync>


    This is the exact communication between the agent and the server.  I am expecting device should Ping the server after the sync response. But it is not pinging.But when i debugged same scenario with excahnge server 2010, device is pinging after the sync command. 

     

     

     


    Regards, Omanand Jha Vatsa
    Friday, August 5, 2011 11:35 AM
  • Hi Brad, Attached complete communication log. Can you please help me resolving this issue.
    Regards, Omanand Jha Vatsa
    Tuesday, August 9, 2011 12:10 PM
  • Hi Omanand,

     

    To specifically answer the protocol question; Yes, maybe there should be a Ping following the server response in the trace snippet you sent.  However, why there is no Ping could be any number of things related to a general support issue, “specific device, device implementation, protocol version, configuration, infrastructure, etc”.  In your scenario it is up to the client implementation to send a Ping, per the specification I pointed to previously, and that is device implementation which we do not control.  We don’t know the client implementation so we don’t know how it is working, or why it is working this particular way.

     

    There is an informative document Understanding Exchange ActiveSync that may be useful for your review.  Sections on Understanding Direct Push and Understanding Remote Device Wipe may be relevant since you have mentioned the related topics.

     

    I hope this helps.

     

    Regards,

    Mark Miller

    Escalation Engineer

    US-CSS DSC PROTOCOL TEAM

    Wednesday, August 10, 2011 5:39 PM
  • Thanks Mark.

     

    Regards,

    Omanand Jha Vatsa


    Regards, Omanand Jha Vatsa
    Wednesday, August 10, 2011 6:02 PM