Pwireless2 (Version 1.0)

Configuration wizards, scanners, remote desktop, etc.
Post Reply
Message
Author
User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

Pwireless2 (Version 1.0)

#1 Post by jemimah »

Wpa_supplicant is a network management daemon that runs in the background on your computer and connects you to wireless networks. It supports open networks, WEP networks, and WPA networks.

Puppy supports wpa_supplicant with the Network Wizard, but not in roaming mode. Roaming mode is a godsend for people with laptops who may need to reconfigure their wireless network several times a day. In roaming mode, you set up each network one time, and wpa_supplicant will automatically connect to it whenever you're in range. If multiple networks are in range, you can set priorities to tell wpa_supplicant which one you prefer.

Until now, the only way to configure wpa_supplicant roaming mode was by editing the configuration files by hand, or use wpa_gui (http://www.murga-linux.com/puppy/viewtopic.php?t=47838). Wpa_gui has a somewhat confusing interface and requires large Qt libraries, so I thought it was time someone wrote a lightweight GUI frontend that was specifically designed for and integrated into Puppy.

Pwireless2 looks much the same as the original Pwireless [well not so much any more] but the guts are totally replaced. Pwireless2 uses wpa_cli to communicate with wpa_supplicant. Wpa_supplicant handles profile storage, and all network configuration tasks. I've also included an upgraded version of Dhcpcd which handles allocating IP addresses and notifying you when the status of your network changes.

Finally, I've modified a program called gtrayicon to provide you with a very basic networking tray applet. Clicking on the applet will tell wpa_supplicant to start or stop (clicking it if you haven't configured any networks won't do much of anything). Right click and choose Configure to launch the Pwireless2 configuration gui.

Installing the pet below will place a script called "Pwireless2" in /etc/inid.d. The script handles the launching of wpa_supplicant and dhcpcd. Gtrayicon is launched from /root/Startup/gtrayicon.

Currently Pwireless2 doesn't have support for wpa-enterprise. If anyone desires this functionality, let me know and I'll think about adding it. Also let me know if you find any bugs.

It should also be noted that Pwireless2 conflicts with Network Manager. So you should remove any profiles from Network Manager before installing the pet. After installing the pet, you should reboot, and everything should start up automatically.

Here's the link for libgio needed to make gtrayicon work on Puppies older than 4.3 http://www.murga-linux.com/puppy/viewto ... h&id=21949

The ralink staging drivers (ie rt2860sta and similar) in kernel 2.6.30.5 do not work with Pwireless2. Please upgrade to 2.6.31.5 or newer.

EDIT: I've uploaded a new version with a bugfix for interfaces that are not named wlan0.
EDIT - 11-18-09: I've uploaded a new version with several enhancements and bugfixes. I've added tabs for logging and dns and increased the verbosity of the status. Also fixed a bug where dhcpcd would not update the resolv.conf. Attempted to make the startup script a little smarter.
EDIT - 11-18-09:Fixed a bug where long log files would break the GUI.
EDIT - 11-18-09:Fixed a bug with wpa2 and other minor enhancements
EDIT - 11-23-09:UI and backend enhancements
EDIT = 11-30-09:UI and backend enhancements
EDIT = 11-30-09:a quick bugfix for the reset-wpa script
Edit - 12-02-09 : bugfix for quit button and connection dialog
Edit - 12-03-09 : bugfix for 32bit WEP keys and SSID names and passwords containing spaces
Edit - 12-09-09: Improvements to the Gui
Edit - 1-03-10: Added Dhcp configuration tab, improvements to the gui, and bugfixes
Edit - 1-6-10: Patch to gtrayicon so it will work on Puppy 4.2 (you still need to install libgio)
Edit - 1-17-10 Moved some files around and make some changes to make Pwireless2 work better for repackaging for Quirky and other puplets. Minor gui improvements and bugfixes. Added 'nolink' dhcp option for flaky connections. Fix to start dhcpcd when no wireless interface is found. and fix for wpa_supplicant "failed to start" error (hopefully).
Edit - 2-10-10 - Nolink mode now the default, I'm using wpa_cli to monitor the connection and coordinate dhcp. Also the init.d script is fixed to shutdown properly.
6-22-10 Various updates synced from Puppeee version
Attachments
pwireless2.jpg
(43.92 KiB) Downloaded 18566 times
Last edited by jemimah on Wed 23 Jun 2010, 05:06, edited 21 times in total.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

Looks pretty good, especially the tray icon - where did you get that anyways?

One note: dhcpcd and wpa_supplicant are compiled to /usr/local instead of /usr ... can be fixed by compiling with --prefix=/usr (or by editing the makefile)
currently there is already a version of wpa_supplicant in /usr/sbin that will override /usr/local/sbin unless $PATH is modified

I already recompiled gtrayicon but can recompile it again with different default icons (png etc) if you tell me which ones should be default for activate/deactivate

Edit: posted new gtrayicon with patches... also patched it for optimization and to use existing icons as the default:
Deactivate = /usr/share/mini-icons/mini-rball.xpm
and
Activate = /usr/share/mini-icons/mini-gball.xpm
Attachments
gtrayicon-1.1-1-i486.pet
With patches applied
(5.96 KiB) Downloaded 2876 times
gtrayicon-1.1-i486.pet
deprecated version
(10.18 KiB) Downloaded 2564 times
Last edited by technosaurus on Thu 12 Nov 2009, 03:10, edited 1 time in total.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#3 Post by jemimah »

My intent was to have the old system versions of dhcpcd and wpa_supplicant be the default, to avoid breaking anything and make the package uninstallable. The 'networking' script calls the newer versions by the full path. I did build this pet the hodge-podge way and didn't bother rebuilding with /usr/local in the Makefile; does that break anything? Seems to run ok in my tests.....

You'll need the patch I made for gtrayicon. It allows you to change the state of the applet by sending a SIGALRM or SIGCONT. Otherwise, there's no way to communicate with it except clicking.

I stole the icons from the dhcpcd-ui applet, not sure if that's totally ok or not. [Edit: I discovered these are actuall Tango icons, so yes it is ok] I'd welcome any user-contributed iconset. I didn't compile them in; gtrayicon allows you to specify them on the command line when you start gtrayicon. You can see what they are by looking at the /root/Startup/networking script.
Attachments
gtrayicon.patch.gz
(484 Bytes) Downloaded 2400 times
Last edited by jemimah on Wed 06 Jan 2010, 06:47, edited 1 time in total.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

Ok I've patched the gtrayicon a bit - see previous post

set to use Puppy icons as default by changing:
#define DEFAULT_ACTIVATE_ICON "/usr/share/mini-icons/mini-gball.xpm"
#define DEFAULT_DEACTIVATE_ICON "/usr/share/mini-icons/mini-rball.xpm"

I also patched the Makefile for optimization
Attachments
Makefile.patch.gz
Feel free to change the optimization level CFLAGS - this is the best size/speed combo I have found
(424 Bytes) Downloaded 2367 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#5 Post by chrome307 »

I would love to try this but will wait for any further updates before installing - love what your doing guys! :)

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#6 Post by jemimah »

