[SOLVED] What Is Preferred Runlevel 3 WiFi Connect Utility?
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
What Is Preferred Runlevel 3 WiFi Connect Utility?
Greetz
I have a test partition for Current, actually more than one, but one is testing for slackpkg as well. Maybe I'm mistaken but I suppose such an update/upgrade process is best served outside of X. So I'd like to connect via CLI which I haven't done since Slackware required manual config of modems and running good ol' BitchX way back in the day.
Ideally I'd like to use "nmcli" so I could keep /etc/rc.d/rc.networkmanager active (works fine in X) but after messing about with nmcli, wpa_supplicant, wpa_passphrase, ifconfig, iwlist, and iwconfig and reading lots of manpages yet still getting errors, I decided to try the older, simpler wpa_cli outlined in a Slackware doc.
The problem is that even when I edit the /etc/wpa_supplicant.conf exactly as shown in the "update_config=1" preparation stage and run the following, I get
I'm also running into weirdness with driver selection for wpa_supplicant since wext seems to be really old, not preferred in the man pages (n180211 is said to be better) , but apparently wext is preferred by many users. I'd like to know why none of these utilities seem able to just use the kernel module, but it's likely best to discuss that later.
So, everything works splendidly in X, what is the preferred and simplest way to connect in Runlevel 3? There is too much data online with both contradictions and age working against them so even if someone just points me to a doc that is the current method/syntax I think I'm good.
If it matters, my wifi is an Intel onboard wifi 6 2x2 AX201 with an external antenna.
Essentially to set up wifi connection with networkmanger in virtual console I use nmtui tool. It works fine. If for some reason it fails I disable networkmanager completely - kill daemon and chmod -x /etc/rc.d/rc.networkmanager to disable service. Then ifconfig wlanx up, iwconfig wlanx essid, wpa_supplicant -Dwext -i wlanx -c /etc/wpa_supplicant.conf, there is debug option which can give a lot of information for wpa_supplicant it is -d at the end. Last time I got issue user named network with leading space (!) - it was terrible for me to figure out what's going on - finally I found with debug option for wpa_supplicant. Be sure there is no another instance of wpa_supplicant running - can be artifact left by networkmanager.
Now I'm able to do this on a computer (was on the phone earlier)...
After login, type nmcli dev status
In my case it lists wlan0 wifi disconnected
eth0 ethernet unavailable
Now type, nmcli n
Here I get enabled as result
Now type nmcli a
You should be asked for password, in my case it is trying to connect to my last used connection. Type password
Here, nothing happens (hangs kind of), hit ctrl+c works here. Now type nmcli
It should show info like:
wlan0: connected to <connection-name>
And info rel to the connection (ip adress etc)
What about just using the traditional slackware rc-scripts in /etc/rc.d/? Make sure that your network config is in /etc/wpa_supplicant.conf, that the rest is configured in /etc/rc.d/rc.inet1.conf. Probably no need even to touch rc.wireless.conf...
Thanks guys. I know about setting up wireless on /etc/rc.d/rc.inet1.conf but I'm hoping to use nmcli, or something associated (I didn't know about nmtui) , so I can use a Runlevel 3 connection on demand occasionally without upsetting my normal NetworkManager utilization and configuration in X. It's likely overkill since I live in a very rural area but I just can't shed my network security training and like the fact that KWallet protects wifi connections with a PGP based encryption, so I want to keep it.
There are some really good suggestions here and I will try them today.
Bingo! It seems my Invalid Argument was in wpa_supplicant.conf. Firstly I had way too many arguments like "key_mgmt", "scan_ssid=1", "proto", "pairwise", etc., and I had quotation marks around my preferred SSID. I did already generate my proper psk, so at least I got that right. Paring down and eliminating the erroneous punctuation (thanks to examples from bassmadrigal) I tried nmtui which immediately worked! So I then tried all the other suggestions and they all worked! My problem apparently was the improper syntax in wpa_supplicant.conf.
Huge thanks to all. Now all I have to do is figure out why slackpkg fails to resolve hosts even just to update gpg or find any changelogs even when uncommenting just "https://mirrors.slackware.com/slackware/slackware64-current/". Little by little....
If you're interested in a script to temporarily connect to a wireless network via CLI, I made one for a previous thread. It heavily uses bashisms, so you would need to run it with bash, but it does allow easy connecting of a temporary network without saving any of that data to the computer.
That's a tidy script, bassmadrigal, but given your history I expected nothing less
As for my connection problems for slackpkg I finally figured out that pinging isn't the same as actually having connectivity, so for any lurkers, please be aware that even after using nmtui. we have to run "dhcpcd wlan0". or whatever your device is named.
Thanks guys. I know about setting up wireless on /etc/rc.d/rc.inet1.conf but I'm hoping to use nmcli, or something associated (I didn't know about nmtui) , so I can use a Runlevel 3 connection on demand occasionally without upsetting my normal NetworkManager utilization and configuration in X. It's likely overkill since I live in a very rural area but I just can't shed my network security training and like the fact that KWallet protects wifi connections with a PGP based encryption, so I want to keep it.
There are some really good suggestions here and I will try them today.
With networkmanager, you could add the following to /etc/rc.d/rc.local
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.