OpenWrt Forum Archive

Topic: WRTSL54GS to WRT54g on Kamikaze 7.09 WDS / WPA / WPA2 ... Failure

The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

NEVERMIND.  It appears that once again, I've fixed it by talking it out to an empty forum thread.

This is my home network setup, rather what I would like it to be...

[Internet] ===> [Cable Modem] ===> [WRTSL54GS] ===> (((Wireless))) ===> [WRT54G] ===> Wired Clients (downstairs)
                                                              ||
                                                              \\
                                                                  Wired Clients (upstairs)

When I was using White Russian it was working with WDS most of the time, excepting the occasional reboot.  Everything was perfect.

Then one day I screwed up the VLAN settings on my router and said "Oops!  Time to switch to Kamikaze."  So, for the most part I'm impressed until I attempted to get my WDS working again.

I upgraded to Kamikaze 7.09 with the 2.4 kernel for my two devices, respectively.

I've made the changes to the /etc/hotplug.d/net/20-broadcom_wds that have been suggested all over the forums.  I've read just about every thread on it as well.

I've gotten it to work just fine with no encryption on either the access points or the wds link.  If I add encryption to either then the whole thing stops working.  I'd be happy to get PSK / WPA working and I'd go about my life.  What I'd really like is PSK+PSK2 on the access points and PSK2 or PSK on the WDS link.

I've not included my network configurations here because I know they work fine.  I'm including the files with encryption turned on, the way I would be minimally happy with.  Network names / passphrases have been changed to protect the innocent.  Just so you know, all the passphrases are the same, but I've tried using different ones for network and wds before as well with no result.

WRTSL54GS : 47.0.0.1 : 00:10:18:90:XX:XX
/etc/config/wireless

config wifi-device  wl0
        option type     broadcom
        option channel  '9'
        option maxassoc '20'
        option disabled '0'

config wifi-iface
        option device           wl0
        option network          lan
        option mode             ap
        option ssid             network
        option encryption       psk
        option key              'passphrase'

config wifi-iface
        option device           wl0
        option network          lan
        option mode             wds
        option ssid             wds
        option bssid            00:13:10:85:XX:XX
        option encryption       psk
        option key              'passphrase'

output of "ps | grep nas" (passphrase redacted)

/usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -l br-lan -i wl0 -A -m 4 -w 2 -s network -g 3600 -k passphrase

output of "wl -i wds0.1 wds_wpa_role"

Local endpoint's WPA role: supplicant

partial output of "iwlist scanning"

wl0       Scan completed :
          Cell 01 - Address: 00:13:10:85:XX:XX
                    ESSID:"network"
                    Mode:Master
                    Channel:9
                    Quality:0/0  Signal level:-41 dBm  Noise level:-99 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
                              12 Mb/s; 48 Mb/s

WRTSL54GS : 47.0.0.2 : 00:13:10:85:XX:XX
/etc/config/wireless

config wifi-device  wl0
        option type     broadcom
        option channel  9
        option disabled '0'

config wifi-iface
        option device           wl0
        option network          lan
        option mode             ap
        option ssid             network
        option encryption       psk2
        option key              'passphrase'

config wifi-iface
        option device           wl0
        option network          lan
        option mode             wds
        option ssid             wds
        option bssid            00:10:18:90:XX:XX
        option encryption       psk
        option key              'passphrase'

output of "ps | grep nas" (passphrase redacted)

 /usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -l br-lan -i wl0 -A -m 4 -w 2 -s network -g 3600 -k passphrase

output of "wl -i wds0.1 wds_wpa_role"

Local endpoint's WPA role: authenticator

partial output of "iwlist scanning"

wl0       Scan completed :
          Cell 01 - Address: 00:10:18:90:XX:XX
                    ESSID:"network"
                    Mode:Master
                    Channel:9
                    Quality:0/0  Signal level:-43 dBm  Noise level:-95 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
                              12 Mb/s; 48 Mb/s

Other Files
/etc/hotplug.d/net/20-broadcom_wds

include /lib/wifi

setup_broadcom_wds() {
        local iface="$1"
        local remote="$(wlc ifname "$iface" wdsmac)"

        [ -z "$remote" ] && return

        config_cb() {
                [ -z "$CONFIG_SECTION" ] && return

                config_get type "$CONFIG_SECTION" TYPE
                [ "$type" = "wifi-iface" ] || return

                config_get network "$CONFIG_SECTION" network
                [ -z "$network" ] && return

                config_get addr "$CONFIG_SECTION" bssid
                addr=$(echo "$addr" | tr 'A-F' 'a-f')
                [ "$addr" = "$remote" ] && {
                        local cfg="$CONFIG_SECTION"

                        include /lib/network
                        scan_interfaces

                        setup_interface "$iface" "$network"

                        config_get encryption "$cfg" encryption
                        config_get key "$cfg" key
                        config_get ssid "$cfg" ssid

                        sleep 10

                        case "$encryption" in
                                psk|PSK)
                                     nas4not "$network" "$iface" up auto tkip psk "$key" "$ssid"
                                ;;
                                psk2|PSK2)
                                     nas4not "$network" "$iface" up auto aes psk "$key" "$ssid"
                                ;;
                                psk+psk2|psk2+psk|PSK+PSK2|PSK2+PSK)
                                     nas4not "$network" "$iface" up auto aes+tkip psk "$key" "$ssid"
                                ;;
                                *)
                                ;;
                        esac

                }
        }

        config_load wireless
}

case "$ACTION" in
        add|ADD|register|REGISTER)
                [ "${INTERFACE%%0.*}" = wds ] && setup_broadcom_wds "$INTERFACE"
        ;;
esac

BREAKING INFORMATION:
Whenever I cycle one router with "wifi down;wifi up" the other router puts out "wl0: Invalid argument".  I have no idea what that means.

At this point I'm not sure what other information would be helpful but this is all of it, and it still isn't working.  Please let me know if there are any other tests I can run or anything that could help shed more light on the situation.

-Angry mad

(I'm not really mad, just frustrated that I can't get this thing working to its full potential.  Its an awesome combination of hardware / software.)

(Edit 01 : "cat /etc/hotplug.d/net/20-broadcom_wds" clipped the edges, so I did it again)
(Edit 02 : Edit 01 was an error.  The file really was clipped on my WRT54G, added the error I get now.)
(Edit 03 : Oh... it seems to be working now.)
(Edit 04 : Yea, once I used the right "/etc/hotplug.d/net/20-broadcom_wds" it works fine.  And once I waited patiently)

(Last edited by AngryUndead on 9 May 2008, 21:01)

The wl0: Invalid argument bug is known:

https://dev.openwrt.org/ticket/1222

I just installed openwrt from trunk and it fixes that problem for me, so I'm now happily using WDS with PSK2.  Kamikaze 7.09 was never stable with that configuration for me.

I've got the access points doing PSK+PSK2 and the wds doing PSK2 right now, for a few hours with no problems.

I'm really not comfortable building from trunk so I've left that alone (plus, I'm strictly Windows at home and work).

I'm eagerly awaiting 7.10 and a non-painful upgrade path big_smile

But thanks.

The discussion might have continued from here.