Autoconnect 0.5

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

Autoconnect 0.5

#1 Post by urban soul »

Hello Puppians,

here is a little utility that I wrote to connect automatically to your WLAN(S). You need to create a profile with the network wizard for each WLAN first. Please use the scan button to add also the AP_MAC info to your profile-config.
The main task of connecting is carried out by the WAG functions library [so credits go there]. Well documentet, perfectly organized - fun to use. Great stuff guys [you know who you are...] Thanks Rarsa, Dougal and of course Barry.

Code: Select all

Usage:
click on .pet
Menu -> Network -> autoconnect WLAN Util

tested in Puppy 3.02alpha1, 2.14R, 3.96alpha6 and some others.

This mimics BTW the default behaviour of Mac OS X. For a changelog see below.
"To uninstall use the petget package manager".

urban

TODO:
====

- hotplug action [may be integrated in HotPup daemon one day...]
- improve profile-management
- shrink xpm sizes.
Attachments
autoconnect-0.5.pet
one-click solution to get onto the internet via wireless lan
(14.65 KiB) Downloaded 2317 times
Last edited by urban soul on Sun 27 Apr 2008, 12:38, edited 14 times in total.

wingruntled

#2 Post by wingruntled »

Beware of strangers bearing gifts!

User avatar
fudgy
Posts: 86
Joined: Wed 07 Jun 2006, 09:40
Location: Berlin, Germany

#3 Post by fudgy »

Hi wini :D your welcome.

I'm not a stranger to PUPPY at all.

User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

#4 Post by urban soul »

I just changed my nickname (formerly known as fudgy - joined 06/2006) because now it contains a part of my real name (which is urban FYI).
I thought it was time to give something back to the community. If it is no use for you - i dont mind. Have a look at the code - it's a few lines only.

BTW I found a bug in the network wizard in wag-profiles.sh in the function loadProfileData() :

Code: Select all

line 671 should read 
"PROFILE_DATA=`grep -A 11 ... "
instead of
"PROFILE_DATA=`grep -A 10 ... "
This prevents the AP_MAC variable from beeing stored correctly.
I have a bugfixed version, but if you consider this as 'gift from strangers'... Dougal may already know about it

urban
-----------
signature here should tell about the change-nickname-thing

User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

#5 Post by urban soul »

Version 0.2:

Now creates a optional script in /etc/WAG/autoconnect/ .
This is a fallback strategy: That script is only used when edited by the user.
The idea behind is - experience shows that not all devices and drivers can be handled perfectly by a wizard.

One has to mention, however, the PUPPY network wizard is one of the most reliable and successful tools out there.

Version 0.3:

Now handles priorities.
Gives feedback about connection: Name, Quality, IP.
Turn off radio
Nice background colours

At this time no GUI is available to change priority. The lower the TITLE# in /etc/WAG/profile-conf the higher the priority.

urban

todo next: disable scanning of open networks (make optional) ;; you can comment out the 'connect to open networks block' in ./autoconnect.sh if you find this (feature) disturbing

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#6 Post by JustGreg »

Thanks Urban Soul for the new network application. I have tried it with my home WIFI network using WPA2 protocol. I can connect to the network with both the network wizard and a script of Tempestous for WPA2 using wpa_supplicant. Your application seems to connect but dhcpcd seems to fail
I have edited /etc/WAG/profile-config (both autoconnect and home profiles) to add the MAC value and PSK value. So all the information is there, but, still no connection.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

#7 Post by urban soul »

Hi Greg,
you can paste the working script into /etc/WAG/autoconnect/$YOUR-WLAN.sh and make sure to edit the line:

Code: Select all

useScript=yes
If you do not have such a file - this is valuable information too.

If the network wizard sucseeds in using the profile, this script should do so too. It uses literally the same functions. You should not edit profile-config because it is re-created by the network wizard each time you add a new profile. I am wondering why you had to add your PSK key by hand ?! If it wasn't there something went wrong before.

Can you please provide me with the following file:
/tmp/wpa_status.txt -> after running autoconnect (must be "completed")

Please tell me also your Puppy version and make sure you use autoconnect v.0.3 2008-03-22 or higher.

Urban

PS. If you upgraded your net-setup files, it can corrupt old profiles (because a different line count is used there). But adding new lines to every profile wont do any harm for sure. I do not recommend upgrading net-setup anymore. The AP_MAC variable is helpful, but not needed - and regular users should not have to care about those internal file handling issues.
Last edited by urban soul on Mon 31 Mar 2008, 16:31, edited 3 times in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#8 Post by Lobster »

All gifts welcome. All strangers welcome (especially with gifts).

Friends without gifts welcome too. :oops:
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

#9 Post by urban soul »

@Lobster: always have to smile when reading your .... reply.

Version 0.4:

Retry three times for better scan results.
Disable scanning for open networks via commandline argument:

Code: Select all

scan_open_networks=no
To do so please edit /usr/local/autoconnect/run-ac.sh (defaults to 'yes').

