- Open a terminal window.
- Type and press enter to open the wpa_supplicant configuration file in a text editor.
Code: Select all
geany /etc/wpa_supplicant.conf &
- Put a hash, #, at the beginning of every line in the file without one already---this will disable any configurations already there but still allow you to go back to your old configuration if this doesn't work. (Alternatively, if you know what you're doing, you could make a backup of the file and restore it later if necessary.)
- Put the following code at the beginning of the file:
Code: Select all
ctrl_interface=/var/run/wpa_supplicant ap_scan=2 update_config=1
- Go to the end of the file and add one of the following "sections" for each network you want to be able to connect to, depending on the type of security, if any, employed. In all cases, networkname is the name of the network, myname is an arbitrary name for this network (e.g. "home" or "work") and x is the priority---a higher value here will make a connection to this network more "desirable". (Wpa_supplicant automatically prefers secured networks to unsecured networks, and prefers WPA to WEP, but the priority value overrides this.)
- Unsecured networks:
Code: Select all
network={ id_str="myname" ssid="networkname" key_mgmt=NONE priority=x }
- WEP-encrypted networks:
Notes:
Code: Select all
network={ id_str="myname" ssid="networkname" key_mgmt=NONE wep_key0=0123456789abcdef012345678 wep_tx_keyidx=0 priority=x }
- If you have multiple WEP keys, then add parameters wep_key1, wep_key2, etc. and change the value of wep_tx_keyidx as appropriate. I'm not familiar with systems that "rotate" WEP keys---that's outside the scope of this howto.
- I'm not sure if the WEP key needs to be in double quotes or not - can someone please try both and let me know? (The wpa_supplicant documentation says it doesn't, but I have reason to disbelieve that.)
- WPA-secured networks:
Notes:
Code: Select all
network={ id_str="myname" ssid="networkname" psk="0123456789abcdef012345678" proto=WPA key_mgmt=WPA-PSK pairwise=TKIP group=TKIP priority=x }
- As above, I'm not sure in what circumstances the security key needs to be in double quotes - for my network it does.
- I'm assuming TKIP encryption here. To the best of my knowledge, the majority of home wireless systems use this, but some use AES, in which case both instances of TKIP should be replaced by CCMP. Also, the value of proto should be changed to RSN or WPA2 (it doesn't matter which). Having said that, I'm not sure if other changes need to be made in that case - see the end of this post for further info.
- Unsecured networks:
- Save the file and return to the terminal window. (You can close Geany, the text editor, if you want.)
- Type and press enter to open the user startup script---all the commands in this file are run every time you boot into Puppy.
Code: Select all
geany /etc/rc.d/rc.local &
- Add the following lines to the end of the file:
Code: Select all
ifconfig ethX up wpa_supplicant -Dwext -iethX -c/etc/wpa_supplicant.conf rm /etc/dhcpc/*.pid dhcpcd -t 30 -h puppypc -d ethX
- Replace ethX with the name of your wireless interface. If you don't know this, type into a terminal and find the interface that doesn't say "no wireless extensions"---it's likely to be eth0, eth1 or wlan0.
Code: Select all
iwconfig
- Replace wext in the second line if you have an unusual network adapter, according to the following list, taken from the wpa_supplicant README (and edited for brevity):
- hostap = Host AP driver (Intersil Prism2/2.5/3)
- atmel = ATMEL AT76C5XXx (USB, PCMCIA)
- wext = Linux wireless extensions (generic)
- ralink = Ralink Client driver
- wired = wpa_supplicant wired Ethernet driver
- Save the file, close everything, and reboot Puppy. If all goes well, Puppy should take a little longer to start than usual but should be connected to your wireless network as soon as the system has finished booting!
Note: The homepage of wpa_supplicant is pretty useful if you get stuck, as are the README and example configuration file.