Main menu BASH Shell Troubleshooting Nginx Networking MySQL Google Cloud Platform Amazon Cloud Computing Rackspace Cloud Computing Linux CentOS Debian / Ubuntu Ubuntu Linux Suse RedHat and Friends Slackware Linux UNIX AIX Mac OS X FreeBSD FreeBSD Jails (VPS) Openbsd Solaris See all tutorial topics Blog About Contact us Forum RSS/FEED Linux FAQ / Howtos Ubuntu Linux Install and Configure Ndiswrapper and wpa_supplicant by nixcraft on April 23, 2008 15 comments LAST UPDATED April 24, 2008 in Debian / Ubuntu, Linux, Networking Q. How do I install NdisWrapper and wpa_supplicant under Ubuntu Linux? A. NdisWrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices such as PCI cards, USB modems on Linux / Unix-like operating systems. Ndiswrapper works by implementing the Windows kernel and NDIS
APIs, and dynamically linking the driver to this implementation. You need to install following softwares: ndiswrapper-common : Common scripts required to use the utilities ndiswrapper-utils : Userspace utilities for the ndiswrapper linux Step # 1: Download and install ndiswrapper You can download.deb ndiswrapper packages here Alternatively, you can install the same using apt-get command: $ apt-cache search ndiswrapper-utils Output (note version number 1.9): ndiswrapper-utils-1.9 - Userspace utilities for the ndiswrapper linux kernel module Now install it: $ sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9 Step # 2: Copy.INF and.sys files You need to copy.inf and.sys files from CD / floppy disk provided with your device. You can also obtain driver from manufactures web site. Step # 3: Install Driver To install driver, enter: $ sudo ndiswrapper -i driver-name.inf Verify that driver was installed: $ ndiswrapper -l Finally, install ndiswrapper driver $ sudo modprobe ndiswrapper Step # 4: Verify wireless interface Use iwconfig to see your wireless interface: $ iwconfig Sample output: lo eth0 wlan0 no wireless extensions. no wireless extensions. IEEE 802.11g ESSID:"payalhome" Mode:Managed Frequency:2.462 GHz Access Point: 00:1B:2F:A3:4C:9A Bit Rate=54 Mb/s Sensitivity=-200 dbm RTS thr=2346 B Fragment thr=2346 B Power Management:off Link Quality:29/100 Signal level:-77 dbm Noise level:-96 dbm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 Make sure your driver get loaded each time you boot your computer: $ sudo ndiswrapper -m
Step # 5: Install wpa_supplicant Wireless networks do not require physical access to the network equipment in the same way as wired networks. This makes it easier for unauthorized users to passively monitor a network and capture all transmitted frames. In addition, unauthorized use of the network is much easier. In many cases, this can happen even without user s explicit knowledge since the wireless LAN adapter may have been configured to automatically join any available network. So configure your wireless router for WPA or WPA2 security (refer router documentation for more information). wpa_supplicant is Wi-Fi Protected Access client and can be install by entering following command: $ sudo apt-get install wpasupplicant wpagui /etc/wpa_supplicant.conf - Default configuration file Scan your network Type the following command to scan your network $ iwlist wlan0 scan Sample output: wlan0 Scan completed : Cell 01 - Address: 00:1A:2F:A4:4C:9A ESSID:"payalhome" Protocol:IEEE 802.11g Mode:Managed Frequency:2.462 GHz (Channel 11) Quality:37/100 Signal level:-72 dbm Noise level:-96 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=100 Extra:atim=0 IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : WEP-40 Pairwise Ciphers (1) : TKIP Authentication Suites (1) : PSK IE: WPA Version 1 Group Cipher : WEP-40 Pairwise Ciphers (1) : WEP-40 Authentication Suites (1) : PSK Step # 6a: Configure Wireless card for WPA authentication Open /etc/wpa_supplicant.conf file: $ gksudo gedit /etc/wpa_supplicant.conf OR $ gksudo vi /etc/wpa_supplicant.conf Append configuration as follows: network={ ssid="your-network-essid" proto=wpa key_mgmt=wpa-psk pairwise=tkip group=tkip
} psk="your-password" Save and close the file. Step # 6b: Configure Wireless card for WPA2 authentication Open /etc/wpa_supplicant.conf file: $ gksudo gedit /etc/wpa_supplicant.conf OR $ gksudo vi /etc/wpa_supplicant.conf Append configuration as follows: network={ ssid="your-network-essid" proto=rsn key_mgmt=wpa-psk pairwise=ccmp TKIP group=ccmp TKIP psk="your-password" } Save and close the file. Connect to network Type the following command: $ sudo wpa_supplicant -d -c/etc/wpa_supplicant.conf -idevice-name -Dwext If your device name is wlan0, enter: $ sudo wpa_supplicant -d -c/etc/wpa_supplicant.conf -iwlan0 -Dwext Assign IP address Finally, you need to assign IP address using DHCP server built into wireless router, simply enter two commands: $ sudo ifconfig wireless-interface up $ sudo dhclient wireless-interface $ host google.com $ ping nixcraft.com If your device name is wlan0, enter: $ sudo ifconfig wlan0 up $ sudo dhclient wlan0 If every thing works as expected, you can start wpa_supplicant without -d option i.e replace -d by -B for the deamon mode: $ sudo wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 -Dwext Further readings: man pages - wpa_supplicant, wpa_supplicant.conf, iwconfig, iwscan, ping, host ndiswrapper project wpa_supplicant project Ultimate Linux desktop operating system
0 3 Stu If you would like to be kept up to date with our posts, you can follow us on Twitter, Facebook, Google+, or even by subscribing to our RSS Feed. Featured Articles: 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X Top 30 Nmap Command Examples For Sys/Network Admins 25 PHP Security Best Practices For Sys Admins 20 Linux System Monitoring Tools Every SysAdmin Should Know 20 Linux Server Hardening Security Tips Linux: 20 Iptables Examples For New SysAdmins Top 20 OpenSSH Server Best Security Practices Top 20 Nginx WebServer Best Security Practices 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors 15 Greatest Open Source Terminal Applications Of 2012 My 10 UNIX Command Line Mistakes Top 10 Open Source Web-Based Project Management Software Top 5 Email Client For Linux, Mac OS X, and Windows Users The Novice Guide To Buying A Linux Laptop { 15 comments read them below or add one } 1 FErArg April 24, 2008 at 7:03 am Great Post! -= FErArg =- http://www.ferarg.com 2 phyz June 4, 2008 at 1:41 pm great post & it works for roaming mode but how about static ip with wpa or wep?
3 James June 5, 2008 at 8:09 pm Wow, this was a very useful and well written guide. This is only my second day using ubuntu after years of Windows, but thanks to the clarity of your guide I had no trouble getting my wpa-psk card working. (However, before I found this guide I was lost in a swamp of overly complicated procedures and piecemeal advice from various forums.) 4 Ninster July 5, 2009 at 3:54 pm This was extremely useful, concise but thorough. I had spent 3 days trying to get this to work with a Netgear WN311T using ndiswrapper, and this provided the breakthrough. Next step is to make it work automatically on boot. 5 Nitin August 13, 2010 at 6:17 am Good post indeed. I succeded till step three i.e. i installed the driver. My network does not have any security mode enabled i.e. it is open still ESSID is not scanned by the system. I get the following output. I am new to Linux can anybody help. nitin@office2:~$ iwconfig lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11g ESSID:off/any Mode:Managed Channel:0 Access Point: Not-Associated Bit Rate:1 Mb/s Sensitivity=-200 dbm RTS thr=2346 B Fragment thr=2346 B Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 nitin@office2:~$ 6 Nitin August 13, 2010 at 6:42 am Upon scanning the network I get the following output. I want to connect to compexnp27g nitin@office2:~$ iwlist wlan0 scan wlan0 Scan completed : Cell 01 Address: 00:80:48:4C:3E:73 ESSID: compex-np27g Protocol:IEEE 802.11g Mode:Managed Frequency:2.412 GHz (Channel 1) Quality:56/100 Signal level:-60 dbm Noise level:-96 dbm
Encryption key:off 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=100 Extra:atim=0 Cell 02 Address: 00:02:6F:47:AC:1E ESSID: admin Protocol:IEEE 802.11b Mode:Managed Frequency:2.417 GHz (Channel 2) Quality:7/100 Signal level:-91 dbm Noise level:-96 dbm Encryption key:off Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s Extra:bcn_int=100 Extra:atim=0 Cell 03 Address: 00:1E:40:E7:58:B9 ESSID: default Protocol:IEEE 802.11g Mode:Managed Frequency:2.462 GHz (Channel 11) Quality:10/100 Signal level:-89 dbm Noise level:-96 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 nitin@office2:~$ 7 milehunter September 7, 2010 at 7:03 pm Hello. i have ptoblem on step 2. you say to copy the.sys and.inf files ok? but where to paste them? in which directory? 8 Vivek Gite September 7, 2010 at 7:05 pm Copy to /tmp and run cp /media/cdrom/file.inf /tmp sudo ndiswrapper -i driver-name.inf 9 milehunter September 7, 2010 at 7:31 pm i m new on ubuntu so when i do this: cp /media/cdrom/file.inf /tmp, i get this: milehunter@milehunter-laptop:~$ cp /media/cdrom/file.inf /tmp cp: αδύνατη η εκτέλεση της stat στο αρχείο «/media/cdrom/file.inf»: No such file or directory
10 manu November 1, 2011 at 8:28 pm hey after step 3 my ubuntu termina is showing WARNING: All config files need.conf: /etc/modprobe.d/ndiswrapper, it will be ignored in a future releas..what do you mean by that and how to solve it. 11 milehunter September 7, 2010 at 7:22 pm i m new on ubuntu so when i do this: cp /media/cdrom/file.inf /tmp, i get this: milehunter@milehunter-laptop:~$ cp /media/cdrom/file.inf /tmp cp: αδύνατη η εκτέλεση της stat στο αρχείο «/media/cdrom/file.inf»: No such file or directory 12 Hank Marshall November 8, 2011 at 7:45 pm lo no wireless extensions. wlan0 IEEE 802.11g ESSID:off/any Mode:Managed Channel:0 Access Point: Not-Associated Bit Rate:1 Mb/s Sensitivity=-200 dbm RTS thr=2346 B Fragment thr=2346 B Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 I use WPE with 128 HEX password. Need help to get past step 3. ndiswrapper -lall inst ndiswrapper output, per above message. Help Help Thank you all 13 Hank Marshall November 8, 2011 at 9:11 pm lo no wireless extensions. wlan0 IEEE 802.11g ESSID:off/any Mode:Managed Channel:0 Access Point: Not-Associated Bit Rate:1 Mb/s Sensitivity=-200 dbm RTS thr=2346 B Fragment thr=2346 B Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 I use WPE with 128 HEX password. Need help to get past step 3. ndiswrapper -lall inst ndiswrapper output, per above message. Help Help Thank you all
14 Hank Marshall November 8, 2011 at 9:17 pm Will I receive any info on this???? 15 Melqyahd February 6, 2012 at 12:46 am Hi, In the step 4, after completing the steps before, when I type iwconfig all I get is this: lo no wireless extensions. eth0 no wireless extensions. It doesn t appear wlan0 in here Could you help me, please? Thanks, Melqyahd Leave a Comment Name * E-mail * Website You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title=""> Notify me of followup comments via e-mail Submit Tagged as: /etc/wpa_supplicant.conf, access point, bit rate, host command, iwconfig command, iwscan command, linux kernel, ndis, ndiswrapper linux, noise level, pci cards, ping command, power management, software driver, sys files, Ubuntu Linux, windows drivers, windows kernel, wireless extensions, wireless interface Previous Faq: Installing Apache, PHP and mod_ssl on MS Windows Next Faq: Linux Install and Configure Netgear WG311 Marvell 88w8335 Rev 03 Chipset Wireless Card
GET FREE LINUX TIPS Sign up for our newsletter to get howto & news you@example.com Sign Up nixcraft 35,949 nixcraft ( ). Facebook
Related Faqs Linux Install and Configure Netgear WG311 Marvell 88w8335 Rev 03 Chipset Wireless Card
DNS Client ) Ubuntu Linux Configure DNS Name Server IP Address ( Debian Linux Configure Wireless Networking With WPA2 Linux Configure Intel 4965 PRO Wireless Card Linux Disable Wireless Networking ( Wi-Fi ) Debian / Ubuntu Linux Install Kernel Headers Package Using A Shell Script Linux Iptables: Add / Delete An IP Address Remotely
Linux Laptop: Display Battery Status And Thermal Temperature From Command Line HowTo: Linux Show List Of Network Cards nslookup / host Dns Client Testing Command Not Found on Debian / Ubuntu Linux 2006-2013 nixcraft. All rights reserved. Cannot be reproduced without written permission. Privacy Policy Terms of Service Questions or Comments Sitemap