Windows Phone 7 Connectivity Issues and Smart Potato
Smart Potato is an application that allows you to access and manage your Media Center recordings and stream recorded TV. But when I first attempted to test this out on my phone, it complained that it could not reach the server. Detailed below is how I used Network Monitor to troubleshoot this issue.
My Setup
In my case I simplified and tested this from within my private wireless network. The Smart Potato app has a settings section which allows you to change, among other things, the server URL. So I modified this field to contain the private address for my Media Center, https://192.168.1.7. When I attempted to connect from Smart Potato, I received an error message that I could not find the server.
Getting a Trace
I started a network trace on my Media Center PC. I assumed all traffic should be directed there, but I suppose it’s possible this was not the case. However it is easy to start by sniffing at the Media Center PC and if I didn’t see traffic I could move up to the router. I also looked at my router to see what my Windows Phone 7 IP address was. I could also have looked in the Setting on my phone for my wireless connection as it shows up there as well.
Using this IP address I applied the following Display Filter so that I would only see traffic from or to my phone.
IPv4.Address == 192.168.1.8
I could have instead used a capture filter because there might have been other traffic that emanated from my Media Center to another service that might be relevant. If I instead used a capture filter, I would have to rerun my test to capture this data. But with no capture filter I still capture everything, and narrow down my view by applying various display filters after the fact.
Starting My Test
So the first thing I noticed when I started my capture is that I saw a TCP Syn request on port 80 from my phone. But the traffic looks like this:
Source |
Destination |
Description |
192.168.1.8 |
192.168.1.7 |
TCP:Flags=......S., SrcPort=50914, DstPort=HTTP(80), PayloadLen=0, Seq=1438303684, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 |
192.168.1.8 |
192.168.1.7 |
TCP:[SynReTransmit #2]Flags=......S., SrcPort=50914, DstPort=HTTP(80), PayloadLen=0, Seq=1438303684, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 |
192.168.1.8 |
192.168.1.7 |
TCP:[SynReTransmit #2]Flags=......S., SrcPort=50914, DstPort=HTTP(80), PayloadLen=0, Seq=1438303684, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 |
What we see is that the Media Center PC never responded to the request. Each subsequent request is flagged with the SynReTransmit keyword. If I wanted to look for these specifically, I could use a filter of:
Property.TCPSynReTransmit
For this traffic, I concluded that either the service was not listening on port 80 or perhaps it was getting blocked by my firewall. I enabled and then checked my firewall logs and saw that nothing was logged, so my firewall was letting that traffic through.
Next I used NetStat –ano, which list out all ports in use and their associated process Ids.
C:\Windows\System32\drivers\etc>netstat -ano
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 848
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
TCP 0.0.0.0:554 0.0.0.0:0 LISTENING 4200
TCP 0.0.0.0:954 0.0.0.0:0 LISTENING 5944
TCP 0.0.0.0:2869 0.0.0.0:0 LISTENING 4
TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING 1292
TCP 0.0.0.0:3390 0.0.0.0:0 LISTENING 1292
TCP 0.0.0.0:5357 0.0.0.0:0 LISTENING 4
TCP 0.0.0.0:9080 0.0.0.0:0 LISTENING 4
TCP 0.0.0.0:10243 0.0.0.0:0 LISTENING 4
…
As you can see, there was no process listening on port 80. Yet I did see port 9080, which as it ends with 80, made me think the service might be using a different port. And sure enough, I ran the Remote Potato configuration tool, which is the service on the Media Center PC that shares the streaming data, and I saw that the port is indeed set to listen on port 9080.
Fixed Port, but Now What?
I then modified the URL to say “https://192.168.1.7:9080”. This will direct the URL to use an alternate port instead of the default of 80. And when I checked Smart Potato after a reinstall, I found that the default string which I hastily replaced also ended with 9080. I suppose I could have paid more attention when changing the original URI.
After updating the port I tried again, but this time it reported bad username or password. I decided that since I had everything setup, I would trace again. This is the traffic I saw.
192.168.1.8 |
192.168.1.7 |
TCP:Flags=......S., SrcPort=53492, DstPort=9080, PayloadLen=0, Seq=793206766, Ack=0, Win=8192 ( Negotiating scale factor 0x8 ) = 8192 |
192.168.1.7 |
192.168.1.8 |
TCP:Flags=...A..S., SrcPort=9080, DstPort=53492, PayloadLen=0, Seq=4192041810, Ack=793206767, Win=8192 ( Negotiated scale factor 0x2 ) = 32768 |
192.168.1.8 |
192.168.1.7 |
TCP:Flags=...A...., SrcPort=53492, DstPort=9080, PayloadLen=0, Seq=793206767, Ack=4192041811, Win=64 (scale factor 0x8) = 16384 |
192.168.1.8 |
192.168.1.7 |
HTTP:Request, GET /xml/login, Query:un=paul&pw=password |
192.168.1.7 |
192.168.1.8 |
HTTP:Response, HTTP/1.1, Status: Ok, URL: /xml/login |
You will notice that in the Request frame, there is a username and password in plain text. (BTW, I changed the password to “password”). The fact that it’s an HTTP request tells me that this user name and password were probably not the Machine’s credentials as I assumed when I entered them onto application settings. Once again I looked at the Remote Potato settings and noticed it also had a security settings box. I reset this information on my phone and tried again and now I was able to connect.
Have My Potato and Watch It
Now I’m able to stream my Media Center recorded shows to my phone, which is pretty cool. If I’m on the road, in a plane, or somewhere remote I can schedule something to record, and then using Smart Potato, watch it immediately. Using Network Monitor to view data, and focusing on the IP address, will often give you some interesting information and is a useful way to spy on a device.
Comments
- Anonymous
January 01, 2003
thanks - Anonymous
April 06, 2012
It's called REMOTE POTATO not Smart Potato and it can be found at http://www.remotepotato.com Great bit of Free software that deserves donating a beer or two. (see webpage) Cheers' Chook