Sunday, August 21, 2011

Sharing your PC internet connection with Android in Windows 7

Have you ever wanted to share your pc's net connection with your android device through wifi. Well there are few tools you can use to do this. They are Connectify and Virtual Router. But they are not very stable and went through several blue screens myself. But if you're running on Windows 7, don't bother. The OS itself supports this feature. Here's how to do it.


  1. First check wheather your drivers support the feature. Open command prompt in Administrator mode and enter the following
    netsh wlan show settings
    If it says hostednetwork = enable or something similar you're ready to go.
  2. Create a net hosted network by entering the following command
    netsh wlan set hostednetwork mode=allow ssid=new_network_name key=new_network_password
    This will create a wifi hosted network
  3. Then go to the network and sharing center and go to adapter settings and choose your internet connection -> properties -> sharing and tick the share this network and seleted the newly created wifi network.
  4. Then turn on the hosted network by entering this in the command prompt
    netsh wlan start hostednetwork
    check with your wifi enabled device, you'll find the network is available


    That's it, all done and enjoy!!!
This works not only for Android device, you can connect your laptop, your i-phone or any other wifi enabled device...

33 comments:

  1. Thank u so much.. Can you tell me what is the SSID name and password??

    ReplyDelete
    Replies
    1. You can use any name you wish (better without spaces in between) for the SSID, and any password you wish for password. When the network is up, your device will display the network by the given SSID and you can connect to it using your given password.

      Delete
    2. whose ssid dude :P
      mine is jai seemandra

      Delete
  2. I can't
    C:\>netsh wlan show settings

    Wireless LAN settings
    ---------------------
    Show blocked networks in visible network list: No

    Only use GP profiles on GP-configured networks: No

    Hosted network mode allowed in WLAN service: Yes

    Allow shared user credentials for network authentication: Yes

    Block period: Not Configured.

    Auto configuration logic is enabled on interface "Wireless Network Connectio
    n"


    C:\>netsh wlan set hostednetwork mode=allow ssid=andro key=
    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.


    C:\>netsh wlan start hostednetwork
    The hosted network couldn't be started.
    The group or resource is not in the correct state to perform the requested opera
    tion.



    C:\>

    ReplyDelete
  3. It worked, many thanks for the manual commands! :-)

    ReplyDelete
  4. You sir, are my fucking hero.
    XOXOXO

    ReplyDelete
  5. will it work for windows xp or any such method available for xp?

    ReplyDelete
    Replies
    1. Hello,
      Unfortunately, it will not work on Windows XP or any other older than Windows 7.
      Read the About page from microsoft.
      About the Wireless Hosted Network (Windows)

      However, I suggest using third party software which are mentioned above that might help you to some extent.

      Delete
    2. thank you very much :)

      Delete
  6. I cannot seem to start the hosted network. Every time i try it gives me this error!

    "The hosted network couldn't be started.
    The group or resource is not in the correct state to perform the requested opera
    tion."

    Any solution? I'm using Windows 7 Home Basic

    ReplyDelete
    Replies
    1. Hi,

      Seems like this is an issue in microsoft. Read the article and apply the hot fix microsoft has given you. Might resolve your issue.

      Applications that use Virtual WiFi technology do not work after you restart a computer that is running Windows 7 or Windows Server 2008 R2

      After all, this is a new technology.

      Delete
    2. First of all, thank you for knowledge sharing. But I'm still facing same error as mentioned above even after applying said windows patch. I am using windows 7 Enterprise.
      Please advice.

      Delete
  7. great... good job bro b(^^)d

    ReplyDelete
  8. On my Android tablet I'm getting the message "Network disabled. Poor connection."
    Any idea how to solve? :\

    ReplyDelete
  9. Thanks: worked first time with Galaxy S3 (Jelly Bean) and 64 bit Windows 7 SP1. Shows as Intel(R) WiFi Link 5300 AGN hardware and Microsoft Virtual WiFi Miniport Adapter on HP 8530w laptop running 3G dongle.

    ReplyDelete
  10. my android can detect the wifi created but could not be connected

    taking way too long to obtaining ip adress on my android device

    at the end only show network disable. poor connection?

    but my pc is just beside my android device

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. Perfect Procedure!

    I can find and connect with my mobile .. actually cannot navigate the internet but I feel this problem relies on the PC part of the setup.

    Do you know some command prompt commands to debug what is happening PC side?

    Thank you in Advance

    Francesco

    ReplyDelete
  13. Thanks a lot it work, you made my day :) Thanks one again.

    ReplyDelete
  14. Hi, at location "internet connection -> properties -> sharing", it says Internet connection sharing has been disabled by Network Admin.
    Any solution to bypass this?

    ReplyDelete
  15. my pc using internal ip.
    i added these within:
    Advanced TCP/IP setting > IP setting > IP 192.168.137.2 MASK 255.255.255.0
    Default Gateways > Gateway 192.168.137.1 Metric 2

    ReplyDelete
  16. Ultimate.... This is really awesome :)

    ReplyDelete
  17. You solved it, you are the best

    ReplyDelete
  18. This works like a charm. Thanks heaps for sharing.

    ReplyDelete
  19. Thank you very much. Worked exactly as you said. You might want to tell users how they can stop the network as well. I believe netsh stop hostednetwork just in case they don`t know. Thank you very much.

    ReplyDelete
    Replies
    1. I still would recommend looking into a third party solution as well if you have the chance. They might have firewall settings allocated for specific android apps and what not. Still, a very helpful path to getting started.

      Delete
  20. Bonjour, à tous j'offre et partage des codes Free Wifi Code Orange et SFR chaque semaine pour vous connecté a internet dans toutes la france

    Mon site de partage ▄︻̷̿┻̿═━一 http://caribbeansunshine.co/


    sfr wifi

    ReplyDelete
  21. I think most of us want efficient all the 9's up-time for our online but of course that's not always simple to accomplish. Making it 100% efficient I cannot guarantee actually even all the 9's is not that simple but I can probably display you how to create online quicker, have a greater potential, ensure it is more efficient and enhance your wi-fi and keep expenses reasonable! PC hookup

    ReplyDelete