Wednesday, February 28, 2007

How to enable WPA with Ndiswrapper driver

First, make sure the Ndiswrapper driver works by itself without encryption.

Create a file called /etc/wpa_supplicant.conf, and paste in the following. Modify the ssid and psk values.
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="YourWiFiSSID"
psk="YourWiFiPassword"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
}
  • Test it. Make sure your router is broadcasting its SSID.
sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd
  • If your WPA works. Load it automatically when you reboot.
gksudo gedit /etc/network/interfaces
  • Change your wlan0 section to the following.

If you are using static IP:

auto wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

or this, if you are using dhcp.

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant


  • Reboot

2 comments:

Andrew F said...

Thanks, this worked perfectly - apart from the '-Bw', which looks like a typo. At least in the version of wpa_supplicant I'm using, it doesn't have a '-w' option.

Thanks, Andrew.

Unknown said...

hi, although it's years ago, I would like to ask some help. When I made the file and test it, my ssid is found, but this is reported:
1: cc:5d:4e:91:2f:cc ssid='DAroontjepower' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - non-WPA network not allowed

does this mean my network adapter using ndiswrapper doesn't support WPA? I read somewhere some chipsets only allow no-security or WEP security using ndiswrapper.

Your Ad Here