Wireless Setup: Part 3
After a few days, I've finally gotten ubuntu to connect to my secure wireless router at home. There were two pieces of software I needed: Network Manager and WPA Supplicant. Both are available using the automatic download package manager in ubuntu. The ubuntu website also has a page explaining how to get WPA wireless up and running. After installation, I am supposed to restart some program called "dbus".
sudo /etc/init.d/dbus restart
This doesn't change anything, but after logging out and logging back in, an icon appears in the top right corner of the screen. Clicking on it is supposed to list available wireless networks, but it only shows my wired ethernet. In order to get it to show available networks, I have to go into the Networking control panel and disable all my internet connections (not just unchecking them, I have to go into "Properties" and disable each one). Then right-click on the Network Manager icon and select "Disable Networking". Right-clicking again and "Enable Network" lets me see all the wireless networks nearby, except for mine. This is because my router doesn't broadcast it's SSID. Clicking on the Network Manager icon allows me to "Connect to other Wireless Network", where I can enter the SSID and password for my router.
Not surprisingly, this doesn't work. This is because I still need to set up WPA supplicant to do all the encryption. The first thing I need to do is figure out the hexadecimal passkey for my network.
wpa_passphrase NetworkSSID NetworkPassword
where "NetworkSSID" and "NetworkPassword" are replaced with the actual SSID and WPA password. This command will list the hex password. Copy this password for later. According to this page, I also have to create two text files for configuring WPA supplicant.
sudo gedit /etc/default/wpasupplicant
and add one line:
ENABLED=1
I think this allows other programs to use WPA supplicant, but I'm not sure. The other file is the real configuration file.
sudo chmod 600 /etc/wpa_supplicant.conf
sudo gedit /etc/wpa_supplicant.conf
and add the lines:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="NetworkSSID"
#psk="NetworkPassword"
psk=PasteHexadecimalPasswordHere
key_mgmt=WPA-PSK
proto=WPA
}
Other networks may also be listed in this file. Supposedly this configuration can be tested by the command
sudo wpa_supplicant -D ndiswrapper -i wlan0 -c /etc/wpa_supplicant.conf
Remember that my wireless card driver is ndiswrapper and my card is identified as wlan0. Of course this command didn't connect to anything for me. Then I saw some other webpages that WPA supplicant may have problems if your router doesn't broadcast its SSID (like mine). So I enabled SSID broadcast. WPA supplicant still doesn't connect, but now Network Manager does. Go figure. I don't know what's going on here, but at least I can connect to the internet. I just need to remember to turn on the SSID broadcast before I try to use this laptop at home. I think maybe I didn't have to do all the WPA supplicant configuration, and that all of my problems would have been solved right away if I had enabled SSID broadcast. Oh well.
sudo /etc/init.d/dbus restart
This doesn't change anything, but after logging out and logging back in, an icon appears in the top right corner of the screen. Clicking on it is supposed to list available wireless networks, but it only shows my wired ethernet. In order to get it to show available networks, I have to go into the Networking control panel and disable all my internet connections (not just unchecking them, I have to go into "Properties" and disable each one). Then right-click on the Network Manager icon and select "Disable Networking". Right-clicking again and "Enable Network" lets me see all the wireless networks nearby, except for mine. This is because my router doesn't broadcast it's SSID. Clicking on the Network Manager icon allows me to "Connect to other Wireless Network", where I can enter the SSID and password for my router.
Not surprisingly, this doesn't work. This is because I still need to set up WPA supplicant to do all the encryption. The first thing I need to do is figure out the hexadecimal passkey for my network.
wpa_passphrase NetworkSSID NetworkPassword
where "NetworkSSID" and "NetworkPassword" are replaced with the actual SSID and WPA password. This command will list the hex password. Copy this password for later. According to this page, I also have to create two text files for configuring WPA supplicant.
sudo gedit /etc/default/wpasupplicant
and add one line:
ENABLED=1
I think this allows other programs to use WPA supplicant, but I'm not sure. The other file is the real configuration file.
sudo chmod 600 /etc/wpa_supplicant.conf
sudo gedit /etc/wpa_supplicant.conf
and add the lines:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="NetworkSSID"
#psk="NetworkPassword"
psk=PasteHexadecimalPasswordHere
key_mgmt=WPA-PSK
proto=WPA
}
Other networks may also be listed in this file. Supposedly this configuration can be tested by the command
sudo wpa_supplicant -D ndiswrapper -i wlan0 -c /etc/wpa_supplicant.conf
Remember that my wireless card driver is ndiswrapper and my card is identified as wlan0. Of course this command didn't connect to anything for me. Then I saw some other webpages that WPA supplicant may have problems if your router doesn't broadcast its SSID (like mine). So I enabled SSID broadcast. WPA supplicant still doesn't connect, but now Network Manager does. Go figure. I don't know what's going on here, but at least I can connect to the internet. I just need to remember to turn on the SSID broadcast before I try to use this laptop at home. I think maybe I didn't have to do all the WPA supplicant configuration, and that all of my problems would have been solved right away if I had enabled SSID broadcast. Oh well.
0 Comments:
Post a Comment
<< Home