Getting Wireless the NDISwrapper Way

 in
How to make NDISwrapper work with different wireless devices.

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!

How Do I Connect?

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.

Second Experiment: the PCMCIA Method

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

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Blacklisting existing drivers

Paul Schmidt's picture

This is an excellent article for a problem that perplexes many Linux users.

You are incorrect on the status of Linux drivers for some chipsets. There is a Linux native driver for Broadcom wireless chipsets. The bcm43xx driver, or the newer b43 driver, are included in many newer distros by default. Many consider them to be inferior to the NDISwrapper method, and use NDISwrapper instead.

If there is an existing driver being loaded for your card, you must first remove them. You must then prevent them from loading by adding them to the /etc/modprobe.d/blacklist file.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState