I realize many people who use Linux have a hard time :angry: setting up wireless cards and connections so I am posting this to help those who have decided to take the wireless "root"
Now, before you continue reading this, be aware that as part of my job I test hardware for compatibility with Linux, and as a result, have tested over 40 wireless cards, some with the same chipset. I don't use ndiswrapper, so cannot help you there. However, I highly urge you to find cards that are compatible with Linux. It saves you a lot of time and effort, plus, the costs are the same, so, as with Linux, its your choice.
Right. lets begin:
1.
I assume your drivers were included in the kernel or you have compiled them and when you run iwconfig (as root) your device can be seen, such as the examples below:
ra0 no wireless extensions.
ra0 RT61 Wireless ESSID:" "
Mode:Managed Frequency:2.437 GHz Access Point: " "
Bit Rate=54 Mb/s
RTS thr

ff Fragment thr

ff
Encryption key:""
Link Quality=91/100 Signal level:-48 dBm Noise level:-79 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
ra0 RT61 Wireless ESSID:"XPORTAL"
Mode:Managed Frequency:2.437 GHz Access Point: 00:15:E9:CC:91:3C
Bit Rate=54 Mb/s
RTS thr

ff Fragment thr

ff
Encryption key:*************
Link Quality=91/100 Signal level:-48 dBm Noise level:-79 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Examples 1 and 2 obviously are not working and thats what this How To is designed to fix. Example 3 is what it will look like when we are done.
2.
Wireless devices are detected/setup as the following eth / ra / ath / wlan, in Linux. The numbering starts as 0, 1, 2, 3 ... depending on the number of devices on you computer. So, ra0 on my machine is the first wireless device on my machine, ra1 would be the second, so on and so forth.
3.
For example 1, the driver you have for your card is working, its just that no configuration data for it exists. For example 2, your card is active but no configuration data exits to help it connect to any wireless points.
4. ------- The Meat --------
Lets get those suckers working.
When you run iwconfig your wireless device should show ra0, eth0, ath0, wlan0 (etc), remember this and navigate to Kmenu >> Applications >> System >> Filemanager >> File Manager - Super User Mode. Enter your root password and now you can browse your files as root and change your system at your will. Be careful.
Next navigate to
/etc/sysconfig/network
Right-click and >> Create new text file >> NAME IT "ifcfg-THE NAME OF YOUR DETECTED WIRELESS DEVICE"
Example, mine is ifcfg-ra0 - so if yours is eth0, then name the file ifcfg-eth0
Right click on the file and Open with KATE and paste this in.
DEVICE='ENTER YOUR DEVICE NAME'
ONBOOT='yes'
BOOTPROTO='dhcp'
STARTMODE='auto'
PRE_UP_SCRIPT='ifup-ENTER YOUR DEVICE NAME'
Save the file and navigate to:
/etc/sysconfig/network/scripts
Right-click and >> Create new text file >> NAME IT "ifup-THE NAME OF YOUR DETECTED WIRELESS DEVICE"
Example, mine is ifup-ra0 - so if yours is eth0, then name the file ifup-eth0
Right click on the file and Open with KATE and paste this in - remember to replace the eth1, with your device name.
#! /bin/bash
# Wireless Boot Script
echo Setting wireless priv
ifconfig eth1 inet up
iwpriv eth1 set NetworkType=(TYPE IN HERE infra - if using a router, adhoc - if using adhoc mode)
iwpriv eth1 set AuthMode=(TYPE IN HERE shared, open - for your authentication mode)
iwpriv eth1 set EncrypType=(TYPE IN YOUR ENCRYPTION TYPE - WEP, WPA - leave blank for none)
iwpriv eth1 set DefaultKeyID=1
iwpriv eth1 set Key1=(ENTER YOUR ENCRYPTION KEY IF YOU USE ENCRYPTION)
iwpriv eth1 set SSID=(Network SSID)
ifup-dhcp eth1
Save the file
Then type ifdown YOUR DEVICE, and then ifup YOUR DEVICE.
It will then use the configuration scripts to setup your card!!!
Have fun, and post back your results
If you want a more detailed explanation on what we have done, and how it all ties together, feel free to ask and I will post an outline.
Regards