PeasyWiFi - a reliable WiFi connection manager

Post Reply
Message
Author
Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#101 Post by Ibidem »

I'd like to mention a potential problem for wireless managers that I've seen on occasion. (So far, the only tools I've found that get this right are the Debian networking scripts and a set of scripts I wrote.)
The problem only affects some out-of-tree drivers in areas with very marginal signal strength (I saw it with madwifi; also, ISTR seeing it with the out-of-tree Realtek 8192se driver.)
If the DHCP client is started before the connection completes, it can result in a kernel panic.

The way to avoid this is to use wpa_cli, as described here:
http://www.murga-linux.com/puppy/viewto ... a928a786e5
A simple implementation is part of https://github.com/idunham/wpanet; you can find it at sbin/wpa_dhcp

However, the approach I took is extremely simplistic; you will probably want a much lengthier script if you use that approach.

gcmartin

#102 Post by gcmartin »

Randy or whatever your name wrote:...incessant wheedling...
You requested we test and provide feedback. I didnt!

Dont worry, I wont ever contribute anything for your consideration again.

From one fellow countryman to another.

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#103 Post by Scooby »

I had a look.

Since I'm on alphaos I have to tweak peasywifi to work.

I am not done but I have a question.

When you set a wifi connection to auto-start does peasywifi automatically disable
default auto-start of ethernet?

Or is the flow to

1. Go to ethernet tab and choose mode: disable --> push Configure
2. Go to Auto tab, turn on autostart for a wifi profile

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#104 Post by rcrsn51 »

Scooby wrote:When you set a wifi connection to auto-start does peasywifi automatically disable
default auto-start of ethernet?
No. PWF doesn't make that kind of decision for you. There are two scenarios.

1. Leave eth0 enabled. If the Ethernet cable is disconnected, it will silently fail. Meanwhile, your auto wifi connection will occur.

2. Explicitly disable eth0 and auto-connect the wifi. Of course, you will need to remember to reconnect eth0 the next time you plug back in to Ethernet!

In my tests, there is no speed penalty to using #1.

labbe5
Posts: 2159
Joined: Wed 13 Nov 2013, 14:26
Location: Canada

comment about PeasyWifi

#105 Post by labbe5 »

Hi,


I would like to thank you for sharing this app with Puppy users. Finally, i can use my preffered Puppy online, without being frequently interrupted, the connexion now is stable, and i can dowload stuff, knowing the downloads will be completed in due time.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#106 Post by rcrsn51 »

Glad to help.

What kind of WiFi adapter are you using and what driver? Click the Status button to see the kernel module.

Pelo

Peasy wifi no neeed to create a profile

#107 Post by Pelo »

PeasyWifi no need to create a profile : no, i confirm
The only security is the password. Nice or dangerous, both.
connect during boot process
Last edited by Pelo on Tue 09 Dec 2014, 01:40, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#108 Post by rcrsn51 »

There are two ways to secure the passphrase in a profile.

1. Use the Encrypt tool.

2. Make the passphrase "always-ask".

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#109 Post by James186282 »

Bravo! Neat sounding routine. Faster IS better. I enjoy showing people my "ancient" laptop and having it boot up in puppy and be ready to go in seconds.

I have a bit of an odd connection. Currently I use Wireless for the internet connections and wired eithernet for printing. The computers and the laserjet all tie into a switch. On the Linux (Puppy of course) boxes I have a batch script in STARTUP directory that just
ifconfig eth0 192.0.0.191

*Note The printer is 192.0.0.192
Other computers have unique addresses (Not all 192.0.0.191)
Everything works fine. That said, Wifi connections always seem to take a long time so I made up a really short and simple script for my own sanity. Plus I don't change what AP I connect to in the house.
Would your creation be able to assign a specific ip to eth0 and do wireless in the usual fashion?
I like the encrypted passwords. I have a laptop with a long list of clear text passwords so it would be nice to do some form of encryption.

rcrsn51 wrote:PWF v2.8 has several changes.

a. Faster auto-connection at bootup. (Some unnecessary sleeps were removed.)
b. Bugfixes for ndiswrapper.
c. Optional support for configuring Ethernet ports. See below.

The WiFi profile folder is now /etc/pwf/wifi. If you have some WiFi profiles elsewhere, move them here. Delete your current /root/.peasywifi configuration file and restart PWF.

-------------------------

PWF can now manage both your wired Ethernet ports and WiFi. This is an OPTIONAL feature that makes PWF a basic replacement for other Puppy network managers.

1. Open the folder /etc/rc.d. Rename the file rc.network as rc.network.wiz. Rename rc.network.pwf as rc.network.

2. Open the file /usr/local/bin/defaultconnect. Set it to "exec connectwizard"

3. Reboot. By default, PWF will connect to eth0 using DHCP.

Run PWF and open the new Ethernet tab. Use it to configure your Ethernet ports - enable, disable, DHCP, static.

Ethernet connections are made at bootup.

For example, suppose that your built-in port has died and you replace it with a USB-Ethernet adapter. Just disable eth0 and enable eth1 with DHCP. Click the Check button to see the Ethernet profiles in /etc/pwf/ethernet.
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#110 Post by rcrsn51 »

James186282 wrote:Would your creation be able to assign a specific ip to eth0
Yes. It would also do some other things like set up a gateway route to the Internet. These would fail, but I don't think that it would cause a problem.
and do wireless in the usual fashion?
That would depend on your wireless connection script. But PWF just imitates what most users would do manually.

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#111 Post by James186282 »

It worked great on wifi. I'm using the kernel module iwl3945 on a IBM T60 thinkpad. Lucid 5.2.8-005 Also note that wpa works fine. The ability to easily dial down the sleep time is very nice. It seems like there ought to be someway to do away with sleep but how?

My quick attempt to set up eth0 with PeasyWifi v3 to 190.0.0.190 didn't work. Its probably an operator error. eth0 doesn't appear when I ifconfig after booting up with peasyWiFi in control..

The /etc/pwf/ethernet file was tried in static mode with an ip of 190.0.0.190 along with a 255.255.255.0 netmask and gateway 0.0.0.0
Also just the IP and netmask
and last with just the IP No joy.

For what its worth when I set up my private wired connection with a bash script in the start directory its simply
ifconfig eth0 190.0.0.190
This turns eth0 into the range that lets me communicate with the HPLaserjet4 (Another old but great printer) The default ip for the Laser is 190.0.0.192

After I manually config eth0 the result in iwconfig is
inet addr:192.0.0.190 Bcast 192.0.0.255 Mask 255.255.255.0

I hope some of this is useful! If you ever come to Minneapolis get in touch I'll buy you a beer! - J
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#112 Post by rcrsn51 »

My quick attempt to set up eth0 with PeasyWifi v3 to 190.0.0.190 didn't work.
Did you perform these steps from the instructions?
1. Open the folder /etc/rc.d. Rename the file rc.network as rc.network.wiz. Rename rc.network.pwf as rc.network.

2. Open the file /usr/local/bin/defaultconnect. Set it to "exec connectwizard"

3. Reboot. By default, PWF will connect to eth0 using DHCP.

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#113 Post by James186282 »

No, I skipped over that when I was reading the thread.

I set up PeasyWiFi on my other work machine a generic Gateway box (I can look up the details if you wish) I didn't see the .pwf file so I copied the one from my laptop (That I used earlier)

I decided to give Puppy Raring 3.9.9.2 a try so I could kill two birds with one stone and see if the newer Kernel came pre-made to work with the AE3000 WiFi USB thingie. *It doesn't so far.

PeasyWiFi works 100%. Very mighty fine! Following the steps you repeated (Sorry about that) made my private ethernet connection to my laser printer work fine and I'm one giant smile right now.
The eth0.static file is simply
IP=192.0.0.199 *Note it also worked with 190
NETMASK=255.255.255.0
GATEWAY=

iwconfig is of course reporting all is well. Pinging and printing the laserprinter and the laptop is all working.

One thing to report that works different from before (Maybe not PeasyWiFI but the kernel?) is that my WiFi card that never worked with WPA before suddenly does! Its an old WG311 Ver3 PCI card. It only works with ndiswrapper. It takes a little while to connect encrypted with WAP but its wicked fast(er) on an open connection. Like a couple seconds max. Whatever you did there keep doing that. Very nice indeed.

So, my driver project has moved off the front burner. I still would like to get off the 2.4 GHZ band. Its amazing how many signals are clobbering me. I've had to run two routers to keep solid connections from one end of the house to the other.
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#114 Post by James186282 »

Sorry my reporting is bad. I'm getting old I guess. PeasyWiFi on the Gateway works perfectly. I took my start script out. Checked the .static file and shut everything totally off and on. It comes up fine on eth0 and wlan0 as it just as it should. The big bonus is it works on WAP - thanks for fixing the ndiswrapper bugs.

Clearly I've got something goomed up on my laptop. The Airforce would report it as "Short Circuit Between the headphones" on my part. I'll recheck things tomorrow morning and report back. I'm confident it works fine on the Laptop.
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#115 Post by rcrsn51 »

Thank you for doing this testing.

Regarding ndiswrapper, PWF doesn't do anything special or fix any problems. If the Windows driver is installed properly and the wlan0 interface comes up, PWF can connect to it with WPA just like with any other device.

However, that assumes that the device actually supports WPA. Many old ones do not.

I don't know why the other connection managers would have a problem with this.
I didn't see the .pwf file so I copied the one from my laptop (That I used earlier)
I don't understand that. The file is automatically installed as part of the PET.

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#116 Post by James186282 »

I wanted to be sure that I reported this correctly. I ran a CD Distro in ram of raring 3999 and
I tried connecting with sns. As before it connects to open networks ok but not with wap. I clicked your pet, ran peasywifi It now works with wap. Maybe there is a different timeout? I have a machine thats fairly fast but my ancient wifi card might need (like me) to be slowly spoon fed?

I use ndswrapper btw
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#117 Post by James186282 »

Precise 5.7.1 Tried dougals WiFi setter upper. wpa does not work.
*Which has always been my problem.

Now then - same system installed PeasyWiFi. Followed the instructions renaming files and editing connectwizard. I set up the config file to work with my router using wpa crypto. It takes a while but it works! Honest. I've never thought this card was capable of wpa but it works with your program. For my wired printer connection (eth0) I tried the static address, mask, *no Gateway or DNS. When I "checked file" it shows a file. When I open it, its empty. In a previous experiment (Sorry didn't take notes) I failed to change default connect and eth0 was set correctly. Here is whats in my defaultconnect file

