Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to setup a WIFI Hotspot with my laptop. Until now I tried it with the KDE interface of NetworkManager (shared WIFI network), as it is described in many tutorials. Everything works fine when the network is unprotected. But as soon as I try to configure a WPA protection, I'm not able any more to connect to the AP via my Android phone. It says: "authentication error - wrong password", but the password is correct. I've tried several ones with different symbols and different lengths, but no chance to connect. My WIFI stick is the following:
I put this into wpa_supplicant.conf and tried it again, but it didn't work either. Am I right, that I have to enter the normal passphrase into my mobile phone or do I have to use the hex number?
Ok, now I understand how it works.
As wlp0s29u1u2 is the interface I want to configure as a Hotspot, dhclient wlp0s29u1u2 doesn't give any output. The output of iwconfig is the following:
Code:
wlp0s29u1u2 IEEE 802.11 Mode:Master Tx-Power=20 dBm
Retry short limit:7 RTS thr=2347 B Fragment thr:off
Power Management:off
enp9s0 no wireless extensions.
lo no wireless extensions.
Ok, now I understand how it works.
As wlp0s29u1u2 is the interface I want to configure as a Hotspot, dhclient wlp0s29u1u2 doesn't give any output. The output of iwconfig is the following:
Code:
wlp0s29u1u2 IEEE 802.11 Mode:Master Tx-Power=20 dBm
Retry short limit:7 RTS thr=2347 B Fragment thr:off
Power Management:off
enp9s0 no wireless extensions.
lo no wireless extensions.
No wonder you can't connect. You're in master mode(= Server Mode), offering connections. But if you're a client wanting to connect, you want to be in 'managed' mode. Now you have to figure out where to change that using networkmanager. I imagine the following approach might help
Code:
grep -irn master <config files>
That will do a case insensitive recursive search through networkmanager's bloated setup and return a line number with the word 'master' in it. If it's not commented out, it might actually find the offending config line. Replace it with 'managed' and try again.
Oh, you're the access point? Sorry, I did misunderstand you.
The approach there is simpler You have to
Run a dhcp Server - it might be useful to post the config
Check up on your wifi driver. Many of them can't actually do Master mode. No harm to share what card you have with us if it's not a State secret.
Turn off all passwording for the beginning to get connected. When you can log on that way, we will get the password Sorted.
When you're connected, simplify and post your wpa_supplicant.conf
I seem to remember broadcom as particularly poor in not doing master mode. The 4312 certainly couldn't. I hope the drivers have improved. I can't see the sense of the guys in Broadcom keeping their working close to their chest thinking they'd sell more chips They sold less chips because people like me just put a black mark against any laptop with a broadcom chip.
1. As KNetworkManager did all the configuration automatically, it also configured dnsmasq as a dhcp server.
2. I bought my WIFI stick just because it is capable of master mode. I posted the exact hardware in my first answer.
3. Association without any encryption works out-of-the-box. Just when I try to use a WPA encryption, I'm not able anymore to connect.
4. My wpa_supplicant.conf is still the same like I posted above. I can show you the output of journalctl after the activation of the AP if it helps:
Wow! You've reminded me never to use networkmanager if I can possibly avoid it. What a load of log spam it gives out. Looking at it, some points are noteworthy
Code:
bash: syntax error near unexpected token `('
bash: info: No such file or directory
bash: Dez: command not found
22 21:49:16 localhost.localdomain NetworkManager[752]: <info> [1513975756.8907] device (wlp0s29u1u2): state change: prepare -> config (reason 'none', internal state 'managed')
bash: syntax error near unexpected token `('
bash-4.3$ Dez 22 21:49:16 localhost.localdomain NetworkManager[752]: <info> [1513975756.8918] device (wlp0s29u1u2): Activation: (wifi) access point 'TP' has security, but secrets are required.
bash: syntax error near unexpected token `('
bash-4.3$ Dez 22 21:49:16 localhost.localdomain NetworkManager[752]: <info> [1513975756.8919] device (wlp0s29u1u2): state change: config -> need-auth (reason 'none', internal state 'managed')
bash: syntax error near unexpected token `('
bash-4.3$ Dez 22 21:49:17 localhost.localdomain dnsmasq[13578]: no servers found in /etc/resolv.conf, will retry
bash: Dez: command not found
I would try to remove those bash errors. That can change a lot. I'm seeing far too much of the word 'managed' and no mention of the word 'master'. A search for 'wpa_supplicant server mode' produced some interesting hits. I'll bet if you configured a hotspot on your phone you could connect to it. I'm glad this is your headache and not mine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.