Chrome307, please don't be afraid to try it now. Technosaurus' updates are not bugfixes. I am waiting for user feedback to make improvements before I can roll out the next version.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#7 Post by chrome307 »

OK, I do have some concerns as you do mention it does conflict with 'Network Manager' which is what I am currently using.

From my understanding using this pet will override ( once rebooted ) and be a new network application.

If I do have any errors I would just like to know how I would repair/return back to the existing network manager.

BTW I am using BrowserLinux which is a stripped down version of Puppy 413 hence my concerns.

..... on the otherhand, nothing ventured nothing gained :)

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#8 Post by jemimah »

If Pwireless2 doesn't work for you, just uninstall the pet, and then add your profiles back into Network Wizard. Pwireless2 doesn't break Network Wizard, you just shouldn't try use them both at the same time.

If you just want to test it with no commitment, make a backup of your save file, then create a new clean save. When you are done testing, put the original save back, and you are back to normal. I haven't tested Pwireless2 on anything but 4.3.1 so let me know if it has a problem on other versions.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#9 Post by 8-bit »

I tried it with Puppy 431 on a laptop that I had set up to use ndiswrapper to load a windows driver for my USB Netgear WG111T wireless device.
I got a message of no network interfaces found.
So I must have been doing something wrong.
Laptop is Compaq Presario 450mhz 160megs ram internal wired (not connected) port and the external USB port the Netgear WIFI stick was connected to.

