Revision [29084]
This is an old revision of HowToWifiFromCommandWEP made by darkcity on 2013-10-06 15:41:46.
Intro | part1 - WEP | part2 - WPA
How to configure wifi from the commandline
PART 1: WEP encryption.
To configure for WEP encryption -
Code: |
iwconfig eth1 essid MY_ESSID
iwconfig eth1 key open 1234567890 iwconfig eth1 mode managed |
You will often see reference to these 3 parameters, essid/key/mode, being used within a single iwconfig command instead of 3 separate commands, but apparently the configuration is more reliable when the parameters are run separately.
Obviously replace "MY_ESSID" with your SSID, and "1234567890" with your WEP encryption key - as hexadecimal digits.
If you want to use your WEP password (ASCII string) instead of the true WEP hex key, then you must use the s: prefix. In this case the 2nd command would be -
Code: |
iwconfig eth1 key open s:MY_WEP_PASSWORD |
And if your password contains spaces, you should enclose it in quotation marks.
Most wifi routers use "open" WEP authentication, but it could be "restricted", in which case the 2nd command should be
Code: |
iwconfig eth1 key restricted 1234567890 |
Or if your router has no encryption, the 2nd command should be
Code: |
iwconfig eth1 key off |
Now to obtain an automatic IP address (DHCP)
for Puppy 3.x and earlier -
Code: |
rm /etc/dhcpc/*.pid
dhcpcd -t 30 -h puppypc -d eth1 |
for Puppy 4.0 onwards, the version of dhcpcd is different, thus -
Code: |
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid dhcpcd -t 30 -h puppypc -d eth1 |
If this dhcpcd command fails, try it with extra parameters which avoid any use of the new logic for ipv6-compatible Client ID, like this -
Code: |
dhcpcd -I '' -t 30 -h puppypc -d eth1 |
That's hyphen, capital i, space, apostrophe, apostrophe (not quotation marks). Thanks to rerwin for this information.
Or to obtain a static IP address,
modify /etc/resolv.conf to include your nameservers, then
Code: |
ifconfig eth1 192.168.0.xx broadcast 192.168.0.255 netmask 255.255.255.0
route add default gw 192.168.0.1 eth1 |
Obviously replace the appropriate IP addresses.
Puppy contains an alternative wifi configuration utility, RutilT. This is more than just a script, it's a full application, and may be useful if the Network Wizard fails, especially at the last point of setup; acquiring an IP address.
But RutilT supports WPA encryption ONLY with Ralink wifi drivers (for which RutilT was originally written) and even then, only the basic WPA/PSK-TKIP variant.
Edited_times_total
Further reading
HowToWifiFromCommandWPA PART 2 WPA encryptionPART 3: WPA encryption with Ralink devices (pre-Puppy 4.1 ONLY)
Related Webapages
How to configure wifi from the commandline threadCategories
CategoryTutorialCategoryNetworking