Tuesday, March 30, 2010

Tip #33: Turn your Windows 7 PC into a Wi-Fi hotspot

One of the not-so-well-known features of Windows 7 is the ability to turn your laptop (or desktop with a wireless card) into a wireless access point, aka Wi-Fi hotspot. If you are using a USB 3G broadband such as those from Maxis, Celcom and DiGi, or the Wiggy from P1, this would let you finally be able to share your Internet connection with others wirelessly, like the Wi-Fi modems which Streamyx and P1 give.

Again, a gentle reminder, you need to be using Windows 7 in order to do this. First, to check to see if you already have the necessary driver/software for this. To check, click on Start, type "view network connections", and press Enter. You should see all the network cards which your PC has. Look for one which says "Microsoft Virtual WiFi Miniport Adapter". If you have this, it means you're just a few commands away from using your PC as a hotspot!

Look for any icon which says "Microsoft Virtual WiFi Miniport Adapter" - the name of the icon doesn't
have to be "Wireless Network Connection 2" like in my case.

If - you didn't manage to find the virtual adapter in Network Connections, you either need to update the driver for your wireless card, or your card model is not supported. A list of WiFi cards and the minimum driver version needed is available on this page for your reference.

Assuming that you managed to find the virtual adapter in your Network Connections:
  1. Click Start, type cmd, right click on cmd.exe and choose Run as administrator. This is called "opening an elevated command prompt".
  2. The UAC prompt will appear, click Continue.
  3. Pay attention: if the title of the command prompt window which appears does not have "Administrator:" in front of it, close the prompt and redo steps 1 and 2. The command prompt must be "elevated" (run as administrator) for this to work.
  4. Type in the following command and press Enter:
    netsh wlan set hostednetwork mode=allow ssid=my_ssid key=my_network_key (these two lines are a single command)
    Replace my_ssid with a name for your network (SSID) which appears when others are looking for your hotspot. Also, replace my_network_key with a password/network key which others must type in when connecting to your hotspot. There should be no spaces in both the SSID and network key.

    C:\Windows\system32>netsh wlan set hostednetwork mode=allow ssid=tao-laptop_net key=taolaptopnet
    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.
    Leave the command prompt window open.

    If you only want to create a hotspot to host a wireless LAN party without sharing an Internet connection, jump to step 9.


  5. Most of the USB 3G modems out there are
    the HUAWEI Mobile Connect.

  6. In the Network Connections window, right click on the adapter which you use to go online and choose Properties. Since I don't use 3G broadband or the Wiggy, Charlotte was kind enough to provide a screenshot of her Celcom 3G USB modem in her Network Connections window for reference!
    If you can't find your broadband modem here, then unfortunately this setup cannot work with your modem.
  7. Click on the Sharing tab, tick Allow other network users to connect through this computer's Internet connection
  8. Under Home networking connection, choose the connection which was labeled "Microsoft Virtual WiFi Miniport Adapter", the one which you found earlier. In my case it was "Wireless Network Connection 2".
  9. Click OK.
  10. Now right-click on the Microsoft Virtual WiFi Miniport Adapter icon, and choose Properties.
  11. Under the Networking tab, there is a list of items which the connection uses. Untick everything except for Internet Protocol Version 4 (TCP/IPv4). Click OK.
  12. Go back to the command prompt. Type this and press  Enter:
    netsh wlan start hostednetwork
You now have a wireless access point, sharing your 3G broadband / WiMAX / whatever connection. Tell your friends to look for your wireless network, enter the network key and they can surf using your connection! (with your permission, of course)

The wireless access point will be disabled once you restart your computer. To restart it, open an elevated command prompt like in step 1 and 2, and run those two commands again. The other settings do not need to be done again.
netsh wlan set hostednetwork mode=allow ssid=my_ssid key=my_network_key (these two lines are a single command)
netsh wlan start hostednetwork
Again, remember to replace my_ssid and my_network_key with your own. Have fun sharing your mobile broadband!

If you liked this tip then leave a comment below! I will post up later on some shortcuts to make enabling and disabling your access point easier, without needing to open the command prompt.

4 comments :

  1. This is a great tip!! hahah u can host LAN Party with this without having a laptop!

    ReplyDelete
  2. hahah u can host LAN Party with this without having a laptop!

    Did you mean without a router?

    ReplyDelete
  3. how bout the password? can we set the password for this connection?

    ReplyDelete
  4. xio mou: refer to Step 4 above. Where it says "key=my_network_key", replace my_network_key with the password you want.

    ReplyDelete

All comments are subject to moderation. If you don't want to sign in, comment as "Name/URL".