By raxxal at 2005-02-23 13:33
How to set up a Linux wireless LAN.
By Alex Rodriguez
Some vendors do not provide linux driver for their wireless network cards, so a hack must be implemented. What we are going to implement is the Windows NDIS (Windows network driver API) drivers supplied by the vendors.
Install ndiswrapper. Get the latest version at:
untar it, cd to the new ndiswrapper dir, and install it(make, make install).
Get the windows driver for the wireless card you have, you may find it in your Windows CD that came with your wireless card provided by the vendor.
ndiswrapper -i bcmwl5.inf <-- this the driver for my wireless card, yours probably will be different.
You need to look for the file with the extension inf.
Next, type: modprobe ndiswrapper, and bingo! Your wireless card LED should light up. Just not ready yet.
To check that the driver has been installed type:
Installed ndis drivers:
bcmwl5 driver present, hardware present.
Next, you need to create a file in /etc/sysconfig/network-scripts called : ifcfg-wlan0
Add the following to this file:
HWADDR=00:90:4X:94:22:6X <- Your wireless card MAC address, get it with ifconfig
ESSID='HomeNet' <- The name of your access point(wireless router).
KEY=7DC0E6358666EEFA3B088888 <- Your access point generated security key.
Finally, you need to create a script, name it whatever you want, I named mine: wlan.
Add to this script the following:
echo "Loading ndiswrapper..."
echo "Setting mode Managed..."
iwconfig wlan0 mode Managed
echo "Setting up wireless interface wlan0..."
echo " -- Setting ESSID"
iwconfig wlan0 essid HomeNet
echo " --Setting to cchannel 11..."
iwconfig wlan0 channel 11
echo " --Turning on managed mode..."
iwconfig wlan0 mode Managed
echo " --Setting encryption key"
iwconfig wlan0 key restricted 7DC0E6358666EEFA3B0628888 <-- Your security key
echo "Bringing up interface wlan0..."
ifconfig wlan0 up
echo "Activating UP address via DHCP..."
Make it executable: chmod 755, then add it to your rc.local, and your set to go. Every time the computer boots up, your wireless lan should come up ready to go.
Run iwconfig wlan0 to see how your wireless card is doing:
wlan0 IEEE 802.11g ESSID:"HomeNet"
Mode:Managed Frequency:2.462GHz Access Point: 00:12:17:19:5A:CA
Bit Rate:54Mb/s Tx-Power:25 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:7DC0-EAAA-8666-EEFA-3B06-2556-77 Security mode:restricted
Link Quality:100/100 Signal level:-45 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:2551 Missed beacon:0
Want to see more? Run the following command:
lo Interface doesn't support scanning.
eth0 Interface doesn't support scanning.
eth1 Interface doesn't support scanning.
sit0 Interface doesn't support scanning.
wlan0 Scan completed :
Cell 01 - Address: 00:12:17:19:5A:CA
Quality:0/100 Signal level:-54 dBm Noise level:-256 dBm