Version 0.4.1:

-Display Version statement correctly. Little Bugfix in ac_status ( thx to HairyWill ).

Version 0.5:

-Grafic (gtk) Installer / Uninstaller: Run ./usr/local/autoconnect/AC_service.sh at any time to modify your installation options.
-Very quick scan now
-Context sensitive JWM menu (see screen).

Please test the JWM option. This it not a tray app and no processes are left running. 0% CPU cost. Tested in Puppy 3.02alpha1, 2.14R and 3.96alpha6...

You do not need to uninstall previous versions to upgrade. Backups of .jwm-tray and jwm-personal have the extension $date-$time

Urban

todo next:

- look at profile management. Add sorting there. Include somehow IP config in network profiles to have an option for static IP. Join Pwireless and net-setup-profiles. Gui enhancements there.
- adopt for IceWM
Attachments
AC_screen.png
hint: click on any wlan to open the network profile management.(Here: simplified version I am working on)
(68.95 KiB) Downloaded 4268 times
Last edited by urban soul on Tue 29 Apr 2008, 20:43, edited 1 time in total.

User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

#10 Post by urban soul »

download is in the first first post...
Attachments
AC_service.png
modify setup: if unchecked, previously installed option will be uninstalled.
(52.08 KiB) Downloaded 3717 times
Last edited by urban soul on Sun 27 Apr 2008, 12:46, edited 1 time in total.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#11 Post by HairyWill »

Looks good.
Restarting jwm just to refresh the menu seems fairly heavy handed. I appreciate that there is no straight forward other way of doing it. Another solution might be to write a small gtk app for the menu. Your jwm method has the advantage that it is nicely tied in with the jwm theme.

My personal preference would be for the button to appear to the left of the clock.

bug
The comments you insert into the jwm files have the wrong format for comments it should be <!-- not <--!
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

#12 Post by urban soul »

HairyWill wrote:Looks good.
Restarting jwm just to refresh the menu seems fairly heavy handed. I appreciate that there is no straight forward other way of doing it. Another solution might be to write a small gtk app for the menu.
Yes, you are certainly right. This is what I think, too. JWM is only restartet by user request, however. (User has to push 'refresh'). But certain things might happen with JWM... I know. For me, restarting jwm doesn't cause problems at the moment.
HairyWill wrote:My personal preference would be for the button to appear to the left of the clock.
There was a problem with the positioning, so temporily it is there. It can be fixed by inserting the 'button' in .jwmrc but I don't know who else is writing to that file so I prefered jwm-personal.
HairyWill wrote:The comments you insert into the jwm files have the wrong format for comments it should be <!-- not <--!
Thank you for that one! I was wondering why JWM complains about these comments. Fixed.

Urban

User avatar
FrogLeader
Posts: 7
Joined: Mon 08 Dec 2008, 00:48
Location: Pacific NW, USA

Wireless Utility

#13 Post by FrogLeader »

Urban,

This sounds like what I have been looking for. I have an Acer Aspire 7720 and since Puppy 4.1 it will not autoconnect after a reboot. Each time I start up I have to run the Network Wizard every time.

I'll let you know if it works. Thanks for writing this.

Anyone else know of this problem?

FrogLeader

User avatar
urban soul
Posts: 273
Joined: Wed 05 Mar 2008, 17:03
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson
Contact:

#14 Post by urban soul »

Autoconnect filled a little gap in the 2.xx and 3.xx series puppies. 4.xx has a new network wizard, which incorporates this feature. Moreover, 4.xx uses a new database format for the profiles.

This is the right thread for 4.xx users who want to autoconnect:

http://www.murga-linux.com/puppy/viewtopic.php?t=31522

I don't use 4.xx so I can't tell any details.
Urban

User avatar
FrogLeader
Posts: 7
Joined: Mon 08 Dec 2008, 00:48
Location: Pacific NW, USA

Wireless Utility

#15 Post by FrogLeader »

Thanks Urban,

I didn't realise the date on this post. Thanks for the link to the right thread. I've been hiding in the background for over a year, and finally have enough know how to start uploading some pets I have made and some howto's so be watching for those. It is pretty cool that the developers here are so kind and respond in such a timely manner. Good luck.

FrogLeader

Pelo

feedback if my wireless connection is stable or not.

#16 Post by Pelo »

And if autoconnect would be useful too for users in 2015 ? Sure I hold PeasyWifi and Frisbee in my tool box. But Pwireless is defaut network in This old but nice Dpup 487, Puppy that i like very much to keep out my cellar.
I install the pet and give you feedback if my wireless connection is stable or not.
Attachments
shot.png
Nice Puppy, isn't it ?
(30.7 KiB) Downloaded 102 times

Pelo

wireless card not found , bah !

#17 Post by Pelo »

Echec :( wireless card not found , bah !
PeasyWiFi will do it. If Pwireless does not disturb everybody... :twisted:

Post Reply