#!/bin/sh
exec connectwizard "$@"

Your really nailing it with wap. Whatever you did you need to take a bow.

If you need someone to break things (or screw up simple instructions) you know who to call.
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#118 Post by rcrsn51 »

If you want eth0 to be a static interface, make sure that you select "static" in the Mode box. When you click Check, you should see a file named eth0.static containing your configuration details.

If you select DHCP in the Mode box, you get an empty file named eth0.dhcp. That's because all the setup is done by the dhcpcd program that is run by rc.network when you boot.

In your case, dhcpcd will fail because your network has no upstream DHCP server to give eth0 an IP address. So it's crucial that you have a properly constructed eth0.static file.

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#119 Post by James186282 »

Thats no doubt what happened (Not clicking static) I wonder if you have a solution to a problem I'm having setting up a relatives computer. She lives in an apartment complex that has routers everywhere with the same ssid. Is there some way to select a specific one (The closest and strongest) signal and not let it just connect to a random one?

She would like me to relay her thanks for peasyWiFi. Her laptop was having great difficulty connecting and I installed your routine and restarted it a dozen times and it worked perfectly. Oh... I should have taken notes but it was a fairly new Toshiba laptop. I set up a CD booting a frugal install of precise 5.7..1 on her machine.

My wife has similar complaints about connections randomly not working (And this is a laptop thats in the same location assigned to the same ap) So... You can guess the solution to that.

