Am Donnerstag, 26. Juni 2008 schrieb Zhou Rui: > Finally, I emerged madwifi-ng and the WLAN card works. Add if I do the cmd > manually: > # /etc/init.d/net.ath0 start > the interface can get IP address from dhcp normally. But when I add the > net. ath0 to the > runlevel default and reboot, it cannot obtain the IP information with > dhcpcd... That means > I have to run the network restart script every time the system boots... Can > you give me some > advices about this?
Did you autoload the module at boot (see /etc/conf.d/modules:
modules="ath_pci")?
> # cat /etc/conf.d/net
>
> # This blank configuration will automatically use DHCP for any net.*
> # scripts in /etc/init.d. To create a more complete configuration,
> # please review /etc/conf.d/net.example and save your configuration
> # in /etc/conf.d/net (this file :]!).
>
> # config_eth0=( "dhcp" )
> # dhcp_eth0="nonis nontp"
>
> modules=( "iwconfig" )
> key_xxxxxx="[1] cccc-cccc-cccc-cccc-cccc-cccc-cc key [1] enc restricted"
> preferred_aps=( "xxxxxx" )
Hmm, isn't that WEP only (not sure)?
> config_ath0=( "dhcp" )
> dhcp_ath0="nonis nontp"
Here's mine:
modules=( "wpa_supplicant" "dhcpcd" )
wpa_supplicant_ath0="-Dmadwifi"
wpa_timeout_ath0=60
essid_ath0="<my_network_name>"
config_<my_network_name>=( "dhcp" )
key_<my_network_name>="s:<my_wpa_key>"
And finally, my wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
# ap_scan=2 was the one for me you may try 0 or 1 indstead of 2
ap_scan=0
fast_reauth=1
network={
ssid="<my_network_name>"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="<my_wpa_key>"
}
Of course, you need to emerge wpa_supplicant.
HTH...
Dirk
signature.asc
Description: This is a digitally signed message part.

