On 11/26/2012 12:52 PM, Marius Tomaschewski wrote:
Am 26.11.2012 17:49, schrieb Dennis Gallien:
On Mon, Nov 26 11:43:54 AM you wrote:
On Mon, Nov 26 08:19:35 AM Mark Hounschell wrote:
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason. [...]
The WIRELESS_AP is used only in old/static "iwconfig" setup mode (WEP, PREFER_WPA_SUPPLICANT=no), but not in WPA/EAP mode with wpa_supplicant.
See also /etc/sysconfig/network/ifcfg.template.
Another approach: Is it possible for you to use more than one SSID?
Not with yast2. But yes -- it is possible:
# global settings WIRELESS_AP_SCANMODE='1' # -- per network # implicit _0 suffix: #WIRELESS_PRIORITY=10 WIRELESS_AUTH_MODE='psk' WIRELESS_ESSID='network-0' WIRELESS_WPA_PSK='**************' # explicit _1 suffix: #WIRELESS_PRIORITY_1=11 WIRELESS_AUTH_MODE_1='psk' WIRELESS_ESSID_1='network-1' WIRELESS_WPA_PSK_1='**************' # explicit _2 suffix: #WIRELESS_PRIORITY_2=12 WIRELESS_AUTH_MODE_2='psk' WIRELESS_ESSID_2='network-2' WIRELESS_WPA_PSK_2='**************'
This will cause to generate multiple network {} sections in wpa_supplicant.conf.
You can also write your own wpa_supplicant.conf and use the WIRELESS_WPA_CONF variable to say ifup to use it, e.g.:
WIRELESS_WPA_CONF="/etc/sysconfig/network/wpa-wlan0.conf"
See man wpa_supplicant.conf for details.
Mark, sorry I omitted . . . IIRC iwconfig can change config parameters on the fly. Take a look at the man page, there is a command to force the use of a particular AP (or SSID). If you can't get your solution with the above udev rule, you might be able to add an iwconfig line to e.g. boot.local which changes the wlan0 assignment to the AP you cant.
I don't know at the moment, but I think in wpa_supplicant mode, wpa_supplicant chooses it itself and the iwconfig ap is ignored.
I've no idea at the moment how to force wpa_supplicant to use some special ap. When there is an option, open a bug report an let me know the option name and I'll add it to the ifup-wireless script.
Hi Marius, The WIRELESS_AP option appears to already be in the ifup-wireless script. # set AP address when requested in $WIRELESS_AP. # At last mac80211 based drivers need this as signal to start # scanning for an appropriate cell, so we set it to 'any' when # $WIRELESS_AP is empty in Managed and Ad-Hoc modes, except we # have the madwifi (ath_pci) driver, which does not like it... # It is required to set up the interface before doing that. case "$WIRELESS_MODE" in ([M,m]anaged|[A,a]d-[H,h]oc|"") case "${DRIVER}" in (wl) # bnc#555774, wl driver does not like it ;; (ath_pci) test -z "$WIRELESS_AP" && WIRELESS_AP='off' ;; (*) test -z "$WIRELESS_AP" && WIRELESS_AP='any' ;; esac ;; esac if test -n "$WIRELESS_AP" ; then ip link set up dev $INTERFACE 2>/dev/null run_iw_tool config ap "$WIRELESS_AP" fi Does the above make it 'any' if ${DRIVER} is not ath_pci or wl? Thanks Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org