Ndiswrapper and wpa supplicant
From ArchWiki
From Wikipedia
NDISwrapper is a free software driver wrapper that enables the use of Windows XP drivers for network devices (cards, USB modems, and routers), on Unix-like operating systems, for devices sharing the same architecture only, namely either IA-32 or x86-64. NDISwrapper works by implementing the Windows kernel and NDIS APIs, and dynamically linking the driver to this implementation.
This article covers installing and configuring NDISwrapper for using with WPA_supplicant and Network Profiles.
Contents |
Installing ndiswrapper and wpa_supplicant
To install ndiswrapper and wpa_supplicant:
# pacman -S ndiswrapper wpa_supplicant
NDISwrapper configuration
This document assumes using a static IP address for your wireless connection.
Once the installation has completed, just update /etc/rc.conf to load the module at boot:
MODULES=(... ndiswrapper ...)
It would be best to test that ndiswrapper loads, so:
# modprobe ndiswrapper # iwconfig
and wlan0 should exist, check this page if facing problems: Ndiswrapper installation wiki.
wpa_supplicant configuration
WPA is being used because it's much more secure than using WEP.
WPA-PSK
Configure wpa_supplicant so that it can use WPA-PSK. First, edit /etc/wpa_supplicant.conf, creating it if it does not exist:
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 eapol_version=1 ap_scan=1 fast_reauth=1 network={ ssid="ESSID" psk="PASSWORD" key_mgmt=WPA-PSK proto=WPA }
Note: where it asks for PSK, do not enter the passkey. Run the following command first:
$ wpa_passphrase "ESSID" "SECRETPHRASE"
This will then output something like this:
network={ ssid="ESSID" #psk="SECRETPHRASE" psk=325lasdflk234523lkasdflkl654325234lkasdf123jkkj34kl }
Paste the long alphanumeric string into wpa_supplicant.conf as shown above.
/var/run directory
The ctrl_interface directory needs to be created (as it's not usually there by default):
# mkdir /var/run/wpa_supplicant
Network Profiles
Instead of using the default network daemon, configure it differently using network profiles. Hence, in /etc/rc.conf comment out the lines in the NETWORKING section, except HOSTNAME.
Also, uncomment the network profiles line, as shown below:
NETWORKS=(main)
Now, you need to create the network profile, which is stored in /etc/network-profiles, and needs to be called the same name as what you mentioned above. So, in this example, the filename should be "main". Here is the file--configure by replacing as apropiate:
DESCRIPTION="Wireless Profile" INTERFACE=wlan0 HOSTNAME=myhostname DOMAINNAME=mydomainname IFOPTS="10.1.1.4 netmask 255.255.255.0 broadcast 10.1.1.255" GATEWAY=10.1.1.1 DOMAIN=mydomainname DNS1=10.1.1.1 ESSID=WLAN IWOPTS="mode managed essid $ESSID" WIFI_INTERFACE=wlan0 WIFI_WAIT=5 USEWPA="yes" WPAOPTS="-D wext" # legacy: wpa-supplicant older than v1.12 need "-D ndiswrapper" instead
Troubleshooting
Common problems and solutions
Card shows as ethX
If the wireless card is mounted on wireless interface ethX then the solution maybe to get a patch here [1]. Compile this from source or use the package manager:
# pacman -S bcm43xx-fwcutter
1. Check the driver:
# bcm43xx-fwcutter -i DRIVER's_SYS_FILE
2. If all went well:
# bcm43xx-fwcutter DRIVER'S_SYS_FILE
3. Move all the files:
# mkdir /lib/firmware; mv *.fw /lib/firmware/
4. Test:
# ifconfig ethX up