Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy home page: puppylinux.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 09 Feb 2010, 10:28
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How I Got WPA To Work WIth Puppy 2.11&2.12 on My Laptops
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
AAD

Joined: 23 Nov 2006
Posts: 3

PostPosted: Thu 23 Nov 2006, 00:46    Post_subject:  How I Got WPA To Work WIth Puppy 2.11&2.12 on My Laptops  

How I Got WPA Encrytion Working. I tested over several days and this works. I am a Puppy Linux Noob. While this proved to be chanllenging but the outcome(working WPA encrytpion) were well worth the trouble. I had to search for and piece together several pieces of information scattered on the net to make this work. I don't know if all these steps were necessary, but decided to include them all as this is what I found worked. Hopefully, others will find this useful.

Connection: Extreme High Speed Cable
Router: D-Link Airplus Extreme G with latest Firmware update(s).
Computer: Hewlett Packard zv5000 Pentium 4 HT single processor 3 GHZ, with NetGear 54G+ Wireless WG511T PCMCIA Adapter, running Puppy 2.12 Also, these instructions were also tested with IBM T22 Laptop, pentium 3 processor 900 GHZ with AirPlus XTreme DWL-G650 running Puppy 2.11.

Step 1: Download the following packages
wifi-1.0.4-beta-2.pup from http://dotpups.de/dotpups/Wifi/
wpa_supplicant-0.5.5.pup wpa_supplicant_README.txt(contains important information) from http://dotpups.de/dotpups/Wifi/wireless-utilities/
Install.

Step 2: Run Wireless Network Wizard From Setup. This will bring up the Wirelesswizard: Welcome box. Click on the bottom tab titled "Setup_ndiswrapper" and follow the step by step instructions listed. This step is necessary to ensure that you have the proper drivers installed. When you click on Wag, you will notice Wlan0 this is your wireless network. Don't worry if you see a lot of blank information at this time. Much of this will show as fully complete once you follow the steps outlined below.

Step 3: Run Ethernet/Network Wizard from setup. You will see the wlan0 interface tab below the eth0 interface tab. Click on the wlan0 interface. The Puppy_Network_Setup box will pop up. Click on the first tab titled "wireless" Another Puppy_Network_Setup box will pop up. On the left side under "Select Profile" Click on the "New Profile" Tab. Now under the Edit Wireless Profile parameters. Fill in the blanks. Name: name you are giving profile, Essid: name of your essid, Mode managed, Key: You can enter your WPA key or leave this blank as the key will automatically be set via WPA Supplicant.conf file, Network ID: I left blank, Frequency: I set it to 2.473G, Channel: whichever channel you have assigned through your router, and Access Point Mac: The Mac Address of Your Router(usually found on the bottom of your router) Now click save tab on bottom. The Profile you named should now show up on the left side. Click on it and click on "Use This Profile" Tab on the bottom. Now close by clicking on the X top right corner. Don't worry about the other test tabs on the Conigure wlan0 box. This will automatically be configured with the next steps below. Close the box by clicking on the x(top right corner). Then exit out of the Puppy_Network_Setup box.

Step 4: Through PuppyRox File Manager go to etc and click on wpa_supplicant.conf file. Edit the file to reflect your unique settings. Here is what my file looks like minus my passphrase and essid. You may want to go here to get a supersecure passphrase to use in this file. https://www.grc.com/passwords.htm

# wpa_supplicant configuration file for
# WPA-PSK/TKIP

ctrl_interface=/var/run/wpa_supplicant

## To use a hidden SSID, uncomment the following line
ap_scan=1

network={
ssid="Name of my essid"
key_mgmt=WPA-PSK
proto=WPA
pairwise=CCMP TKIP
group=CCMP TKIP
psk="my wpa phassphrase/key"
}

Once you have entered the info, quit and allow new changes to be saved.

Step 5 create the following 3 Script files and copy them to your desktop. This will greatly simplify the process of starting, stopping, and safely restarting WPA encrytion.

Name the first Script File WPA_Connect, Open As Text and enter the following information, then save file as WPA-Connect.

#!/bin/sh

echo "Configuring Wireless LAN with WPA"
echo

