wireless networking with dlink dwl g520
Recently i bought a D-Link AirPlus DWL-G520 Wireless PCI Adapter for one desktop machine i have.I manage to get it working in gentoo with wpa-psk following these steps.
First after i insert the card in the box i run update-pciids so lspci list the card
# lspci |grep Ethernet
01:08.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
Then i emerged net-wireless/madwifi-ng and net-wireless/madwifi-ng-tools to provide me the driver for the card.So with modprobe ath_pci the module is loaded.
# lsmod |grep ath
ath_rate_sample 12288 1
ath_pci 88416 0
wlan 188932 4 wlan_scan_sta,ath_rate_sample,ath_pci
ath_hal 189712 3 ath_rate_sample,ath_pci
Next as i read in the handbook here i have to emerge net-wireless/wpa_supplicant and edit /etc/conf.d/net as follows
modules=( “wpa_supplicant” )
wpa_supplicant_ath0=”-Dmadwifi”
and /etc/wpa_supplicant/wpa_supplicant.conf like that
# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
network={
key_mgmt=NONE
priority=-9999999
}
# The below line not be changed otherwise we refuse to work
ctrl_interface=/var/run/wpa_supplicant
# Ensure that only root can read the WPA configuration
ctrl_interface_group=0
# Let wpa_supplicant take care of scanning and AP selection
ap_scan=1
# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
network={
ssid=”**********”
psk=”**********”
# The higher the priority the sooner we are matched
priority=5
}
After that i run wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iath0 -Dmadwifi -B to start the wpa_supplicant daemon and last i run dhcpcd -n ath0 so that ath0 interface takes an ip.
So far so good but now i have to find a way so ath0 will start automatically on boot and dhcpcd configure it then.Does anyone have any hint?(for the solution see my later post )