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

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.

This question is related to wifi

The answer is


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!


Type

netsh wlan set hostednetwork mode=allow ssid=hotspotname key=123456789

perform all steps in proper order.. for more detail with image ,have a look..this might help to setup hotspot correctly.

http://www.infogeekers.com/turn-windows-8-into-wifi-hotspot/


I had a similar problem and I solved it by setting a static IP on the Android device.

When you add the network on Android, first you enter the SSID and password, then underneath you can open advanced options and set a static IP.


It's a bit of a guess but could the quotes around happy be the problem? There have been some problems in the past where Android would either add or not recognize quotes around an SSID. Try setting up the hosted network connection again, but without the quotes that we see in the output for netsh wlan show hostednetwork.


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.


I am using Windows 10 Home edition.

I tried various combination,

netsh wlan show drivers
netsh wlan show hostednetwork
netsh wlan set hostednetwork mode=allow ssid=happy key=12345678
netsh wlan start hostednetwork

and also,

Control Panel\Network and Internet\Network Connections\Ethernet Properties\Sharing\Internet Connection Sharing\Allow other network users to connect through this computer Internet connection...

But still cannot activate WiFi hotspot.

While I have given up, somehow I click on Network icon on the taskbar, suddenly I see the buttons:

[ Wi-Fi ] [ Airplane Mode ] [ Mobile hotspot ]

Just like how our mobile phone can enable Mobile hotspot, Windows 10 has Mobile hotspot build-in. Just click on [ Mobile hotspot ] button and it works.