## load your driver
modprobe ndiswrapper
## bring up the wireless interface, unconfigured
ifconfig wlan0 up
ifconfig eth0 down
## now start wpa_supplicant
## first remove stale wpa_supplicant file if it exists
if [ -e /var/run/wpa_supplicant/* ]; then rm /var/run/wpa_supplicant/*; fi
wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant.conf -dd
sleep 20
##wpa_supplicant -i wlan0 -D madwifi -c /etc/wpa_supplicant.conf -B(you may need to uncomment this depending on whether your card uses madwifi driver or not, I found I didn't need this command)
## for automatic IP
## first remove stale dhcpcd file if it exists
if [ -e /etc/dhcpc/*.pid ]; then rm /etc/dhcpc/*.pid; fi
wpa_cli -iwlan0 enable_network wlan0
##dhcpcd wlan0
dhcpcd -t 30 -h TheNameYouGaveToYourProfileWithYourSettings -d wlan0
## or for static IP
## modify /etc/resolv.conf to include your nameservers
#ifconfig ath0 192.168.0.xx broadcast 192.168.0.255 netmask 255.255.255.0
#route add default gw 192.168.0.1 ath0 # or whatever your router's IP is

Now create a Second Script File. I found that I needed to create this Script File with this duplicate command to ensure that a IP was assigned to my wireless. In theory, you shouldn't have to repeat this command in another script file as the command is including in the WPA_Connect Script File. The problem, is this did not work in practice for me and I was only able to solve the problem by creating a script file to assign a IP address. I named this file AssignIP2Wireless and this is what it contains.

dhcpcd -t 30 -h TheNameYouGaveToYourProfileWithYourSettings -d wlan0

Finally create a 3rd Script file also copied to your desktop. I named this file "Kill_Supplicant" This script file is important to shut down and restart WPA_Supplicant properly. These are the commands that you need to put in this file.

#!/bin/sh
killall wpa_supplicant
ifconfig wlan0 down
ifconfig eth0 up

Step 5: Now, to start the WPA wireless, click on the script files you created in the following order. WPA_Connect followed by AssignIP2Wireless.

Like I stated, not all these steps may be necessary, but I included all the steps that I found I had to go throught to make get WPA working with my laptops. The only problem that I found is that sometimes, if you leave your wireless connection on and unattended/inactive(usually 15-20 minutes), packet droppage will occur and the connection will time out and be lost. When this happens, simply click on the 3 script files in the following order. Kill_Supplicant, WPA_Connect, and AssignIP2Wireless and within 30-60 seconds, your wireless connection should be back up and running.

Although you can use distros like Suse 10/10.1 and Ubantu/kubantu that have a graphical WPA interface that makes setup much easier. I also have Suse 10.1 with WPA set up as part of a multiboot Suse, WinXp and Puppy system. I found that page refresh rates with Suse 10.1 tend to be slower with the internet connection wired/wireless and everthing takes longer to load(the connection just feels more sluggish), but with internet connection with Puppy 2.11 and 2.12 and this WPA setup, the internet connection rate appears much faster.
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 3651
Location: Australia

PostPosted: Thu 23 Nov 2006, 10:39    Post_subject: Re: How I Got WPA To Work WIth Puppy 2.11&2.12 on My Lap  

As the contributor of the wpa_supplicant dotpup, let me add to some points made here.
There's nothing particularly wrong ... there's just additional unnecessary steps, making the whole process seem more complex than it needs to be.

AAD wrote:
Download the following packages wifi-1.0.4-beta-2.pup from http://dotpups.de/dotpups/Wifi/

wifi-1.0.4-beta-2.pup is a package of Windows drivers for ndiswrapper. But wpa_supplicant supports many native Linux wifi drivers as well.

AAD wrote:
Click on the "New Profile" Tab

A profile is only needed for WEP (not WPA) setups where the "iwconfig" utility is used. wpa_supplicant will take care of all critical setup parameters, via its configuration file /etc/wpa_supplicant.conf.

Quote:
wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant.conf -dd

##wpa_supplicant -i wlan0 -D madwifi -c /etc/wpa_supplicant.conf -B

This is an "either/or" situation. "wext" is the wpa_supplicant generic driver interface, which works with ndiswrapper.
You would either use "wext" or "madwifi" (or any of the other supported driver interfaces) but never both.

Quote:
ifconfig eth0 down

This is unnecessary, and worse, will take down your wifi interface if its name is eth0, as is the case with the ipw2100/2200/3945 drivers.

Quote:
dhcpcd -t 30 -h TheNameYouGaveToYourProfileWithYourSettings -d wlan0

The "h" parameter is for your computer's hostname. As I mentioned earlier, there's no benefit in creating a profile.
Neither wpa_supplicant, nor dhcpcd will be able to reference any of the information contained in that profile.

To anyone who wants to get serious about WPA encryption, I recommend Ralink-based wifi adaptors. The Ralink Linux driver is the only one which natively supports WPA. wpa_supplicant is then unnecessary.
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 6335
Location: Arizona USA

PostPosted: Thu 23 Nov 2006, 13:23    Post_subject:  

Tempestuous, you say that using "ifconfig eth0 down" is unnecessary. Now that I can finally fool around with wireless, in Puppy 2.12, blinky shows three interfaces: ath0, wifi0 and eth0 (eth0 is a Zoom 5001 PCI card cable modem which Puppy thinks is an ethernet card.) Blinky shows both eth0 and ath0 active. How else besides "ifconfig eth0 down" can I turn off the cable modem so I know that Puppy is only using ath0 (or vice versa)? And what is wifi0?
_________________
OS
4.31 run from a multisession DVD+RW (burned with burniso2cd)
Hardware
Gigabyte GA-MA69GM-S2H mobo
2.5 GHz Athlon 64 X2 4800+ CPU
4GB RAM
(No HDD, no swap)
AOC 1440 x 900 19" LCD
ISP
1.5 Mb/s cable; Motorola SBG900 modem
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 3651
Location: Australia

PostPosted: Thu 23 Nov 2006, 14:17    Post_subject:  

Actually I was thinking about an ethernet interface which is not physically connected to a network. Such an interface would be active, but not configured, and would not be a problem.

But if you have a fully connected and configured ethernet interface, then you're probably right, it would be best to bring down this interface before establishing a wifi connection.
In theory it's possible to have multiple network interfaces on your computer, but managing such setups can be complex.

And I don't know much about Blinky because I use wifi on an older remastered version of Puppy (version 1.0.4).

"wifi0" is a quirk of the MADWiFi driver. It's a "virtual interface" or "placeholder" for the true interface, "ath0".
All commands you use should reference "ath0", not "wifi0".
Back to top
View user's profile Send_private_message 
AAD

Joined: 23 Nov 2006
Posts: 3

PostPosted: Thu 23 Nov 2006, 18:28    Post_subject:  

Thanks for the clarification Tempestuous. The information is useful in helping to further fine tune the process and I appreciate your feedback as it allows me to eliminate some unncessary steps. Like I said, one difficulty I experienced was finding a step by step guide to make WPA work with puppy linux. So I ended up piecing bits and pieces of information, most of what I found in the Puppy and Slax Linux forums and together to make WPA work. These steps worked and I suspected that there would be many unncessary steps, but wasn't sure which ones to eliminate without ending up with WPA not working. Hey, I am still a Linux NOOB and was only trying to post something that other Puppy Linux users struggling with WPA would find useful. It would be nice if the next version of Puppy could integrate a WPA GUI or integrate a set up for WPA that is as easy to configure as WEP.
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 6335
Location: Arizona USA

PostPosted: Thu 23 Nov 2006, 19:06    Post_subject:  

AAD wrote:
...Hey, I am still a Linux NOOB and was only trying to post something that other Puppy Linux users struggling with WPA would find useful...

Hey, that's what this forum is for. Make sure it works, then post it here while it's still fresh and hope it doesn't crash anyone's computer. Laughing
Back to top
View user's profile Send_private_message 
setecio

Joined: 01 Nov 2006
Posts: 326
Location: UK

PostPosted: Sun 18 Nov 2007, 17:07    Post_subject:  

Bookmarked for info.
Back to top
View user's profile Send_private_message 
skylarsutton

Joined: 19 Apr 2008
Posts: 5

PostPosted: Sat 19 Apr 2008, 23:31    Post_subject:  

Brilliant! Fixed my WPA problem with 3.01! THANKS!
Back to top
View user's profile Send_private_message Send_email 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
hot copy
[ Time: 0.5564s ][ Queries: 8 (0.2446s) ][ Debug on ]