Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 8 emulator can't connect to the internet

I have Windows 8 installed inside of an emulator, and the new WP8 SDK installed on it. My problem is that the emulator can't connect to the internet. I don't have any proxy, and even disabled the firewall. It still doesn't seem to work though. When I look at the Network Connections sections I can see the new connections the hyper-v manager created for the emulator, and also the automatic bridge created, but even there the network status is "No Internet Connection".

Are there some properties I can manually change in Hyper-V or for the network to make everything work?

Update: I've done everything suggested including create my own switch and delete all others. It still doesn't work however. It doesn't work on cable and not on wifi. Maybe I'm missing something with how to set this up?

Also the WP emulator keeps offering me to connect to the internet every time. It always erases all of the definitions I've set up, replacing it with it's own definitions.

like image 390
CodingChick Avatar asked Oct 31 '12 14:10

CodingChick


4 Answers

I think I've finally found the answer, but you're probably not going to like it. It would appear that the phone emulator requires you to have a second network adapter to dedicate to this purpose. Personally, I run Windows 8 in VMWare, and so a second network adapter is free for me.

Anyway, after you get the second network adapter that you can dedicate for the phone emulator(must have internet)

  1. Start from scratch. Go to the Hyper-V manager and delete the emulator along with all of the virtual switches
  2. Start the emulator from Visual Studio; this will recreate it with all default settings(select yes you want to configure it to connect to the internet)
  3. Shut it down
  4. Now, go back to the Hyper-V manager
  5. Delete the snapshot that was just created for the emulator. This will prevent your changes from disappearing
  6. Find the virtual switch for your second network adapter in the Network Adapter settings(under control panel)
  7. Disable TCP/IPv4, 6 and all other services. This prevents your host machine from trying to use the connection. While you're there, get the MAC(Physical) address of this adapter
  8. Find the virtual-switch for your second network adapter under the Hyper-V settings for the emulator
  9. Change the MAC type to static and paste in the MAC address of the adapter
  10. Enable MAC spoofing (not sure if required, but just in case)
  11. Then, find your virtual switch under "Virtual Switch Manager".
  12. Ensure "Allow management operating system to share this network adapter" is unchecked and that all extensions are disabled
  13. Click OK and then start the emulator from Visual Studio!

Basically, it appears that for some odd reason it won't properly work unless the phone has the same MAC address as the network adapter. However, we can't just set it to use the same MAC address because address conflicts are very very bad. So, we need a second adapter that we can dedicate to the Phone emulator. The reason we disable TCP/IP on this adapter is so our host machine doesn't use it and cause these conflicts.

Other things to try:

The emulator keeps randomly breaking for me. I'll list a few other things I messed with this last time that got it to work(not sure if related, so only try these if the steps above aren't working

  • "Reordering" of network adapters for the emulator so that the external virtual switch is at the top (make sure to copy over the MAC address for the internal adapter)
  • Removing unrelated network adapters
  • Restarting your machine after recongiguring virtual switches
  • Praying to your local Microsoft evangilist

Seriously. Everytime I stop phone work for a while and come back, the emulator is always magically broken without me changing anything. No idea how to get it to work "permanently".

like image 68
Earlz Avatar answered Nov 13 '22 06:11

Earlz


I had the same issue as well. However as someone else pointed out on the official forums it didn't work if you had a static IP for your PC set up in your router. Removing it and let the DHCP assign my PC an IP solved the issue for me.

Source

like image 28
robertk Avatar answered Nov 13 '22 04:11

robertk


Here's what worked for me:

  1. Go into the internal network connection created by hyper-v in network connections on the host computer. Go to TCP/IP V4 and go to advanced. Change the metric from automatic to 10.
  2. Go to the external network connection, do the same but set the metric to 1.

Volia, internet in the emulator.

like image 7
James Hancock Avatar answered Nov 13 '22 06:11

James Hancock


I tried following steps , Not sure if it will work for you

1> Delete All emulators in Hyper-v
2> Remove all virtual switches from virtual switch manager
3> Go to Network connections in control panel and manually disable (right click and click disable) all the connection except the one which provides internet.
4> Start the emulator from Visual studio

like image 6
samywat Avatar answered Nov 13 '22 06:11

samywat