Hi, running Leap 15.1. When I boot into the graphical environment on my Dell LT WIFI connects fine and all is well. I modified the system boot level to multiuser with network (runlevel 3 right?) and I can’t seem to get WIFI to work using the CLI to configure. The point where I have problems is when executing wpa_supplicant. I am trying to connect to the same AP with the same SSID and password but no luck. I can scan SSID’s with iwconfig -scan and all the local AP’s show up but I just can’t seem to connect to be able to request an IP address.
I followed these steps:
wpa_passphrase “SSID” “PSK alpha” | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
sudo wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
The next step would have been:
sudo dhclient wlan0
but it won’t connect, just keeps trying with a disconnect reason 3, any ideas or tips to get this to work?
This a blast from the past… It has been so many years since I’ve connected using only the command line wpa_supplicant .
BTW - For simply scanning for available SSID (without connecting), I prefer to use the simpler iw. If it’s an open AP, you can even use iw to make that connection.
You’re making your task too difficult.
The advantage of using wpa_supplicant.conf is that you should be able to provide all you need in the answer file so that when you fire up wpa_supplicant everything should “just work” automatically.
It looks like you’ve done the proper preliminary work by scanning and discovering available access point.
Take a look at the wpa_supplicant MAN page in the Example and Quickstart sections…
It’ll describe how you can invoke wpa_supplicant as a background process and invoke wpa_supplicant.conf if it’s not in your default location (You might want to create different wpa_supplicant.conf for different situations).
Of course, before you can or should invoke wpa_supplicant,
So you can avoid having to construct a complex command with numerous command line options, you’ll need to create an appropriate wpa_supplicant.conf, and again the MAN pages is a good resource, with examples for various configurations, ie PSK, EAP (various), certificates, etc.
If you have a specific problem with any of this, post your command or configuration file and your question…
I disagree firmly here. F.e. the OP assumes that his device is wlan0, in my case it’s wlo1, YaST will pick that up. And … YaST works fine in ‘the old runlevel 3’. All this together makes the chances of mistakes lower, since one only has to enter the essential data and the appropriate files on the system will be adjusted accordingly.
I’d respectfully disagree,
YaST manages mainly at the interfaces level but WiFI requires configuration and authentication in a completely separate higher level.
Regarding wireless, for the most part the only interface level requirement is that it can be started and works.
Everything else is not managed in the interface, it’s invoked and managed by wpa_supplicant.
When it comes to making a WiFi connection using WPA,
There is no substitute in the Linux world, wpa_supplicant is invoked.
And, typically wpa_supplicant.conf is where the wireless connection configurations are stored.
Remember also that Wireless connections are another layer on top of the network interfaces, and the configurations are separate and don’t overlap.
The network interfaces like wlan0 or whatever naming convention is used has to be working but is not typically relevant to troubleshooting WiFi issues.
ok so I may be making some incorrect assumption. I thought I had to invoke the WPA_supplicant command to establish a wifi connection from the command line. I can connect with the YAST settings in run level 5 just fine so should I even have to configure anything in run level 3 then? or should the connection info from Yast already be establishing a connection for me in run level 3?
I have verified that wlan0 is correct for my adapter.
I’ll review the man pages this evening and see what I can find.
I may read wrongly, but from the above I get the idea that you think that YaST only can be run from the GUI (run level 5). This is not the case. The YaST ncurses interface will function in runlevel 3 (as Knurpht hinted).
so I checked and the machine is not used wicked, it’s currently configured to use networkmanager but I can’t access settings for it in yast because it states that its configured by a KDE applet. all of the settings are greyed out in yast. If I change the selection to wicked then I can’t get connected to wifi with the graphical environment. Any suggestions? I’m kind of confused now
Maybe you need to explain what your intention is. If you use wicked, and the wifi works, you won’t need the NM applet in KDE ( nor GNOME or whatever ). Did wicked work in runlevel 3? If so it should work in 5 as well. But if you set it to wicked you have to configure the wifi connection in YaST as well, by editing the properties of the wifi card in the Overview tab.
Another option you have is to use the networkmanager-cli
my only intention is to get wifi working in runlevel 3 and 5. The install is a fresh install and I set up the wifi while the graphical environment was running. I’m not proficient with this OS so I’m learning as I go. I’ve dabbled with opensuse for many years but only casually and dive into different aspects as needed.
If I set up wifi with the applet does that mean neither netmanager nor wicked are being used? What is the simplest course to follow to set up wifi for the 2 run levels I’m trying to use? if I need to pick either netmanager or wicked, how do I disable the applet method to pick one of the two. Are both wicked and netmanager configured through yast?
when I selected wicked in yast I had no internet at all so I went back to selecting netmanager in yast so wifi would connect.
Sorry for all the questions but I don’t have a grasp how on how the various methods are selected and/or used.
The main objective is for the @OP to achieve his objective which he has,
I’ll stick to my horses,
wpa_supplicant is the foundation upon which all WPA functionality is based, everything else is a shell that invokes wpa_supplicant.
As such, if a person chooses to do so, can scan and connect to WPA WiFI by only using the wpa_supplicant utility.
And because wpa_supplicant is the only tool in Linux to provide this functionality, what you can do with it is identical across all distros.
If you have any doubt of this,
Try disabling (move or delete) wpa_supplicant and see whether any other WiFi tool will work…
You’ll find that the only WiFi you can connect to are WEP and open APs.
Of course YaST is a shell to this. Like it is a shell to all it’s functionality. You do not need YaST at all when you know what to do with basic commands. YaST is only there to help you, it does not magicaly make things happen that aren’t offered otherwise.
it’s interesting that you folks mention the low level WPA_Supplicant being the basis for all wifi connections because I was not able to establish a link to my AP directly through the CLI. It would only work via the applet using the same SSID and passkey. I must be doing something wrong then when manually configuring the connection and I would like to figure that out so I have some further questions.
I have some experience with the WPA_supplicant conf file because my raspberry pi’s use that method and I’ve had good luck in setting those up. I noticed that the “tutorial” I was following used wpa_passphrase to add the credentials into the .conf file whereas in the past for the pi’s I manually added the SSID and passphrase, does this command create a key or something that allows a connection with the AP or should I be able to add that info manually?
I have two SSIDs that I use in my house depending on where I am, are multiple SSIDs supported and which would get priority if so?