0

I'm trying to get my Windows Phone 8 MDM system to work. Currently device enrolls and makes initial SyncML request correctly. It also responds to queries in server's intitial response, but I assume that it doesn't like something in it. Reason being that it uses the retry intervals to make additional connections to server and then afterward doesn't connect anymore.

When I initiate the connection manually then it works, but automatic connections are not taking place. Strange thing is that internally the SyncML SessionID counter gets increased at specified intervals, but device doesn't even attempt to connect the server.

Here is my SyncML protocol

Client starts:

   <SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncHdr>
    <VerDTD>1.2</VerDTD>
    <VerProto>DM/1.2</VerProto>
    <SessionID>E</SessionID>
    <MsgID>1</MsgID>
    <Target>
      <LocURI>https://ssl.../enrollment/omadmservice.php</LocURI>
    </Target>
    <Source>
      <LocURI>IMEI:35...64</LocURI>
      <LocName>riho</LocName>
    </Source>
    <Cred>
      <Meta>
        <Format xmlns="syncml:metinf">b64</Format>
        <Type xmlns="syncml:metinf">syncml:auth-md5</Type>
      </Meta>
      <Data>SoFh6khg4awLYXn2PQOOwQ==</Data>
    </Cred>
  </SyncHdr>
  <SyncBody>
    <Alert>
      <CmdID>2</CmdID>
      <Data>1201</Data>
    </Alert>
    <Replace>
      <CmdID>3</CmdID>
      <Item>
        <Source>
          <LocURI>./DevInfo/DevId</LocURI>
        </Source>
        <Data>IMEI:35...64</Data>
      </Item>
       ...
    </Replace>
    <Final/>
  </SyncBody>
</SyncML>

Server responds:

<SyncML xmlns="SYNCML:SYNCML1.2">
    <SyncHdr>
        <VerDTD>1.2</VerDTD>
        <VerProto>DM/1.2</VerProto>
        <SessionID>E</SessionID>
        <MsgID>1</MsgID>
        <Target>
            <LocURI>IMEI:35...64</LocURI>
        </Target>
        <Source>
            <LocURI>https://ssl.../enrollment/omadmservice.php</LocURI>
            <LocName>MDMServer</LocName>
        </Source>
        <Cred>
          <Meta>
            <Format xmlns="syncml:metinf">b64</Format>
            <Type xmlns="syncml:metinf">syncml:auth-md5</Type>
          </Meta>
          <Data>ryJ+boSmdCoO8BzxXcYSxg==</Data>
       </Cred>
    </SyncHdr>
    <SyncBody>
      <Status>
        <CmdID>1</CmdID>
        <MsgRef>1</MsgRef>
        <CmdRef>0</CmdRef>
        <Cmd>SyncHdr</Cmd>
        <Data>212</Data> 
      </Status>
    <Status>
        <MsgRef>1</MsgRef>
        <CmdRef>2</CmdRef>
        <CmdID>2</CmdID>
        <Cmd>Alert</Cmd>
        <Data>200</Data>
    </Status>
    <Status>
        <CmdID>3</CmdID>
        <MsgRef>1</MsgRef>
        <CmdRef>3</CmdRef>
        <Cmd>Replace</Cmd>
        <Data>200</Data>
    </Status>
    <Get>
        <CmdID>4</CmdID>
        <Item>
            <Target>
                <LocURI>./Vendor/MSFT/Registry/HKLM/Software/Microsoft/DeviceEncryption/Enabled</LocURI>
            </Target>
        </Item>
    </Get>
    </SyncBody>
</SyncML>

Client sends its response:

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncHdr>
    <VerDTD>1.2</VerDTD>
    <VerProto>DM/1.2</VerProto>
    <SessionID>E</SessionID>
    <MsgID>2</MsgID>
    <Target>
      <LocURI>https://ssl.../enrollment/omadmservice.php</LocURI>
    </Target>
    <Source>
      <LocURI>IMEI:35...64</LocURI>
    </Source>
  </SyncHdr>
  <SyncBody>
    <Status>
      <CmdID>1</CmdID>
      <MsgRef>1</MsgRef>
      <CmdRef>0</CmdRef>
      <Cmd>SyncHdr</Cmd>
      <Chal>
        <Meta>
          <Format xmlns="syncml:metinf">b64</Format>
          <Type xmlns="syncml:metinf">syncml:auth-md5</Type>
          <NextNonce xmlns="syncml:metinf">kjjz6FyCYuYm9VUsSaHfKmj98GGfh9yeLvv8hlMNZak=</NextNonce>
        </Meta>
      </Chal>
      <Data>212</Data>
    </Status>
    <Status>
      <CmdID>2</CmdID>
      <MsgRef>1</MsgRef>
      <CmdRef>4</CmdRef>
      <Cmd>Get</Cmd>
      <Data>200</Data>
    </Status>
    <Results>
      <CmdID>3</CmdID>
      <MsgRef>1</MsgRef>
      <CmdRef>4</CmdRef>
      <Item>
        <Source>
          <LocURI>./Vendor/MSFT/Registry/HKLM/Software/Microsoft/DeviceEncryption/Enabled</LocURI>
        </Source>
        <Meta>
          <Format xmlns="syncml:metinf">int</Format>
        </Meta>
        <Data>1</Data>
      </Item>
    </Results>
    <Final/>
  </SyncBody>
</SyncML>

And server stores the data and drops connection.

Can anyone find a bug in my implementation? What more does client expect from server?

Riho
  • 4,523
  • 3
  • 33
  • 48
  • How did you receive result response from get command? Every Exec, Add, Replace command works for me except Get Command. The device didn't report back the result to the server. – Jonathan Liono Feb 25 '13 at 06:04
  • Try to send also some other commands together with Get - maybe send again Chal or Cred. – Riho Feb 25 '13 at 09:21
  • It still does not report any result after putting in Cred and Chal. Anyway in your case, according to WP8 MDM Documentation the Chal seems to be sent if inadequate credential is given. Maybe that's the reason your client stops responding? Chal Specifies an authentication challenge. The server or client can send a challenge to the other if no credentials or inadequate credentials were given in the original request message. – Jonathan Liono Feb 26 '13 at 01:32

1 Answers1

0

As I found out the problem was not in my implementation, but in buggy Microsoft documentation. In their "WP8 Enterprise Management Protocol 1.2" they fixed several typos and mistakes in their protocol and now connections work as supposed.

Riho
  • 4,523
  • 3
  • 33
  • 48