Fortunately, I figured this out myself.

Some docs for people who want to do the same (WPA client with Atheros card):
1. Do read the user guide. Especially the networking part. The guide is really helpful. :-)

2. I used this part in my /etc/network/interfaces
auto ath0
iface ath0 inet dhcp
        wireless-type atheros
        wireless-mode sta

3. Currently (FreeWRT 1.0.3, trunk r1894) madwifi+wpa_supplicant with sta mode is not supported. Therefore the /etc/network/interfaces is very small and does not contain any keys (it did put these into /etc/wpa_supplicant.conf).

4. Run wpa_password with your ssid and your psk.

5. Put these values into wpa_supplicant.conf
,------------ wpa_supplicant.conf -----------------------------------------
| ctrl_interface=/var/run/wpa_supplicant
| eapol_version=1
| ap_scan=1
| fast_reauth=1
|
| network={
|        ssid="myssid"
|        psk=<psk from wpa_password>
|
|        proto=WPA WPA2
|        key_mgmt=WPA-PSK
|        pairwise=CCMP TKIP
| }
`--------------------------------------------------------------------------

6. You have to hack /etc/network/if-pre-up.d/wireless-atheros (just at the end below the WEP stuff):
[ "$IF_WIRELESS_SECURITY" = "wpa-psk" ] && {
    [ "$IF_WIRELESS_MODE" = "sta" ] && {
        echo "wpa client!"
        wpa_supplicant -i$IFACE -Dmadwifi -B -c/etc/wpa_supplicant.conf
        sleep 5s
    }
    exit 0
}

7. /etc/init.d/S40network restart

8. Be happy :-)

9: Figure out how to call wpa_supplicant so that no configuration file is needed / figure out how to generate a wpa_supplicant.conf on-the-fly so that you can configure the WPA settings in network/interfaces.

fs

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
freewrt-users mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-users

Reply via email to