Sunday, 16 December 2012

Connecting ad-hoc network from android devices


Connecting ad-hoc network from android devices 

I was trying to connect my android device using ad-hoc network on windows 7 and to my surprise android is not capable to discover ad-hoc network created by windows.

I tried to Google it and can't find much information.

So here is the solution : 

Microsoft included a virtual WiFi feature in Windows 7, so one can use this feature and turn network as a hot-spot for WiFi access.

There are two methods through which one can enable WiFi on windows 7 and the easiest one is using open source software such as Virtual router manager:

Download software from  http://virtualrouter.codeplex.com/

Using its GUI:


It's very simple to create a WiFi connection and then use it :)

-----------------------------------------------------------------------------------------------------------------
Another way of doing it by using command prompt:

Use a command-line tool called Netsh to create and manage the virtual router

First, enable the Internet Connection Sharing (ICS) feature of Windows 7 so the Internet access is shared with users on the Wireless Hosted Network.

Open the Network Connections window, right-click the network adapter that's connected to the Internet and select Properties. Then select the Sharing tab, check the Allow other network users to connect through this computer's Internet connection, choose the network connection name of the Microsoft Virtual WiFi Miniport Adapter from the drop-down box, and click OK.

Now open the Command Prompt: click Start > All Programs > Accessories > Command Prompt.

Set the network details:
netsh wlan set hostednetwork mode=allow ssid=YourVirtualNetworkName key=YourSecureNetworkPassword

Start the Wireless Hosted Network:
netsh wlan start hostednetwork

To stop the Wireless Hosted Network:
netsh wlan stop hostednetwork

To see the Wireless Hosted Network details, including the MAC addresses of connected users:
netsh wlan show hostednetwork
Enjoy WiFi on mobile and other devices :)