17 May 2011

Debugging Windows Phone 7 device network access with just a laptop

It’s a strange world. Today I needed to debug an iPad’s web traffic, and ended up getting instructions from the Dutch Windows Phone 7 DPE Matthijs Hoekstra. To dry run the solution I tried hooking up my own Windows Phone 7 an so was able to see Birdsong actually sending and downloading messages.

Now there are numerous sources around the internet describing what you should do to get this far but most only show pieces of the puzzle, so I decided to do a quick write-up on how to do this for Windows Phone 7.

Prerequisites

  • One laptop running Windows 7 with a WiFi card. I used a HP Probook 4720s
  • Connectify
  • Fiddler2
  • One Windows Phone 7 device (duh)

Make sure you laptop has internet connectivity, either by WiFi or by cable.

Install and configure Connectify

Download and install Connectify. Now installing this might be a little scary – it wants to install an unverified driver, and the first time I tried it the install got stuck, I had no network connectivity anymore, rebooted, uninstalled Connectify and then painlessly re-installed.

ConnectifyAnyway, it comes with a simple wizard, that asks you for a network name, as password, a connection to share. Connectify runs in the system tray and if you click on it, it pops up like this showed left.

You can see that my WiFi card now is used by the laptop itself to connect to the internet and as hotspot as well :-). But I could just as easily share a cabled internet connection (as I did this afternoon at my work). You can even see my hotspot’s password, so now you can steal my internet connection when you are in the neighborhood and I leave Connectify running (and then still it gives a bubble notification saying someone connected).

Your Windows Phone 7 can now already share your laptop’s WiFi connection – if you go to Settings/WiFi you can already see the network showing up. As you can see on the image my HTC 7 Pro has connected to it successfully

 

 

 

Install and configure Fiddler

Just install Fiddler the usual way, but then click Tools/Fiddler options and click tab “Connections”. Right under the box “Fiddler listens on port 8888” there’s a checkbox “Allow remote computers to connect”. Tick that one. close down Fiddler, start it again, and this will bring a Windows Firewall check box to your screen. Check all three checkboxes, and click “Allow Acces”.

IMG_8515Configure your Windows Phone 7

Pick up your phone, again, go to Settings/WiFi, connect to the Connectify network if you have not already done so, using the password you picked for it. As the phone is connected, tap your network, locate the “proxy” toggle, click it, use your laptops’ name as proxy and port 8888 as port, and you are done. Note – both my access point and my laptop are called “JSC7”, but they could be different. Always use your computers’ name for proxy.

 

 

 

 

 

Done

You can now spy on your Windows Phone 7’s network. I fired up Birdsong and saw it actually do somethingfiddler

Some final words

If you have an access point handy, you might skip the whole Connectify stuff, just define your PC as a proxy for that network in your Windows Phone 7 settings and only configure and fire up Fiddler on that PC. But I did not have a wireless AP I could connect my Windows Phone 7 to so I had to resort to Connectify.

Oh by the way, this works for a iPad as well :-)

1 comment:

Unknown said...

Create article. If you want to debug SSL traffic, browse to http://COMPUTERNAME:8888/fiddlerroot.cer to install the fiddler root certificate.