# iwconfig works, wpa_supplicant does not...

## bfloeagle

I can connect my wireless networks (some encrypted, some open) using iwconfig.  I recently moved my home network to WPA so I had to setup wpa_supplicant but I get the following whenever I try to start the interface...

```

 * Starting eth1

 *   Starting wpa_supplicant on eth1 ...

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.

/lib/rcscripts/sh/rc-daemon.sh: line 231:  6388 Segmentation fault      /sbin/start-stop-daemon '--start' '--exec' '/sbin/wpa_supplicant' '--pidfile' '/var/run/wpa_supplicant-eth1.pid' '--' '-Dipw' '-c/etc/wpa_supplicant/wpa_supplicant.conf' '-W' '-W' '-B' '-ieth1' '-P/var/run/wpa_supplicant-eth1.pid'                [ !! ]

```

If I switch /etc/conf.d/net back to iwconfig I can connect.  Any ideas as to what is causing the error or what/why the library is missing?

Andy

----------

## shrtckt

Seems like a revdep-rebuild would be a good start.

----------

## bfloeagle

Sorry for not getting back sooner...  It does not appear that a revdep-rebuild works (it did find problems though, and I rebuilt wpa_supplicant to be sure)...  Any other ideas?

```
Voyager init.d # ./net.eth1 restart

 * Starting eth1

 *   Starting wpa_supplicant on eth1 ...

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.

/lib/rcscripts/sh/rc-daemon.sh: line 231:  7982 Segmentation fault      /sbin/start-stop-daemon '--start' '--exec' '/sbin/wpa_supplicant' '--pidfile' '/var/run/wpa_supplicant-eth1.pid' '--' '-Dipw' '-c/etc/wpa_supplicant/wpa_supplicant.conf' '-W' '-W' '-B' '-ieth1' '-P/var/run/wpa_supplicant-eth1.pid'                [ !! ]
```

----------

## UberLord

Postup your wpa_supplicant.conf

A rough guess would be you're trying to load the smartcard engine and it's not installed.

----------

## bfloeagle

I've stripped out all the comments and fudged the configuration data...

/etc/wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

eapol_version=1

ap_scan=1

fast_reauth=1

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

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

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

network={

   ssid="MySSID"

   bssid=AA:CC:BB:00:11:22

   psk="A-SUPER-DUPER-SECRET-PASSPHRFASE"

   priority=2

}
```

I think I may have solved the problem, but I uncovered another one...  If I comment out the open_engine_path and the two pkcs11 lines, wpa_supplicant appears to load...  But something is going on...

```
Voyager / # wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf

ioctl[SIOCSIWMODE]: Operation not supported

Could not configure driver to use managed mode

ioctl[SIOCGIWRANGE]: Operation not supported

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 7 value 0x1 - ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 5 value 0x1 - ioctl[SIOCGIWSCAN]: Operation not supported

ioctl[SIOCSIWSCAN]: Operation not supported

Failed to initiate AP scan.

ioctl[SIOCGIWSCAN]: Operation not supported

CTRL-EVENT-TERMINATING - signal 2 received

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 7 value 0x0 - Failed to disable WPA in the driver.

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 5 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAP]: Operation not supported

...ctrl-c...
```

SO...  My first question would be if SSL is required because I think I'm removing that feature by commenting out those lines.  Second, since my card is an intel 2100, and it appears to be supported by wpa_supplicant, why can I scan for AP's and/or why are so many "Operation not support" messages printed?  And I don't think it is a "wext" driver issue.  I've tried using "-Dipw" (even though the output of 'wpa_supplicant' says to use wext) and I get the same results...

```
Voyager / # wpa_supplicant -Dipw -ieth1 -c/etc/wpa_supplicant.conf

ioctl[SIOCSIWMODE]: Operation not supported

Could not configure driver to use managed mode

ioctl[SIOCGIWRANGE]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[SIOCGIWSCAN]: Operation not supported

ioctl[SIOCSIWSCAN]: Operation not supported

Failed to initiate AP scan.

ioctl[SIOCGIWSCAN]: Operation not supported

CTRL-EVENT-TERMINATING - signal 2 received

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

ioctl[SIOCSIWAP]: Operation not supported

...ctrl-c...
```

Here is my /etc/conf.d/net file...  

```
modules=( "wpa_supplicant" )

modules_eth1=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

modules=( "dhcpcd" )

config_eth0=( "dhcp" )

config_eth1=( "dhcp" )
```

Any clues?  Has anyone else used an intel 2100 wireless card with wpa_supplicant?

Andy

----------

## bfloeagle

Well...  I think I fixed it...  Not sure how the solution was related though.  It seems everyone on the forums who has problems with ipw2100 and wpa does not have all the ieee80211 stuff compiled as modules...  So I check, yup, I have that stuff built into the kernel.  So I rebuilt the kernel with all ieee80211 modules instead of built in and BINGO.  WPA was communicating with an open wireless network I could see...

CONFIG_IEEE80211_CRYPT_WEP=m

CONFIG_IEEE80211_CRYPT_CCMP=m

CONFIG_IEEE80211_CRYPT_TKIP=m 

Figures it would be something simple.    :Rolling Eyes: 

NOW...  How do I get it to detect MY wireless network?  How do you make wpa communicate with a network that is not broadcasting its ssid?

----------

