Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use "netsh wlan set hostednetwork ..." to create a wifi hotspot and the authentication can't work correctly

Tags:

wifi

I run netsh wlan show drivers and get the output containing Hosted network supported : Yes:

Interface name: Wireless Network Connection  Driver                    : Broadcom 802.11n Network Adapter Vendor                    : Broadcom Provider                  : Broadcom Date                      : 8/22/2013 Version                   : 6.32.223.1 INF file                  : C:\Windows\INF\oem75.inf Files                     : 5 total                             C:\Windows\system32\DRIVERS\BCMWL664.SYS                             C:\Windows\system32\bcmihvsrv64.dll                             C:\Windows\system32\bcmihvui64.dll                             C:\Windows\system32\drivers\vwifibus.sys                             C:\Windows\system32\bcmwlcoi.dll Type                      : Native Wi-Fi Driver Radio types supported     : 802.11n 802.11g 802.11b FIPS 140-2 mode supported : Yes Hosted network supported  : Yes Authentication and cipher supported in infrastructure mode:                             Open            None                             Open            WEP                             Shared          None                             Shared          WEP                             WPA2-Enterprise TKIP                             WPA2-Personal   TKIP                             WPA2-Enterprise CCMP                             WPA2-Personal   CCMP                             WPA2-Enterprise Vendor defined                             WPA2-Enterprise Vendor defined                             Vendor defined  Vendor defined                             Vendor defined  Vendor defined                             Vendor defined  TKIP                             Vendor defined  CCMP                             Vendor defined  Vendor defined                             Vendor defined  Vendor defined                             WPA-Enterprise  TKIP                             WPA-Personal    TKIP                             WPA-Enterprise  CCMP                             WPA-Personal    CCMP Authentication and cipher supported in ad-hoc mode:                             WPA2-Personal   CCMP                             Open            None                             Open            WEP IHV service present       : Yes IHV adapter OUI           : [00 10 18], type: [00] IHV extensibility DLL path: C:\Windows\System32\bcmihvsrv64.dll IHV UI extensibility ClSID: {aaa6dee9-31b9-4f18-ab39-82ef9b06eb73} IHV diagnostics CLSID     : {00000000-0000-0000-0000-000000000000} 

Then netsh wlan set hostednetwork mode=allow ssid=happy key=12345678, get

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. 

Then netsh wlan start hostednetwork, get

The hosted network started. 

After that, in Network and Sharing Center -> Change adapter settings, I set up shared hotspot as the tutorial said.

Everything looks well. Then I switch wifi to open on my android phone, find the "happy" network, select "Connect", type the password "12345678"(without quotes).

Now, it first hints "authenticating..." and at last comes up with an error: Authentication problem. I'm certain that I typed the right password, for I checked "show password" and tried again and again...

Here is what netsh wlan show hostednetwork prints:

Hosted network settings ----------------------- Mode                   : Allowed SSID name              : "happy" Max number of clients  : 100 Authentication         : WPA2-Personal Cipher                 : CCMP  Hosted network status --------------------- Status                 : Started BSSID                  : 68:94:23:b9:86:9d Radio type             : 802.11n Channel                : 11 Number of clients      : 0 

I tried rebooting, tried changing SSID, tried changing password, tried netsh wlan stop hostednetwork then start again, several days passed but it doesn't work yet.

If you need more data or log about this problem, please tell me how to acquire it and I'll do it.

Please help, thanks!


Update: it's solved. Methods in previous answers are tried but no good. All steps with no change, but change input method as I said in answer, it works. Thank you all.

like image 732
Weekend Avatar asked Apr 19 '14 09:04

Weekend


People also ask

How do I enable wlan Hostednetwork?

While in Command Prompt (Admin) enter the following command: NETSH WLAN set hostednetwork mode=allow ssid=Your_SSID key=Your_Passphrase Where the SSID would be the name you want to identify your wireless network when trying to connect a new device, and the passphrase is the network security key you want users to use to ...

What is netsh wlan Hostednetwork?

netsh wlan show hostednetwork: Shows the settings of the wireless hosted network, including a list of connected users. netsh wlan refresh hostednetwork: Sets a new WPA2-PSK encryption key for the hosted network. Simply enter the command and follow it with the desired key.


2 Answers

Use these commands on a windows command prompt(cmd) with administrator privilege (run as administrator):

netsh wlan set hostednetwork mode=allow ssid=tests key=tests123  netsh wlan start hostednetwork 

Then you go to Network and sharing center and click on "change adapter settings" (I'm using windows 7, it can be a little different on windows 8)

Then right click on the lan connection (internet connection that you are using), properties.

Click on sharing tab, select the wireless connection tests (the name tests you can change on the command line) and check "Allow other network users to connect through this network connection"

This done, your connection is ready to use!

like image 97
Marquinho Peli Avatar answered Sep 28 '22 11:09

Marquinho Peli


For me, running the ad-hoc network on Windows 8.1, it was two things:

  • I had to set a static IP on my Android (under Advanced Options under where you type the Wifi password)
  • I had to use a password 8 characters long

Any IP will allow you to connect, but if you want internet access the static IP should match the subnet from the shared internet connection.

I'm not sure why I couldn't get a longer password to work, but it's worth a try. Maybe a more knowledgeable person could fill us in.

like image 37
jnm2 Avatar answered Sep 28 '22 11:09

jnm2