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

7

34

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.

Acotyledon answered 19/4, 2014 at 9:14 Comment(5)
My problem is a little bit more weird. I have 2 phones, 1 always connects successfully, and the other has been facing this issue since yesterday.....I have tried restarting the phone, deleting the network and adding again etc... nothing works...Agnesse
@AshishKulkarni You got it. Actually, after I had completed this question, I found my roommates' phones work well with my hotspot, while mine went wrong :(Acotyledon
If hostednetwork isn’t supported you can try my “Wifi Direct Access Point” app available in Microsoft Store. It use WiFi Direct to create an Access Point and works with the new driver of Windows 10 (Wireless Card should support WiFi Direct).Gigantic
This is SuperUser question, come on, I know this is very popular topic, but discussing it here makes impossible to locate WlanHostedNetworkXXXX topics...Cullen
@FreeConsulting Sorry for that, the question comes out when I'm a newbie to Stack Exchange Network sites and didn't know any other sites but StackOverflow. While there is already many responses and not all of the answerers and commenters have a SuperUser account, I wonder if there is any method to save my fault…Acotyledon
A
1

Problem solved.

Just drop down status bar, touch Choose input method, then change to another input method, type the password again. And everything is OK.

So weird...

Solution from a Chinese BBS. Thanks for the answer's author and all above who try to provide a solution, thanks!

Acotyledon answered 22/8, 2014 at 8:15 Comment(5)
hmm not seeing that optionRinghals
@Ringhals Move the focus to a EditText box (like password input box), when you see a blinking cursor, the Choose input method option would be present. It's something like this picture. Maybe, I don't know, it would be there only if you have installed more than one input method in your phone.Acotyledon
This question is still active, sigh. In my situation, changing input method did save my days. I assume that it's a bug of my input method or something. It seems that the solution rarely serves people well, so I'm wondering if it's appropriate for a partial and sometimes practical solution to be marked as a stackoverflow's answer??Acotyledon
So essentially you entred a wrong keyword, and that was it? (like „mzpassword“ on ‘qwertz’ vs. ‘qwerty’ ?)Quackenbush
@FrankN In normal case, the input method works well, so I have never thought of it, ah, until I saw the post on the BBS. I don't think I typed a wrong password, for I really checked it again and again and again...Acotyledon
R
27

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!

Resolve answered 24/8, 2014 at 23:52 Comment(3)
How do you remove this? Edit: Figured out netsh wlan stop hostednetwork then netsh wlan set hostednetwork mode=disallowPaid
can you please tell me how to create an "Open Network ( without password )" using netsh command..?Kropp
I think it's not a good idea to have it without any password, but if you want you can omit last argument "key=tests123"Resolve
C
7

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.

Chirm answered 24/6, 2015 at 11:36 Comment(2)
setting the password 8 characters long did the trick, esp for android usersAgonizing
I can confirm that on my Windows 10 installation a 10 character password prevented my Android 6.0.1 device from connecting, but changing it to 8 made it work perfectly. Not sure who is to blame here - Windows or Android, but I never would have thought to try this without finding this post,Teacher
R
3

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/

Robertroberta answered 23/12, 2014 at 19:17 Comment(0)
C
2

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.

Cnossus answered 9/8, 2017 at 3:26 Comment(0)
G
1

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.

Garlicky answered 12/6, 2014 at 11:1 Comment(0)
E
1

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.

Effuse answered 23/6, 2014 at 23:0 Comment(0)
A
1

Problem solved.

Just drop down status bar, touch Choose input method, then change to another input method, type the password again. And everything is OK.

So weird...

Solution from a Chinese BBS. Thanks for the answer's author and all above who try to provide a solution, thanks!

Acotyledon answered 22/8, 2014 at 8:15 Comment(5)
hmm not seeing that optionRinghals
@Ringhals Move the focus to a EditText box (like password input box), when you see a blinking cursor, the Choose input method option would be present. It's something like this picture. Maybe, I don't know, it would be there only if you have installed more than one input method in your phone.Acotyledon
This question is still active, sigh. In my situation, changing input method did save my days. I assume that it's a bug of my input method or something. It seems that the solution rarely serves people well, so I'm wondering if it's appropriate for a partial and sometimes practical solution to be marked as a stackoverflow's answer??Acotyledon
So essentially you entred a wrong keyword, and that was it? (like „mzpassword“ on ‘qwertz’ vs. ‘qwerty’ ?)Quackenbush
@FrankN In normal case, the input method works well, so I have never thought of it, ah, until I saw the post on the BBS. I don't think I typed a wrong password, for I really checked it again and again and again...Acotyledon

© 2022 - 2024 — McMap. All rights reserved.