Possible FIX for WPA in Network Wizard

Please post any bugs you have found
Post Reply
Message
Author
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

Possible FIX for WPA in Network Wizard

#1 Post by Pizzasgood »

I'm sick and tired of people complaining about how the wizard doesn't work with WPA, so today I stole my mom's wifi card and router and spent the afternoon trying to fix things.

Well, as far as I can tell it boils down to the wpa_cli reconfigure line (953 on the attached script). I commented that out and everything worked. As far as I can tell, that line shouldn't be needed, since wpa_supplicant is killed in the next line, then restarted later. Aside from which, any time I use the command, it screws up wpa_supplicant, which then refuses to work properly again until I bring down the network interface and unload the driver.

I'm using Puppy 3.01, with a wpc54gs v2 pmcia card using ndiswrapper, connecting to a WPA-TKIP network, in case any of that's relevant.


EDIT: My original instructions mentioned uncommenting the killWpaSupplicant in the useWpaSupplicant function that was right above the first call to wpa_supplicant. Turns out that was wrong. I don't know why it worked at the time, but when I went back to test it better it failed every time. I've corrected the instructions to avoid confusion.
Attachments
wag-profiles.sh.gz
/usr/sbin/wag-profiles.sh
commented out line 953
(9.09 KiB) Downloaded 1930 times
Last edited by Pizzasgood on Wed 02 Jan 2008, 09:46, edited 3 times in total.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

setecio
Posts: 326
Joined: Wed 01 Nov 2006, 12:09
Location: UK

#2 Post by setecio »

I've had it not work for me, however I concluded that it was the order of what and how I clicked things during the process.

Load the module, save, click on it, click wireless

then click WPA/TKIP first and then fill everything in, save, use this profile

auto dhcp or static
yes to save for next boot
Done

I found if I didn't click on WPA/TKIP first and then fill in the correct SSID and passphrase then it wouldn't work.

One thing I couldn't see was any indication of which you had selected ... it would be nice if the WPA/TKIP button became a different colour once you had selected it to show this is what is being used. I have forgotten to click anything several times and it, obviously with afterthought, doesn't work. It did occur to me that this might be a potential reason for it not working, as there is no easy way to see if the type (WEP, WPA/TKIP, WPA2) has been clicked.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#3 Post by Pizzasgood »

I tried it again today, but now it wouldn't work. Turns out I shouldn't have uncommented line 947. I don't know why it was working yesterday. I should have rebooted into pfix=ram and tried it again, but I was lazy.

So I started over with the original file, and this time the only change I made was commenting out that wpa_cli reconfigure line. This time, I tested it multiple times in pristine installs. Worked flawlessly. I tried the original and the version I uploaded yesterday for comparison, and neither worked at all.

I've updated the attachment in the first post.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

#4 Post by davids45 »

G'day,
May be you would like to look through the wizard lines and see if it is possible to remove via the wizard an automatically selected but incorrect wifi driver?
I have a RALINK 2500 wifi usb and a WPA set-up. The latest wizard (2.17, 3.01) preloads the rt2570 usb driver then tells me it doesn't work with WPA. Which is really not much use to me and the wizard has no way for the user to remove this useless default driver.
Switching to use ndiswrapper (and wpa_supplicant) is troublesome because of this pre-loaded rt2570 driver. I have rmmoded the rt2570 in rc.c local with some success but can't always get ndiswrapper to run on boot-up.
David S.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#5 Post by Pizzasgood »

Yeah, one of those would be nice. I'll see what I can do, but I can't make any guarantees as far as time-frames go. I've spent most of my break working, so I want to relax a little now before school starts (Monday).
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

observerfrommars
Posts: 2
Joined: Sun 13 Jan 2008, 05:06

#6 Post by observerfrommars »

Hi, totally new to linux so I have very little idea of what I'm doing. I've managed to get the Linksys WPC54GS ver. 2 working when I turn off WPA security using the bcm43xx driver. However, when I turn WPA back on I'm unable to connect--I get "unable to establish WPA connection". I see per your instructions that the wpa_cli reconfigure line should be commented out, but since I'm totally new to this I'm not sure exactly how to go about doing this. If you could describe this process step-by-step I would be hugely appreciative.
Cheers!

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#7 Post by Dougal »

