1 |
Am Donnerstag, 26. Juni 2008 schrieb Zhou Rui: |
2 |
> Finally, I emerged madwifi-ng and the WLAN card works. Add if I do the cmd |
3 |
> manually: |
4 |
> # /etc/init.d/net.ath0 start |
5 |
> the interface can get IP address from dhcp normally. But when I add the |
6 |
> net. ath0 to the |
7 |
> runlevel default and reboot, it cannot obtain the IP information with |
8 |
> dhcpcd... That means |
9 |
> I have to run the network restart script every time the system boots... Can |
10 |
> you give me some |
11 |
> advices about this? |
12 |
|
13 |
Did you autoload the module at boot (see /etc/conf.d/modules: |
14 |
modules="ath_pci")? |
15 |
|
16 |
> # cat /etc/conf.d/net |
17 |
> |
18 |
> # This blank configuration will automatically use DHCP for any net.* |
19 |
> # scripts in /etc/init.d. To create a more complete configuration, |
20 |
> # please review /etc/conf.d/net.example and save your configuration |
21 |
> # in /etc/conf.d/net (this file :]!). |
22 |
> |
23 |
> # config_eth0=( "dhcp" ) |
24 |
> # dhcp_eth0="nonis nontp" |
25 |
> |
26 |
> modules=( "iwconfig" ) |
27 |
> key_xxxxxx="[1] cccc-cccc-cccc-cccc-cccc-cccc-cc key [1] enc restricted" |
28 |
> preferred_aps=( "xxxxxx" ) |
29 |
|
30 |
Hmm, isn't that WEP only (not sure)? |
31 |
|
32 |
> config_ath0=( "dhcp" ) |
33 |
> dhcp_ath0="nonis nontp" |
34 |
|
35 |
Here's mine: |
36 |
|
37 |
modules=( "wpa_supplicant" "dhcpcd" ) |
38 |
wpa_supplicant_ath0="-Dmadwifi" |
39 |
wpa_timeout_ath0=60 |
40 |
essid_ath0="<my_network_name>" |
41 |
config_<my_network_name>=( "dhcp" ) |
42 |
key_<my_network_name>="s:<my_wpa_key>" |
43 |
|
44 |
And finally, my wpa_supplicant.conf: |
45 |
|
46 |
ctrl_interface=/var/run/wpa_supplicant |
47 |
ctrl_interface_group=0 |
48 |
eapol_version=1 |
49 |
# ap_scan=2 was the one for me you may try 0 or 1 indstead of 2 |
50 |
ap_scan=0 |
51 |
fast_reauth=1 |
52 |
|
53 |
network={ |
54 |
ssid="<my_network_name>" |
55 |
proto=WPA |
56 |
key_mgmt=WPA-PSK |
57 |
pairwise=TKIP |
58 |
group=TKIP |
59 |
psk="<my_wpa_key>" |
60 |
} |
61 |
|
62 |
Of course, you need to emerge wpa_supplicant. |
63 |
|
64 |
HTH... |
65 |
|
66 |
Dirk |