Just a couple personal observations. I like the help button. I think having this checklist first do this then do that is brilliant. I also really like the fact that the configuration files peasywifi is writing / reading are explicitly shown. I dislike having mystery files in hidden directories that make trouble shooting such a giganto pain. Anything that pulls the curtain aside so I can see what the great OZ is doing is a plus.

I'm puzzled. What is the J 15 option about? Are there any other options of interest?
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#120 Post by rcrsn51 »

Thank you. Your reports have been extremely helpful.
James186282 wrote:I wonder if you have a solution to a problem I'm having setting up a relatives computer. She lives in an apartment complex that has routers everywhere with the same ssid. Is there some way to select a specific one (The closest and strongest) signal and not let it just connect to a random one?
This situation falls under the category of "roaming". Based on very limited testing, it looked to me like wpa_supplicant and/or my wifi adapter was smart enough to pick the cell with the strongest signal. In your relative's situation, that may not be true.

So here is something to try. (updated to v3.2)

1. Create a profile as usual. Do NOT include a bssid line as was done in v3.1.
2. Open the Connect screen. Select the profile and check the new "Show all cells" box.
3. Click Connect. PWF will display a list of cells for that SSID with their hardware addresses and signal quality.
4. Pick a cell and click Select.

[Edit] It might be nice to have the list sorted by signal quality. If anyone wants this feature, please ask.

To permanently lock a profile into one cell, manually add a line as follows:

Code: Select all

ssid="abcde"
bssid=11:22:33:44:55:66
--------------------------------
Anything that pulls the curtain aside so I can see what the great OZ is doing is a plus.
This is the whole purpose of PWF. I could never understand why the other connection managers have trouble doing something that is a pretty basic procedure.
I'm puzzled. What is the J 15 option about? Are there any other options of interest?
Here is something that most Puppy users don't realize. As part of Frisbee development, the dhcpcd program was modified to make Frisbee work better in certain situations. This is the "-J" option. So even if you are not using Frisbee, you still have to use the modified dhcpcd. During early development of PWF, it looked like some users still needed -J. So PWF passes it over to dhcpcd through the OPTION variable.

In fact, there are two ways to avoid this situation.

1. Set up PWF with a static IP address, which takes dhcpcd out of the equation. This has been confirmed to work very well.

2. Use a standard, un-frisbee-ed version of dhcpcd. I had a situation with a Pupplet where Frisbee was the default connection manager. The only way I could switch it to PWF was by replacing dhcpcd.
Last edited by rcrsn51 on Tue 28 Oct 2014, 12:39, edited 6 times in total.

Post Reply