User avatar
technowomble
Posts: 74
Joined: Thu 11 Oct 2007, 17:04
Location: West Gloucestershire, UK

Pwireless 2 installed

#10 Post by technowomble »

I've just installed Pwireless2 on a new install of Puppy 4.2.1, all went smoothly except that I got a report of a missing dependency ( libgio-2.0.so.0 ) for the Ptray icon - ignore? - and I had to make the initial connection using Network Wizard. I've loaded my home wireless profile into Pwireless 2, presumably now I need to delete any copies of that profile in Network Wizard?

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#11 Post by jemimah »

There is a pet for libgio here: http://www.murga-linux.com/puppy/viewtopic.php?p=343318

The applet is not required for functionality, it's just a convenience.

You probably only need to delete profiles from Network Wizard if wpa_supplicant fails to start. You should get a dialog about this if it happens.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#12 Post by jemimah »

8-bit, what do you get if you type 'iwconfig' in the terminal? I have never used ndiswrapper so you'll have to help me out a little.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#13 Post by jemimah »

I did a little googling, and it turns out that if you're using ndiswrapper, you might need to add 'ndiswrapper -m' or 'modprobe ndiswrapper' to the beginning of the networking script.

Guess I'll dig up my Windows CD and see if I can test it.

User avatar
technowomble
Posts: 74
Joined: Thu 11 Oct 2007, 17:04
Location: West Gloucestershire, UK

Driver for Ralink

#14 Post by technowomble »

I've found what may be a bug in networking. My wireless card uses a Ralink chipset - rt61 driver - and the interface identifies as wlan0. Looking in networking, if I read it correctly it expects ralink to identify as ra0, and sees wlan0 as identifying wext. Running Network manager correctly uses the rt73 driver and the link and activity lights on my card light up, with Pwireless although it reports completed there is no light activity. I know earlier drivers for rt73 identified as ra0, not sure when it changed to wlan0.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#15 Post by jemimah »

I think if it identifies as wlan0 it's supposed to use wext, but I'm not exactly a Linux networking expert yet. Do you get an error that wpa_supplicant has failed to load? You need to actually add a network for it to do anything. I'm assuming you've scanned and nothing shows up.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#16 Post by jemimah »

The networking script makes the assumption that driver for your wireless card loads automatically on boot. If that is not the case, and you are loading it manually with Network Wizard, you need to use the bootconfig tool to force it to load during bootup.

User avatar
technowomble
Posts: 74
Joined: Thu 11 Oct 2007, 17:04
Location: West Gloucestershire, UK

#17 Post by technowomble »

It's 11.30 pm local time and I'm probably not thinking too well, but I was getting a situation where Pwireless2 was showing several networks, including mine, and my profile was loaded, but although the banner came up to announce that an ip address had been obtained I couldn't connect to the web. I uninstalled Pwireless - also removed the original using Petbegone - and things are back to normal i.e. connection up and running through Network manager. I'll try some more tomorrow, when i can get a few more grey cells firing!

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#18 Post by jemimah »

Usually, if you get an IP, and still can't connect, the problem is with /etc/resolv.conf. If it happens again, can you check and make sure that file is not empty?

User avatar
technowomble
Posts: 74
Joined: Thu 11 Oct 2007, 17:04
Location: West Gloucestershire, UK

#19 Post by technowomble »

This is interesting, though I don't fully understand what it means. In /etc/resolv.conf nameserver is shown as 10.0.0.2, whereas the IP obtained when connecting is regularly 10.0.0.4. I'm running at the moment without Pwireless, Network wizard settings saved, and my wireless came up at boot. With Pwireless there was some activity during boot, but it ceased before x-window started, which suggests that a hand-over isn't going properly? When I've got an hour or so today I'll check the other areas you mentioned and see if I can spot anything.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#20 Post by jemimah »

I'm going to try to merge in parts of the network wizard to Pwireless2 to make it work on less generic setups. Do any other developers want to help on this project? Making Puppy's wireless more friendly to laptop users is pretty important.

Post Reply