Android phone issue with internet connection via WLAN shared by virtual wifi from the laptop

androidipv6wireless-networking

I try to share my internet connection from my laptop (win7) via virtual wifi to my android phone (Samsung Gio). In an elevated cmd I enter

netsh wlan set hostednetwork mode=allow ssid=VWiFi key=xxx keyUsage=persistent
netsh wlan start hostednetwork

The android phone connects to VWifi, but the internet connection is hardly usable on the phone while the internet connection on my laptop is very good at the same time (some Mbps)

What works: I can start WhatsApp, type and receive text messages, so I guess there's no general problem, i.e. config can't be completely wrong – but when I try to send pics or audio or try to receive pics or audio messages then I see from the network monitor on my laptop that the connection doesn't even try to send or receive anything (0 kbps up/down).

What sometimes works: connection to some websites with acceptable speed – but sometimes I don't get a single byte. Also this is not reproducible – the same website sometimes shows up, sometimes android tells my the site was not available.

What never worked so far: connecting to Google Play Store. It always tells me to check my connection and try again.

What I tried so far: I read on problems with IPv6, but no matter if I enable or disable IPv6 in the settings of the virtual Wifi, it doesn't help.

I also read about problems related to static/dynamic IPs, my netsh interface ip show config tells my that dchp isn't enabled on my virtual Wifi connection. If I try to enable it by netsh interface ip set address "myWificonnection" dhcp the android phone won't even connect anymore to the virtual Wifi at all. So there may be a solution here if android would connect with dhcp enabled.

I also read about problems with MAC filters, but this is no router, there's no MAC filter in the virtual Wifi.

When I directly connect to a real WLAN router, everything is fine and working. I have the problems only when trying to get into the internet via the virtual Wifi.

Any ideas what may be configured wrong? Either on laptop or on android? Thanks.

Best Answer

Here is how I did it.

0. About the Wireless Hosted Network

Basically Microsoft changed the way things are handled in windows 8 and 10.

The wireless Hosted Network is a new WLAN feature supported on Windows 7 and on Windows Server 2008 R2 with the Wireless LAN Service installed. This feature implements two major functions:

  • The virtualization of a physical wireless adapter into more than one virtual wireless adapter sometimes referred to as Virtual Wi-Fi.
  • A software-based wireless access point (AP) sometimes referred to as a SoftAP that uses a designated virtual wireless adapter.

These two functions coexist in a Windows system together. Enabling or disabling the wireless Hosted Network enables or disables both virtual Wi-Fi and SoftAP. It is not possible to enable or disable these two functions separately in Windows.

You can read about it more here.

1. Check if your wifi card meets the requirements

At the elevated powershell prompt, type this: netsh wlan show drivers

You should see: http://superuser.com/q/878497/109803

2. Check your services.

You need to check if the following windows services are enabled. Pull up the services screen by typing services.msc in a windows run dialogue box. You can pull it up by pressing the following keyboard shortcut: (Windows-Key + R)

  • run ->services.msc->"routing and remote access" must be set to automatic
  • run->services.msc->"internet connection sharing"->startup type-auto(delayed)
  • (Laptops) Lastly check if your computer's current power plan is not set to battery saving mode. Those profiles can put the wifi card into an energy saving mode, breaking the hostednetwork. In my experience I would have to restart the computer before my wifi hotspot works again.

Now restart your computer to make sure these services are persistently enabled.

3. Set up Hosted Network

Still in the prompt. Type:

netsh wlan set hostednetwork mode=allow ssid=”DESIRED_NETWORK_NAME” key=”YOUR_PASSWORD”

and then

netsh.exe wlan start hostednetwork

You can check the status and number of connected devices by:

netsh.exe wlan show hostednetwork

3. Share hosted network using your wireless card

In a windows run box (Windows key + R), type: ncpa.cpl and press enter.

Right click on the Ethernet connection you want to share and go to properties -> Sharing. Then check the box for "Allow other network users..".

It does not matter if the "Allow other network users to control..." box is enabled.

You don't want to share your Home networking connection with your Wi-Fi adapter. Like in this image below.

http://superuser.com/q/878497/109803

Instead you want to select the new connection that appeared after you enabled shared networking above. Not "Wi-Fi". It's in this image b/c that is the default option.


You should be done. Check to see if you can now see your new wifi hostspot.

Troubleshooting

If that doesn't work then you have to enable 'ad hoc' support in the wireless card advanced config.

  1. Right click on your wifi connection in the ncpa.cpl screen used above, and go to Properties -> Configure: http://superuser.com/q/878497/109803

A great website that I found that explains what a lot of the variables you see in the advanced tab is: Here

  1. Set the 'ad hoc' variable to enabled.

  2. Set ICS service start mode to auto (delayed):

    • Run » services.msc » Internet Connection Sharing » Startup Type » auto (delayed)

    • Restart your PC or stop/start the service.

This service will load after about 5 mins once Windows starts. It does not immediately start.

  1. Second solution to make ICS work on startup if 3. did not work:

    • Go to Run » services.msc but then, aside from checking ICS service, check for "Routing and Remote Access". If it's on manual you need to set it to automatic – delayed and turned on.

    • By default it was turned off, not even on manual mode.

    • After I changed it to Automatic and pressed Start, Internet started working.

Related Question