Getting Wireless the NDISwrapper Way
which shows that the device was recognized and the driver was installed. Now, it's time to let Linux know more about the new device. Because I use OpenSUSE, I opened YaST and went to Network Devices→Network Card→Add, and selected the following:
Device type: wireless.
Configuration name: 0 (so the device will be known as wlan0).
Hardware configuration name: static-2 (whatever).
Module name: ndiswrapper (most important).
Do not choose PCMCIA or BUS. Then, go through the next screens (pick either DHCP or an IP, specify your DNS servers and so on), until you come to the Wireless Device Settings form. There, you probably will have to set the following:
Operating mode: managed (ad hoc would work for a peer-to-peer network).
Network name: Guiamovil (the name of the network to which I wanted to connect).
Authentication mode: WPA-PSK (open would work for an unrestricted, unprotected, passwordless network).
Key input type and encryption key: whatever the network administrator tells you to use. (Of course, you don't need this for an “open” network.)
You can leave all these changes out, however, if you don't know to what network you will be connecting. Simply exit the program, save all the changes, and you will have device wlan0 available. We are almost there!
If you made it this far, you can use the wireless tools, which include iwconfig and iwlist, to configure your device and search for available networks. (Of course, there are many similar tools, some even have graphic interfaces; look around if you so desire.) In my situation, I already knew the network to which I wanted to connect, but in other cases (Wi-Fi hot areas at airports, for example), you would need to look around to find one.
You can scan for networks with iwlist wlan0, and you'll get something like this:
wlan0 Scan completed : Cell 01 - Address: 00:16:B6:DB:10:93 ESSID:"linksys" Protocol:IEEE 802.11g Mode:Managed Frequency:2.437 GHz (Channel 6) Quality:0/100 Signal level:-84 dBm Noise level:-256 dBm Encryption key:off Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s 12 Mb/s; 48 Mb/s Extra:bcn_int=100 Extra:atim=0 Cell 02 - Address: 00:4F:67:00:C1:AA ESSID:"Guiamovil" Protocol:IEEE 802.11g Mode:Managed Frequency:2.437 GHz (Channel 6) Quality:0/100 Signal level:-67 dBm Noise level:-256 dBm Encryption key:on Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s 48 Mb/s; 54 Mb/s Extra:bcn_int=200 Extra:atim=0 IE: WPA Version 1 Group Cipher : WEP-40 Pairwise Ciphers (1) : WEP-40 Authentication Suites (1) : PSK
Great, the connection I wanted is there (the second one, Guiamovil), and also another open, unprotected one called Linksys. (The unchanged name is a giveaway that the wireless router was installed without any specific configuration.)
If you would rather use the command line, iwconfig allows configuring the wireless device. Try iwconfig --help or man iwconfig to learn more about this. For example, I could get the same results that I did with YaST by typing:
iwconfig wlan0 essid "Guiamovil" mode managed key "s:THESECRETPASSWORD" commit
Now, you simply can ping any site to check how the device is working or connect to the Web and surf along.
A friend of mine loaned me a PCMCIA card, so I could test a different kind of device. I first thought about removing the USB driver and setup and then installing his card, but that would have been sort of lame. Anyway, just to make sure the card worked, I tried it, starting with:
ndiswrapper -r atiwu rm /etc/modprobe.d/ndiswrapper cd /path.where.you.downloaded.ndiswrapper make uninstall make clear make make install