delta: thanks. If you read my previous posts you'll see I'm doing basically the same thing. By putting that in rc.local it worked fine. But I found it odd that the scripts did not work particularly when going through them a little bit and everything seemed fine (to my limited understanding of bash scripting).
ligar: your advice worked but I need to put the timeout statement right under the dhcp line. When I had it at the bottom of .conf it didn't work.
The psk needs to be in quotes if it is your key. It cannot be in quotes if it is the hexadecimal conversion that delta talks about.
Solution for using scripts with wpa_supplicant (for me)
1. Delete rc.wireless.conf
2. Ensure rc.inet1 and rc.wireless are executable
3. Adjust rc.inet1.conf for your setup. For 1 eth and 1 wireless, the following works for me:
Working rc.inet1.conf is:
Code:
# Config information for eth0:
USE_DHCP[0]="yes"
# Change this to "yes" for debugging output to stdout.
DEBUG_ETH_UP="yes"
IFNAME[1]="wlan0"
USE_DHCP[1]="yes"
DHCP_TIMEOUT[1]=2
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"
4. Adjust wpa_supplicant.conf (located at /etc)
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
scan_ssid=0
ssid="bbnet"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="your pass key"
# or comment single line above and uncomment next line
#psk=hex of your pass key produced by wpa_passphrase {ssid} {password}
}
I still get a single occurrence of:
Code:
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
But it works. This might go away when I turn debug off in rc.inet1.conf.
Edit: Just pulled eth0 plug and tried again. Works well.
Turning debug off in rc.inet1.conf did not eliminate the one occurrence of the line with wpa_ctrl. Changing timeout did not alter it either. No big deal.
Thank you for everyone's help.