Wednesday, February 19, 2014

Configure Virtual WiFi connection






Choose a SSID to identify your virtual WIFI AP and set a password for it. Type the following command in command line console running as administrator to start configure:

open cmd
open cmd


C:\Windows\system32>netsh wlan set hostednetwork mode=allow ssid=MyWifi key=password keyUsage=persistent
The hosted network mode has been set to allow.
The SSID of the hosted network has been successfully changed.
The user key passphrase of the hosted network has been successfully changed.

Make sure the physical Wifi adapter is enabled before start the Virtual WiFi connection:

C:\Windows\system32>netsh wlan start hostednetwork
The hosted network started.

The Virtual WiFi connection (MyWifi, in this example) is active:

image

The Virtual WiFi connection is ready to accept connection now.  Use any other WiFi device (Smartphone, other notebook, PC) to check if the MyWifi connection appears the WiFi connection list.
Please note that the virtual WiFi connection does not connect to any Internet connection yet.  All WiFi connection to MyWifi is isolated in the MyWifi network only
.

Share Internet connection to Virtual WiFi connection

Enable Internet Connection Sharing for virtual WiFi connection allow Internet traffic be served for virtual WiFi client.  First, identify the network connection with Internet access:

image

Open properties page of the Network Connection with internet access and set the following:
  1. “Allow other network users to connect through this computer’s Internet connection.
  2. Set Home networking connection to “Wireless Network Connection 2” (The connection should be Virtual WiFi Connection).
  3. Click OK to commit changes.

image

The Virtual WiFi connection should have access to Internet now:

image

Other WiFi device connect to virtual WiFi connection should be able to access the Internet immediately.

Virtual Wifi AP not started after reboot

The Windows 7 Virtual WiFi connection is not persisted when machine reboot.  You should start the virtual WiFi connection each time machine has rebooted:
C:\>netsh wlan show hostednetwork

Hosted network settings
-----------------------
    Mode                   : Allowed
    SSID name              : "MyWifi"
    Max number of clients  : 8
    Authentication         : WPA2-Personal
    Cipher                 : CCMP

Hosted network status
---------------------
    Status                 : Not started


C:\>netsh wlan start hostednetwork
The hosted network started.

Stop virtual WiFi connection

Run the command to stop connection:
C:\>netsh wlan stop hostednetwork
The hosted network stopped.

Uninstall virtual WiFi adapter

It is not necessary to uninstall virtual WiFi adapter as the uninstall is not permanent.  The virtual WiFi adapter will be installed once your reboot machine.  If you mean to uninstall the virtual WiFi adapter for current session, try this:
C:\>netsh wlan set hostednetwork mode=disallow
The hosted network mode has been set to disallow.

Side Effect: Unable to access network share after update Microsoft Virtual WiFi Miniport Adapter

There is a side effect if Microsoft Virtual Wifi Miniport Adapter has been updated.  The network share may not be accessed and “0x8004005 Unspecified error” may prompt:
image
This is due to the “Client for Microsoft Networks” service is missing from the network connection.  Reinstall service “Client for Microsoft Networks” will solve the error:

Untitled

No comments:

Translate