# wpa_supplicant does not define a driver error

## arjay

Trying to set up wireless networking using wpa_supplicant, and this error keeps returning. I think I have everything built in kernel and that I am just missing a .conf detail.

My conf.d/net:

```

iface_eth0="dhcp"

dhcpcd_eth0="-t 30 -N -HD"

iface_eth1="dhcp"

dhcpcd_eth1="-t 30 -N -HD"

preferred_aps=( "MYESSID" )

# Tell wpa_supplicant to use this driver

wpa_supplicant_eth1="-hostap"

# wpa_supplicant_eth1="-prism54"

# wpa_supplicant_eth1="-madwifi"

wpa_timeout_eth1=20

#To put card in Managed Mode

iwconfig_eth1="mode managed"

```

My wpa_supplicant.conf:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

eapol_version=1

ap_scan=1

fast_reauth=1

# home network

network={

        ssid="MYESSID"

        scan_ssid=1

        key_mgmt=WPA-PSK

        psk="MYASCIIPASSWORD"

        priority=5

}

```

At one time, prior to my last Gentoo reinstall, I was able to manually connect to my wireless network by entering the following in this sequence:

```

iwconfig eth0 essid MYESSID

iwconfig eth0 key s:MYASCIIPASSWORD

dhcpcd eth0

```

Now, for some reason, eth0 is my ethernet connection and eth1 is my wireless. I have WPA configured on my router, but for some reason iwconfig with my ascii password was able to get me in. Not now. I've tried different drivers including madwifi, prism54, hostap, without success. My ubuntu distro, on another partition, uses orinoco and works fine. I haven't seen that to be an option with wpa_supplicant, but thought the use of madwifi may include hermes, orinoco driver ability.

I would like to get wpa_supplicant working, but may change my module preference back to iwconfig and just engage wireless manually as I have in the past.

Thanks!

----------

## thesnowman

It would help if you told us what kind of Wireless NIC you are using.

However, it looks like a problem with this line:

```
wpa_supplicant_eth1="-hostap"
```

This should read:

```
wpa_supplicant_eth1="-Dhostap"
```

The name of your network interfaces are usually determined by the driver that loads first.  If you load your wired NIC driver first it will be eth0 and your wireless will be eth1.  The easiest way to combat this is to write a udev rule that ensures your wireless NIC always has the same interface name (mine is wlan0).  Search these forums for examples on how to do this.

----------

## arjay

 *thesnowman wrote:*   

> It would help if you told us what kind of Wireless NIC you are using.
> 
> However, it looks like a problem with this line:
> 
> ```
> ...

 

Sorry...it's a mini-pci Prism 2.5. The Chipset is Actiontec. Hostap or Orinoco-pci drivers are recommended, both of which I've obtained. I'll try the change you suggested, however, I've entered that as a command in the Konsole, and while it continually tries, it never connects with the router. In searching the forums, I have come across the interface name of wlan0. I'll have to look at it again as I was searching for information pertaining to .conf files for conf.d and wpa_supplicant at the time.

Thanks

----------

## anjames

I have been getting a similar error:

```

localhost net-wireless # /etc/init.d/net.ath0 start

 * Caching service dependencies ...                                                                                                                 [ ok ]

 * Starting ath0

 *   Starting wpa_supplicant on ath0 ...

 *   wpa_supplicant_ath0 does not define a driver

Line 32: Too long WEP key 0 '"XXXXF887XXXX0351XXXX89XXXX'.

Line 32: failed to parse wep_key0 '"XXXXF887XXXX0351XXXX89XXXX'.

Line 35: failed to parse network block.

Failed to read read or parse configuration '/etc/wpa_supplicant.conf'.                                                                              [ !! ]
```

I have emerged the latest (stable) madwifi-ng and madwifi-ng-tools and added USE="madwifi' to make.conf, then reemerged wpa_supplicant and I'm still getting this error. I even tried both:

wpa_supplicant_eth0="-Dmadwifi"

and

wpa_supplicant_eth0="-Dath_pci"

in conf.d/net with no change.

```
localhost net-wireless # cat /etc/conf.d/net

# Prefer wpa_supplicant over wireless-tools

modules=( "wpa_supplicant" )

# It's important that we tell wpa_supplicant which driver we should

# be using as it's not very good at guessing yet

#wpa_supplicant_eth0="-Dmadwifi"

wpa_supplicant_eth0="-Dath_pci"

```

```
localhost net-wireless # modprobe madwifi

FATAL: Module madwifi not found.

localhost net-wireless # modprobe ath_pci

localhost net-wireless # 
```

```
localhost net-wireless # cat /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# EAPOL frame dropping fix

eapol_version=1

# EAP fast re-authentication

fast_reauth=1

# OpenSSL Engine support

# make the opensc engine available

opensc_engine_path=/usr/lib/opensc/engine_opensc.so

# make the pkcs11 engine available

pkcs11_engine_path=/usr/lib/opensc/engine_pkcs11.so

# configure the path to the pkcs11 module required by the pkcs11 engine

pkcs11_module_path=/usr/lib/pkcs11/opensc-pkcs11.so

network={

        ssid="UCSD"

        key_mgmt=NONE

}

network={

        ssid="UCSDGlorita2"

        key_mgmt=NONE

        wep_key0="XXXXF887XXXX0351XXXX89XXXX"

        wep_tx_keyidx=0

        priority=5

}

```

I still can't get this working. Any ideas what to try next?

Thanks

----------

## UberLord

anjames, you should be using wpa_supplicant_ath0="-Dmadwifi" as the madwifi driver creates the ath0 interface instead of eth0 as they like to be different.

----------

## anjames

Thanks. That got rid of the undefined driver part, but the WEP key too long error persists... fiddlesticks.

```
localhost linux # cat /etc/conf.d/net

# Prefer wpa_supplicant over wireless-tools

modules=( "wpa_supplicant" )

#modules=( "iwconfig" )

# It's important that we tell wpa_supplicant which driver we should

# be using as it's not very good at guessing yet

wpa_supplicant_ath0="-Dmadwifi"

localhost linux # head /etc/conf.d/wireless

# /etc/conf.d/wireless:

# Global wireless config file for net.* rc-scripts

preferred_aps=( "UCSDGlorita2" "UCSD" )

key_UCSDGlorita2="****F887****0351****89****"      # no s: means a hex key

```

although, I guess the key_UCSDGlorita2 line in /etc/conf.d/wireless is pretty much ignored and the one in /etc/wpa_supplicant is used now right?

I feel like this system of equations is overdetermined... can I remove the preferred_ap's and key_ucsdglorita2=... lines from /etc/conf.d/wireless? Do I even need /etc/conf.d/wireless with wpa_supplicant?

BREAKING NEWS: When I remove the quotes from around the key0 part in wpa_supplicant.conf I get a new error!

```
localhost linux # /etc/init.d/net.ath0 start

 * Starting ath0

 *   Starting wpa_supplicant on ath0 ...

ENGINE: ctrl cmd_string failed: LOAD (null) [error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library]

SSL: Failed to initialize TLS context.

Failed to initialize EAPOL state machines.                                        [ !! ]

```

cool I guess...

----------

