LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   wpa_supplicant: Failed to initialize driver (https://www.linuxquestions.org/questions/slackware-14/wpa_supplicant-failed-to-initialize-driver-4175668012/)

unInstance 01-19-2020 05:41 AM

wpa_supplicant: Failed to initialize driver
 
My setup:
  • SlackWare -current 5.4.13
  • NetworkManager-1.22.4-x86_64-1
  • wpa_supplicant-2.9-x86_64-1

wpa.conf
Code:

ctrl_interface=/sys/class/net/eth0
ctrl_interface_group=root
ap_scan=0
network={
    key_mgmt=IEEE8021X
    eap=PEAP
    pairwise=CCMP TKIP
    identity="<>"
    password="<>"
    phase2="auth=MSCHAPV2"
    priority=2
}

Problem: if I run sudo wpa_supplicant -i eth0 -c ~/wpa.conf, I get the following error
Code:

Successfully initialized wpa_supplicant
nl80211: Could not configure driver mode
nl80211: deinit ifname=eth0 disabled_11b_rates=0
eth0: Failed to initialize driver interface

I try to read bsd wpa_supplicant man pages as they are better, but I cannot find solution. Exact same error appears even if plug Ethernet cable out. I had same error on archlinux so I think the trouble is in config or command I use to run it.
Yes, I try to connect to college eduroam network.

teckk 01-19-2020 07:25 AM

Does slackware use predictable network naming. Are you sure your device is eth0?
What is the output of ip a

unInstance 01-19-2020 08:04 AM

Code:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 68:f7:28:fa:d0:43 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 7e:04:b1:1e:a0:e7 brd ff:ff:ff:ff:ff:ff
5: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether e6:1b:a4:00:a1:e7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.198/24 brd 192.168.42.255 scope global dynamic noprefixroute
usb0
      valid_lft 3591sec preferred_lft 3591sec
    inet6 fe80::9c21:5bf:dab4:5695/64 scope link noprefixroute
      valid_lft forever preferred_lft forever


abga 01-19-2020 10:34 AM

Quote:

Originally Posted by unInstance (Post 6080285)
Problem: if I run sudo wpa_supplicant -i eth0 -c ~/wpa.conf, I get the following error

Try specifying to wpa_supplicant that you're using a wired connection:
Code:

/usr/sbin/wpa_supplicant -D wired -i eth0 -c ~/wpa.conf
https://linux.die.net/man/8/wpa_supplicant

unInstance 01-19-2020 10:41 AM

Quote:

Originally Posted by abga (Post 6080384)
Try specifying to wpa_supplicant that you're using a wired connection:
Code:

/usr/sbin/wpa_supplicant -D wired -i eth0 -c ~/wpa.conf
https://linux.die.net/man/8/wpa_supplicant

Code:

Successfully initialized wpa_supplicant
Could not unlink existing ctrl_iface socket '/sys/class/net/eth0': Operation not permitted
Failed to initialize control interface '/sys/class/net'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

I got NetworkManager running. Do I have to get rid of it?

abga 01-19-2020 10:49 AM

Please make sure you run wpa_supplicant as root (I'm against using sudo) and kill any existing instances of wpa_supplicant before you start your manual test. NetworkManager (never used it) might interfere and indeed, try to get rid of it for the moment, until you're sure your conf files are OK.
Here is an (older) example of NetworkManager interfering with hostapd:
https://askubuntu.com/questions/4727...re-driver-mode

teckk 01-19-2020 11:28 AM

Are you trying to use wpa_supplicant on a wireless connection?
Your wireless is wlan0

Edit:
You also have a usb device plugged in usb0
Which one are you trying to connect to a 802.11 wpa secured device?

unInstance 01-19-2020 11:33 AM

Quote:

Originally Posted by teckk (Post 6080398)
Are you trying to use wpa_supplicant on a wireless connection?
Your wireless is wlan0

Edit:
You also have a usb device plugged in usb0
Which one are you trying to connect to a 802.11 wpa secured device?

I want to use wired ethernet connection.
USB is the internet from my Android device.

unInstance 01-19-2020 11:40 AM

Quote:

Originally Posted by abga (Post 6080389)
Please make sure you run wpa_supplicant as root (I'm against using sudo) and kill any existing instances of wpa_supplicant before you start your manual test. NetworkManager (never used it) might interfere and indeed, try to get rid of it for the moment, until you're sure your conf files are OK.
Here is an (older) example of NetworkManager interfering with hostapd:
https://askubuntu.com/questions/4727...re-driver-mode

I disabled NM, increased my privileges by su and then ran wpa_supplicant again. Same error.

teckk 01-19-2020 11:44 AM

I've never used wpa_supplicant on a wired interface.
https://wiki.archlinux.org/index.php/Wpa_supplicant

Little more than half way down the page
Code:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=0
network={
  key_mgmt=IEEE8021X
  eap=PEAP
  identity="user_name"
  password="user_password"
  phase2="autheap=MSCHAPV2"
}

Code:

nl80211 driver not supported on some hardware
On some (especially old) hardware, wpa_supplicant may fail with the following error:

Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
wlan0: Failed to initialize driver interface

This indicates that the standard nl80211 driver does not support the given hardware. The deprecated wext driver might still support the device:

I'll let you red all that.

Also here is this.
https://wiki.archlinux.org/index.php/NetworkManager

unInstance 01-19-2020 11:48 AM

Quote:

Originally Posted by teckk (Post 6080408)
I've never used wpa_supplicant on a wired interface.
https://wiki.archlinux.org/index.php/Wpa_supplicant

Little more than half way down the page
Code:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=0
network={
  key_mgmt=IEEE8021X
  eap=PEAP
  identity="user_name"
  password="user_password"
  phase2="autheap=MSCHAPV2"
}

Code:

nl80211 driver not supported on some hardware
On some (especially old) hardware, wpa_supplicant may fail with the following error:

Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
wlan0: Failed to initialize driver interface

This indicates that the standard nl80211 driver does not support the given hardware. The deprecated wext driver might still support the device:

I'll let you red all that.

Also here is this.
https://wiki.archlinux.org/index.php/NetworkManager

As you can see, it does not give this error anymore. I have a different one. My hardware is supported.

teckk 01-19-2020 12:14 PM

Quote:

college eduroam network
I've heard people speak of that before.

https://www.reddit.com/r/archlinux/c...on_arch_linux/
https://unix.stackexchange.com/quest...wpa-supplicant
https://aur.archlinux.org/packages/netctl-eduroam/
https://github.com/oleks/eduroam-wpa...upplicant.conf
https://it.uib.no/en/Eduroam_configu...wpa_supplicant
https://blogs.umass.edu/Techbytes/tag/eduroam/

You may need to speak to the IT admin, for the correct config, certificate...etc.

unInstance 01-19-2020 12:16 PM

Quote:

Originally Posted by teckk (Post 6080418)
You may need to speak to the IT admin, for the correct config, certificate...etc.

Yeeeaah, but my trouble is that wpa_supplicant does not want to run.

abga 01-19-2020 01:14 PM

Quote:

Originally Posted by unInstance (Post 6080405)
I disabled NM, increased my privileges by su and then ran wpa_supplicant again. Same error.

Instead of "su" always use "su -" to also inherit root's environment. And, try getting used becoming root under Slackware when doing administrative tasks. sudo might work in most of the cases, but you could get into trouble with it. Besides, check the "Note:" section
https://wiki.archlinux.org/index.php...wpa_passphrase

Back to your issue and the latest developments. I just noticed that the eth0 was down in your post #3 and you'll need to bring it up before running wpa_supplicant
Code:

#bring up the ethernet adapter
/sbin/ip link set dev eth0 up
#flush its configuration
/sbin/ip address flush dev eth0
# you might need an IP address before doing the IEEE 802.1X authentication with wpa_supplicant
/sbin/dhclient eth0
# then run wpa_supplicant


bassmadrigal 01-20-2020 06:13 PM

Also, please make sure network manager is not running before trying to manually connect via wpa_supplicant.

Code:

su -
/etc/rc.d/rc.networkmanager stop
wpa_supplicant -D wired -i eth0 -c ~/wpa.conf



All times are GMT -5. The time now is 06:35 PM.