observerfrommars wrote:If you could describe this process step-by-step I would be hugely appreciative.
Open Geany (text editor), then open the file /usr/sbin/wag_profiles.sh, then find the correct line (goto-line 953) and add a "#" at the left end, then save and exit.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#8 Post by Pizzasgood »

Well, it's line 953 on the script I uploaded. Might be a little different on the original. I had originally added a bunch of debugging stuff to figure out where the problem was. I removed all that, but there could be extra whitespace lines. I also added a tag or two at the top to log the changes. So the line will be around 953, but probably not exactly that.

Or you could just download the one I uploaded, decompress it, and put it in /usr/sbin (overwriting the original, though maybe you should back that up first).
gunzip wag-profiles.sh.gz
^--- that decompresses it
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

BlueScreenBetty
Posts: 9
Joined: Mon 07 Jan 2008, 01:52

#9 Post by BlueScreenBetty »

Thanks! That did the trick.

BlueScreenBetty
Posts: 9
Joined: Mon 07 Jan 2008, 01:52

#10 Post by BlueScreenBetty »

Well-I got it to work once. After reboot I had trouble reconnecting to my home network though. Tried loading the saved profile, and also tried manually entering the data again-struck out.

observerfrommars
Posts: 2
Joined: Sun 13 Jan 2008, 05:06

#11 Post by observerfrommars »

Hi, just wanted to say thanks for the help. I've been fiddling around and have now tried several clean installs of Puppy, tried commenting out the line mentioned above, etc., but I can't get it to recognize my network at all, much less connect with WPA on. The driver seems to be ok, ie Puppy tells me there's an eth0 interface, but where previously it used to at least see my neighbor's open network it now doesn't even recognize that. I'll keep playing around but any suggestions would be appreciated.

User avatar
prehistoric
Posts: 1744
Joined: Tue 23 Oct 2007, 17:34

profile?

#12 Post by prehistoric »

This sounds like you're looking for an open network with a profile set for WPA. Try loading the "automatic" profile.

MostlyHarmless
Posts: 1
Joined: Tue 13 May 2008, 02:15

Doesn't seem to be working in Puppy 4.0

#13 Post by MostlyHarmless »

I was reading that this has been fixed in Puppy 4.0, but that doesn't seem to be the case. I have a Linksys WPC54G ver 2 on a IBM T20 laptop with Puppy 4.0. No go with WPA.

jake_take
Posts: 16
Joined: Mon 09 Jun 2008, 06:11
Location: Japan

#14 Post by jake_take »

Delete the line "ap_scan=2" in /etc/wpa_supplicant.conf.
Further the "Network Wizard" seems to be buggy, so please use the console with the following commands.

Code: Select all

# ifconfig wlan0 up
# /usr/sbin/wpa_connect.sh wlan0 wext
# dhcpcd wlan0
If you succeed in WPA, you can make a script using the above codes.
Last edited by jake_take on Mon 09 Jun 2008, 06:42, edited 1 time in total.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#15 Post by tempestuous »

jake_take,
yes, the Network Wizard is buggy, but your solution is not universally correct.
- the "ap_scan" value is important with some routers.
- "wlan0" is not the correct interface name for all wifi drivers.
- "wext" is not the correct wpa_supplicant driver parameter with all wifi drivers.

A thorough explanation of wpa_supplicant usage is in "PART 2: WPA encryption" of "How to configure wifi from the commandline"
http://www.murga-linux.com/puppy/viewto ... 336#159336

setecio
Posts: 326
Joined: Wed 01 Nov 2006, 12:09
Location: UK

#16 Post by setecio »

tempestuous wrote:jake_take,
yes, the Network Wizard is buggy
Is the network wizard only buggy in Puppy 4 because WPA worked flawlessly for me in Puppy 3 using a Netgear WG511T (atheros chipset) , it configured first time and stored its settings and work automatically on every boot.

I'm now sad that it doesn't work in 4 and am just asking if it is known that the network wizard is buggy in 4 specifically as I'm hoping to have it work like it was in 3 again.

Post Reply