Windows Mobile Troubleshooting – How to log like an expert

As part of supporting Windows Mobile in an enterprise environment, one of the things that often will come up is what tools are available for troubleshooting..

One powerful tool that has been around since the dawn of the first computer programs is logging. Here are a few important Windows Mobile logging tips that can be extremely helpful and save your day:

Exchange ActiveSync Device Logging

Nice write-up from Vik Thairani on how to enable the verbose logging on Windows Mobile for Exchange ActiveSync troubleshooting:
http://blogs.technet.com/vik/archive/2008/12/04/setting-up-verbose-logging-in-windows-mobile-and-parsing-logs.aspx

imageimage

The log is saved in text file in the \Windows\ActiveSync folder starting with “serverlog” and a sequential number.

SCMDM Device Management Logging

With MDM Connect Now Tool, you can enable or disable various types of logging as necessary. To enable enrollment logging on a device using MDM Connect Now Tool, select Menu, and then select Logging.

For information about MDM Connect Now Tool, see the MDM Resource Kit Tools at this Microsoft Web site: http://go.microsoft.com/fwlink/?LinkId=127030.

  1. EnableNodeMon log – If this option is checked, the system generates a log file at \NodeCache.txt.
  2. Enable OMADM log – If this option is checked, the system generates a log file at \deviceupdate.log.
    See http://technet.microsoft.com/en-us/library/dd252860.aspx for some information on what this log can show.
  3. Enable Enroll log – If this option is checked, the system generates a log file at \deviceupdate.log.
  4. Enable Scheduler log – If this option is checked, the system generates a log file at \Application Data\Logs\Scheduler.txt.
  5. Enable alerter log – Generates a log file at \deviceupdate.log.
    If this option is checked, the system enables the following values:

    • Alerter – Search for “Rejecting packet” or “Successful push packets” in the log.
    • Nodemon InitSession
    • Nodemon configuration service provider
    • Software Distribution
    • TDET settings

Please see http://technet.microsoft.com/en-us/library/dd261878.aspx for additional details on these logs.

image

SCMDM VPN Device Logging

The MDM VPN Diagnostics Tool can be downloaded from http://go.microsoft.com/fwlink/?LinkID=127030.

To enable and disable Mobile VPN logging on your Windows Mobile device, run the MDM VPN Diagnostics Tool and follow these steps:

  1. On the Start page, select Menu.
  2. Select Logging.
  3. Select Enable or Disable.

MDM VPN Diagnostics Tool includes a Log Browser for viewing the VPN Service log file located at \Application Data\Logs\ipsecvpnpm.txt.

image

Network Traffic Device Logging

Sometimes the best recourse for technical troubleshooting is determining what is going on on the network level. On a Windows Mobile device this can also be accomplished.

The Microsoft Windows Mobile Network Analyzer PowerToy v1.0 can be directly downloaded from: http://www.microsoft.com/downloads/details.aspx?familyid=081c6401-49d4-4506-a03b-c41bc76c2f51&displaylang=en.

If you have a storage card inserted, Network Analyzer will write all logs under \Storage Card\NetworkLogs. If there is no \Storage Card, it will write all logs under \NetworkLogs.

To capture the network traffic (NetMon) log for analysis, run the start analyzer script in the Program directory. Run the stop analyzer script to stop the network logging.

Then you can view the .cap file in your network protocol analyzer of your choice to properly decipher all the information. I highly recommend the freebie WireShark efforts from http://www.wireshark.org/.

imageimage

An example (from http://technet.microsoft.com/en-us/library/dd252860.aspx) to troubleshoot SCMDM VPN issues on a Windows Mobile device:

  1. Install the Windows Mobile Network Analyzer PowerToy.
  2. Install MDM VPN Diagnostics Tool.
  3. Start MDM VPN Diagnostics Tool, select Menu, and then disable VPN.
  4. Make sure that you can browse the Internet using Internet Explorer Mobile through your WiFi or Mobile Operator (carrier) data connection.
  5. Start the Windows Mobile Network Analyzer PowerToy to capture network traffic on the device.
  6. Enable VPN using MDM VPN Diagnostics Tool.
  7. When the VPN connection fails, stop capturing network traffic, and save the trace file.
  8. View the VPNDiag report and the ipsecvpnpm.txt file from the device.

For more information, view the readme file that accompanies the Windows Mobile Network Analyzer PowerToy.

|\\arco..
mnielsen (at) enterprisemobile.com
http://marco.blogsite.org