Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: wpa_supplicant fails to connect wifi

  1. #1

    Default wpa_supplicant fails to connect wifi

    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:
    1. wpa_passphrase "SSID" "PSK alpha" | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
    2. 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?

    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,644
    Blog Entries
    14

    Default Re: wpa_supplicant fails to connect wifi

    Try using YaST > System > Networksettings. Make sure it's set to wicked, in the Overview tab edit the wireless device and enter the data.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Re: wpa_supplicant fails to connect wifi

    Boy,
    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.

    So,
    It looks like you've done the proper preliminary work by scanning and discovering available access point.

    Now,
    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...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Re: wpa_supplicant fails to connect wifi

    Quote Originally Posted by Knurpht View Post
    Try using YaST > System > Networksettings. Make sure it's set to wicked, in the Overview tab edit the wireless device and enter the data.
    Not necessary or effective, in the world of WiFi everything else eventually invokes wpa_supplicant so you can shortcut directly to it when you're in command line mode.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,644
    Blog Entries
    14

    Default Re: wpa_supplicant fails to connect wifi

    Quote Originally Posted by tsu2 View Post
    Not necessary or effective, in the world of WiFi everything else eventually invokes wpa_supplicant so you can shortcut directly to it when you're in command line mode.

    TSU
    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.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,917
    Blog Entries
    2

    Default Re: wpa_supplicant fails to connect wifi

    Quote Originally Posted by Knurpht View Post
    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.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,644
    Blog Entries
    14

    Default Re: wpa_supplicant fails to connect wifi

    Quote Originally Posted by tsu2 View Post
    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.

    TSU
    Huh? Did you check this in YaST? Everything is there. It does the Wifi config as it should be. It ( in years and years ) never failed on me and others. Not for wired, not for Wifi.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  8. #8

    Default Re: wpa_supplicant fails to connect wifi

    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.

    Thanks for all the info and pointers

  9. #9
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,644
    Blog Entries
    14

    Default Re: wpa_supplicant fails to connect wifi

    Quote Originally Posted by catfish1968 View Post
    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.

    Thanks for all the info and pointers
    If using wicked in graphical.target works it should work in multi-user.target . You may have to check whether the connection is set to start at boot time.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,851

    Default Re: wpa_supplicant fails to connect wifi

    Quote Originally Posted by catfish1968 View Post
    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.

    Thanks for all the info and pointers
    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).
    Code:
    yast
    Henk van Velden

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •