I recently bought a DELL Inspiron 526+ work station with CentOS installed. But the problem is that in my read room there is no ethernet to use, so I must ask for wireless for help.

 

Then it comes the problem --- PCI wireless card vendors doesn't provide official drivers for Linux, neither does my D-LINK DWA-525 card. Then I decide to DO-IT-MYSELF!

 

First step is the locate the chipset:

$ lspci -v 

03:01.0 Network controller: RaLink Unknown device 3060
        Subsystem: D-Link System Inc Unknown device 3c04
        Flags: bus master, slow devsel, latency 64, IRQ 217
        Memory at febf0000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3

Ok, so seems DWA-525 is using RaLink 3060 chipset. Then google and download the Linux driver for 3060. Interesting thing is that the driver name is 3062.

$ wget <some URL>\2010_07_16_RT3062_Linux_STA_v2.4.0.0.tar.bz2

$ tar xvf 2010_07_16_RT3062_Linux_STA_v2.4.0.0.tar.bz2

$ cd  2010_07_16_RT3062_Linux_STA_v2.4.0.0
At this point, it's important to read the readme file in the driver src. From this instruction, I got to know that two values in os/linux/config.mk are required to be updated if WPA is needed:

HAS_WPA_SUPPLICANT=y

HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

Then make and make install, the kernel module rt3562sta.ko will be installed and inserted to kernel.


Next step is to config wpa_supplicant.

$ cd /etc/wpa_supplicant/

$ vim wpa_supplicant.conf

network={
        ssid="556-home_belkin"
        key_mgmt=WPA-PSK
        pairwise=CCMP
        psk="<network passwd here>"
}

"CCMP" here refers to AES, please refer to 'man wpa_supplicant.conf' or 'man wpa_supplicant'.

If you don't want to store plain password text in "psk" line, you can use wpa_passphrase command to generate a encrypted string, it requires your SSID as argument.

 

Then update /etc/sysconfig/wpa_supplicant:

# Use the flag "-i" before each of your interfaces, like so:
INTERFACES="-i ra0"
DRIVERS="-D wext"
......

"wext" here means Linux generic wireless extension, refer to 'man wpa_supplicant' for available driver names.

After this we need to start wpa_supplicant:

$ /etc/init.d/wpa_supplicant restart

And also let system auto start wpa_supplicant during starting up:

$ chkconfig --level 2345 wpa_supplicant on

 

The final step is to update /etc/sysconfig/network-scripts/ifcfg-ra0:

DEVICE=ra0
BOOTPROTO=dhcp
ONBOOT=yes
HWADDR=f0:7d:68:15:80:03
NETMASK=
DHCP_HOSTNAME=
IPADDR=
BONDING_OPTS=
DOMAIN=
MASTER=
TYPE=Wireless
USERCTL=no
IPV6INIT=no
PEERDNS=yes
ESSID=556-home_belkin
CHANNEL=
MODE=Managed
SECURITYMODE=off
RATE=auto # 此处可以改成'150 Mb/s' or '54 Mb/s'

 

Leave security related info blank in this config file because we have set it up in wpa_supplicant.

Now our DWA-525 should work from system-config-network GUI tool!

 

 

 

 

 

 

 

 

 

posted on 2010-09-24 17:57  考拉留  阅读(539)  评论(0编辑  收藏  举报