Duh, I was being stupid: "nas" was already built and is in the bin/packages/ directory, waiting for me to install. Strangely, it has a dependency on 'nvram', which worries me - do I need to set some nvram values as well as /etc/config/wireless ?
Anyway, starting up again, I find nas is run automatically. Furthermore, 'iwlist eth1 scan' on a Linux laptop shows that encryption is now enabled:
Cell 03 - Address: 00:16:B6:DA:72:20
ESSID:"OpenWrt"
Protocol:IEEE 802.11bg
Mode:Master
Channel:5
Encryption key:off
Bit Rate:54Mb/s
Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 24 36 48 54
Signal level=-38 dBm
Extra: Last beacon: 6ms ago
Cell 04 - Address: 00:16:B6:DA:72:20
ESSID:"OpenWrt-private"
Protocol:IEEE 802.11bg
Mode:Master
Channel:5
Encryption key:on
Bit Rate:54Mb/s
Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 24 36 48 54
Signal level=-38 dBm
Extra: Last beacon: 6ms ago
Note: I have changed the PSK to xyzzy123, rather than xyzzy, so that it is at least 8 characters long.
However, Windows XP still won't connect: what I see is
Please wait while Windows connects to the 'OpenWrt-private' network
....*****.......
which sticks there and I have to press 'Cancel'. I wasn't prompted for the PSK.
So I commented out the first SSID completely from /etc/config/wireless and ran "wifi up", and then tried rebooting. This didn't make any difference - the Windows client still could not connect, even though I was running on a single SSID at this point.
However I still had two interfaces, wl0 and wl0.1, because that in /etc/config/network (see first post for contents of that). So just to be sure, I commented out the wl0.1 definition from /etc/config/network, and rebooted. I still got no connection. Finally I power-cycled the WRT54GL, instead of just rebooting it. Still no joy.
On a whim, I then set wl0_ssid and wl0_wpa_psk in the nvram and rebooted again. No difference.
So as far as I can tell, this isn't a multi-SSID problem; for me, WPA doesn't work between Kamikaze and Windows at all. I never even get prompted for a passphrase.
The errors given by 'wifi up' still are troubling:
root@OpenWrt:/# wifi up
/sbin/wifi: eval: 100: scan_interfaces: not found
/sbin/wifi: eval: 100: find_config: not found
eap_restrict: Invalid argument
root@OpenWrt:/#
I don't know what's wrong, here's a longer shell trace in case anyone knows what to look for:
root@OpenWrt:/# sh -x /sbin/wifi up
+ . /etc/functions.sh
+ alias debug=:
+ N=
+ _C=0
+ reset_cb
+ config_load wireless
+ local DIR=./
+ _C=0
+ [ ! -e wireless -a -e /etc/config/wireless ]
+ DIR=/etc/config/
+ [ -e /etc/config/wireless ]
+ CONFIG_FILENAME=/etc/config/wireless
+ . /etc/config/wireless
+ config wifi-device wl0
+ local cfgtype=wifi-device
+ local name=wl0
+ _C=1
+ name=wl0
+ config_cb wifi-device wl0
+ config_get TYPE TYPE
+ eval TYPE="${CONFIG__TYPE}"
+ TYPE=
+ export CONFIG_SECTION=wl0
+ export CONFIG_wl0_TYPE=wifi-device
+ option type broadcom
+ local varname=type
+ shift
+ export CONFIG_wl0_type=broadcom
+ option_cb type broadcom
+ return 0
+ option channel 5
+ local varname=channel
+ shift
+ export CONFIG_wl0_channel=5
+ option_cb channel 5
+ return 0
+ config wifi-iface
+ local cfgtype=wifi-iface
+ local name=
+ _C=2
+ name=cfg2
+ config_cb wifi-iface cfg2
+ config_get TYPE wl0 TYPE
+ eval TYPE="${CONFIG_wl0_TYPE}"
+ TYPE=wifi-device
+ append DEVICES wl0
+ local var=DEVICES
+ local value=wl0
+ local sep=
+ eval export DEVICES="${DEVICES:+${DEVICES} }wl0"
+ export DEVICES=wl0
+ export CONFIG_SECTION=cfg2
+ export CONFIG_cfg2_TYPE=wifi-iface
+ option device wl0
+ local varname=device
+ shift
+ export CONFIG_cfg2_device=wl0
+ option_cb device wl0
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ export CONFIG_cfg2_mode=ap
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt-private
+ local varname=ssid
+ shift
+ export CONFIG_cfg2_ssid=OpenWrt-private
+ option_cb ssid OpenWrt-private
+ return 0
+ option hidden 0
+ local varname=hidden
+ shift
+ export CONFIG_cfg2_hidden=0
+ option_cb hidden 0
+ return 0
+ option encryption wpa
+ local varname=encryption
+ shift
+ export CONFIG_cfg2_encryption=wpa
+ option_cb encryption wpa
+ return 0
+ option key xyzzy123
+ local varname=key
+ shift
+ export CONFIG_cfg2_key=xyzzy123
+ option_cb key xyzzy123
+ return 0
+
+ config_cb
+ config_get TYPE cfg2 TYPE
+ eval TYPE="${CONFIG_cfg2_TYPE}"
+ TYPE=wifi-iface
+ config_get device cfg2 device
+ eval device="${CONFIG_cfg2_device}"
+ device=wl0
+ config_get vifs wl0 vifs
+ eval vifs="${CONFIG_wl0_vifs}"
+ vifs=
+ append vifs cfg2
+ local var=vifs
+ local value=cfg2
+ local sep=
+ eval export vifs="${vifs:+${vifs} }cfg2"
+ export vifs=cfg2
+ config_set wl0 vifs cfg2
+ export CONFIG_wl0_vifs=cfg2
+ include /lib/wifi
+ ls /lib/wifi/broadcom.sh
+ . /lib/wifi/broadcom.sh
+ config_get iftype wl0 type
+ eval iftype="${CONFIG_wl0_type}"
+ iftype=broadcom
+ eval type setup_broadcom
+ eval scan_broadcom 'wl0'
+ scan_broadcom wl0
+ local device=wl0
+ config_get vifs wl0 vifs
+ eval vifs="${CONFIG_wl0_vifs}"
+ vifs=cfg2
+ config_get mode cfg2 mode
+ eval mode="${CONFIG_cfg2_mode}"
+ mode=ap
+ ap=1
+ ap_if=cfg2
+ local _c=
+ config_set cfg2 ifname wl0
+ export CONFIG_cfg2_ifname=wl0
+ _c=1
+ ifdown=down
+ append ifdown vif 0
+ local var=ifdown
+ local value=vif 0
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}vif 0"
+ export ifdown=down
vif 0
+ append ifdown enabled 0
+ local var=ifdown
+ local value=enabled 0
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}enabled 0"
+ export ifdown=down
vif 0
enabled 0
+ append ifdown vif 1
+ local var=ifdown
+ local value=vif 1
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}vif 1"
+ export ifdown=down
vif 0
enabled 0
vif 1
+ append ifdown enabled 0
+ local var=ifdown
+ local value=enabled 0
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}enabled 0"
+ export ifdown=down
vif 0
enabled 0
vif 1
enabled 0
+ append ifdown vif 2
+ local var=ifdown
+ local value=vif 2
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}vif 2"
+ export ifdown=down
vif 0
enabled 0
vif 1
enabled 0
vif 2
+ append ifdown enabled 0
+ local var=ifdown
+ local value=enabled 0
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}enabled 0"
+ export ifdown=down
vif 0
enabled 0
vif 1
enabled 0
vif 2
enabled 0
+ append ifdown vif 3
+ local var=ifdown
+ local value=vif 3
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}vif 3"
+ export ifdown=down
vif 0
enabled 0
vif 1
enabled 0
vif 2
enabled 0
vif 3
+ append ifdown enabled 0
+ local var=ifdown
+ local value=enabled 0
+ local sep=
+ eval export ifdown="${ifdown:+${ifdown}
}enabled 0"
+ export ifdown=down
vif 0
enabled 0
vif 1
enabled 0
vif 2
enabled 0
vif 3
enabled 0
+ ap=1
+ infra=1
+ mssid=1
+ apsta=0
+ radio=1
+ eval setup_broadcom 'wl0'
+ setup_broadcom wl0
+ local _c
+ config_get channel wl0 channel
+ eval channel="${CONFIG_wl0_channel}"
+ channel=5
+ config_get country wl0 country
+ eval country="${CONFIG_wl0_country}"
+ country=
+ config_get maxassoc wl0 maxassoc
+ eval maxassoc="${CONFIG_wl0_maxassoc}"
+ maxassoc=
+ _c=0
+ which nas
+ nas=/usr/sbin/nas
+ nas_cmd=
+ if_up=
+ append vif_pre_up vif 0
+ local var=vif_pre_up
+ local value=vif 0
+ local sep=
+ eval export vif_pre_up="${vif_pre_up:+${vif_pre_up}
}vif 0"
+ export vif_pre_up=vif 0
+ append vif_post_up vif 0
+ local var=vif_post_up
+ local value=vif 0
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up}
}vif 0"
+ export vif_post_up=vif 0
+ [ cfg2 = ]
+ config_get_bool hidden cfg2 hidden 1
+ local _tmp
+ config_get hidden cfg2 hidden
+ eval hidden="${CONFIG_cfg2_hidden}"
+ hidden=0
+ eval _tmp=$hidden
+ _tmp=0
+ eval hidden=0
+ hidden=0
+ append vif_pre_up closed 0
+ local var=vif_pre_up
+ local value=closed 0
+ local sep=
+ eval export vif_pre_up="${vif_pre_up:+${vif_pre_up}
}closed 0"
+ export vif_pre_up=vif 0
closed 0
+ config_get_bool isolate cfg2 isolate
+ local _tmp
+ config_get isolate cfg2 isolate
+ eval isolate="${CONFIG_cfg2_isolate}"
+ isolate=
+ eval _tmp=$isolate
+ _tmp=
+ eval isolate=0
+ isolate=0
+ append vif_pre_up ap_isolate 0
+ local var=vif_pre_up
+ local value=ap_isolate 0
+ local sep=
+ eval export vif_pre_up="${vif_pre_up:+${vif_pre_up}
}ap_isolate 0"
+ export vif_pre_up=vif 0
closed 0
ap_isolate 0
+ wsec_r=0
+ eap_r=0
+ wsec=0
+ auth=0
+ nasopts=
+ config_get enc cfg2 encryption
+ eval enc="${CONFIG_cfg2_encryption}"
+ enc=wpa
+ wsec_r=1
+ eap_r=1
+ config_get key cfg2 key
+ eval key="${CONFIG_cfg2_key}"
+ key=xyzzy123
+ config_get server cfg2 server
+ eval server="${CONFIG_cfg2_server}"
+ server=
+ config_get port cfg2 port
+ eval port="${CONFIG_cfg2_port}"
+ port=
+ auth=2
+ crypto=2
+ eval cfg2_key="$key"
+ cfg2_key=xyzzy123
+ nasopts=-r "$cfg2_key" -h -p
+ append vif_post_up wsec 0
+ local var=vif_post_up
+ local value=wsec 0
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up}
}wsec 0"
+ export vif_post_up=vif 0
wsec 0
+ append vif_post_up wpa_auth 2
+ local var=vif_post_up
+ local value=wpa_auth 2
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up}
}wpa_auth 2"
+ export vif_post_up=vif 0
wsec 0
wpa_auth 2
+ append vif_post_up wsec_restrict 1
+ local var=vif_post_up
+ local value=wsec_restrict 1
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up}
}wsec_restrict 1"
+ export vif_post_up=vif 0
wsec 0
wpa_auth 2
wsec_restrict 1
+ append vif_post_up eap_restrict 1
+ local var=vif_post_up
+ local value=eap_restrict 1
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up}
}eap_restrict 1"
+ export vif_post_up=vif 0
wsec 0
wpa_auth 2
wsec_restrict 1
eap_restrict 1
+ config_get ssid cfg2 ssid
+ eval ssid="${CONFIG_cfg2_ssid}"
+ ssid=OpenWrt-private
+ append vif_post_up vlan_mode 0
+ local var=vif_post_up
+ local value=vlan_mode 0
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up} }vlan_mode 0"
+ export vif_post_up=vif 0
wsec 0
wpa_auth 2
wsec_restrict 1
eap_restrict 1 vlan_mode 0
+ append vif_post_up ssid OpenWrt-private
+ local var=vif_post_up
+ local value=ssid OpenWrt-private
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up}
}ssid OpenWrt-private"
+ export vif_post_up=vif 0
wsec 0
wpa_auth 2
wsec_restrict 1
eap_restrict 1 vlan_mode 0
ssid OpenWrt-private
+ append vif_post_up enabled 1
+ local var=vif_post_up
+ local value=enabled 1
+ local sep=
+ eval export vif_post_up="${vif_post_up:+${vif_post_up}
}enabled 1"
+ export vif_post_up=vif 0
wsec 0
wpa_auth 2
wsec_restrict 1
eap_restrict 1 vlan_mode 0
ssid OpenWrt-private
enabled 1
+ config_get ifname cfg2 ifname
+ eval ifname="${CONFIG_cfg2_ifname}"
+ ifname=wl0
+ append if_up ifconfig wl0 up ;
+ local var=if_up
+ local value=ifconfig wl0 up
+ local sep=;
+ eval export if_up="${if_up:+${if_up};
}ifconfig wl0 up"
+ export if_up=ifconfig wl0 up
+ [ -z -r "$cfg2_key" -h -p ]
+ bridge_interface wl0
+ . /etc/functions.sh
+ alias debug=:
+ N=
+ _C=0
+ reset_cb
+ include network
+ ls network/*.sh
+ scan_interfaces
/sbin/wifi: eval: 100: scan_interfaces: not found
+ find_config wl0
/sbin/wifi: eval: 100: find_config: not found
+ cfg=
+ [ -z ]
+ return 0
+ bridge=
+ eval cfg2_ssid="$ssid"
+ cfg2_ssid=OpenWrt-private
+ mode=-A
+ [ cfg2 = ]
+ [ -z /usr/sbin/nas ]
+ nas_cmd=/usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -i wl0 -A -m 2 -w 2 -s "$cfg2_ssid" -g 3600 -r "$cfg2_key" -h -p &
+ _c=1
+ killall -KILL nas
+ wlc stdin
eap_restrict: Invalid argument
+ eval /usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -i wl0 -A -m 2 -w 2 -s "$cfg2_ssid" -g 3600 -r "$cfg2_key" -h -p &
+ eval ifconfig wl0 up
+ ifconfig wl0 up
+ /usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -i wl0 -A -m 2 -w 2 -s OpenWrt-private -g 3600 -r xyzzy123 -h -p
+ /bin/true
root@OpenWrt:/#
Any ideas what's going on there?
Regards,
Brian.