Pwireless2 (Version 1.0)

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

#211 Post by jemimah »

Yes there are a few updates in Fluppy that aren't in this version. It's probably time to update the pet. :)

player_one
Posts: 8
Joined: Thu 16 Apr 2009, 22:36

#212 Post by player_one »

Ok, thank you!

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

#213 Post by jemimah »

I've posted an update. Most of the changes are minor bugfixes and enhancements.

I no longer consider this Beta, so enjoy!

(Keep in mind I only test on 4.3 so other Puplets may need to repackage it if it init.d scripts work in a different way or something.)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#214 Post by 01micko »

Hi jemimah,

Couple of questions..

1) I plan to re-package this up for Lucid Puppy.. do you think it necessary to recompile wpa_supplicant and wpa_cli against the ubuntu libs for compatibility? If so, can you post your configure file please? Also the Lupu kernel is recompiled against gcc-4.4.3. Would that make a difference?

2) what about dhcpcd? It's already there, but in Lupu, there is a symlink in /usr/local/sbin/dhcpcd to /usr/sbin/dhcpcd. Can I use those and just add the extra stuff you have in /lib/dhcpcd/ ?

Thanks for this cool app, my wife's machine has been running an early beta for about four months or so without a problem.

Cheers
Puppy Linux Blog - contact me for access

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

#215 Post by jemimah »

You can probably use the native wpa_supplicant and dhcpcd as long a they are sufficiently recent (which I'm sure they are in LuPu). I only include binaries in the pet because in a lot of Puplets these are too old, and upgrading breaks the Network Wizard.

I'm attaching the .config for wpa_supplicant.

You can edit /usr/local/Pwireless2/config to tell it which wpa-supplicant and dhcpcd to use.

Let me know if you have any difficulty.
Attachments
.config.gz
(5.14 KiB) Downloaded 897 times

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#216 Post by 01micko »

OK, thanks for speedy response :)

Shall edit /usr/local/Pwireless2/config per your advice. The wpa_* execs are in /sbin in Lupu. ... dhcpcd should be ok as the symlink is already there on /usr/local/sbin.

These files are the extras in /lib/dhcpcd
  • 99-dhcpup
    99-down
    99-ifup
    99-release
    99-stop
    99-timeout
    99-up
I'll add those as well and let you know how it goes.

Cheers
Puppy Linux Blog - contact me for access

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

#217 Post by jemimah »

One thing to check for is if your wpa_supplicant supports the -f option to write the log to a file. I think that's not on by default, but it is rather useful, and Pwireless2 needs it.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#218 Post by 01micko »

Code: Select all

# wpa_supplicant -h    
wpa_supplicant v0.6.9
Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> and contributors

This program is free software. You can distribute it and/or modify it
under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the
BSD license. See README and COPYING for more details.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

usage:
  wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] [-g<global ctrl>] \
        -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-p<driver_param>] \
        [-b<br_ifname>] [-f<debug file>] \
        [-N -i<ifname> -c<conf> [-C<ctrl>] [-D<driver>] \
        [-p<driver_param>] [-b<br_ifname>] ...]

drivers:
  wext = Linux wireless extensions (generic)
  nl80211 = Linux nl80211/cfg80211
  atmel = ATMEL AT76C5XXx (USB, PCMCIA)
  wired = wpa_supplicant wired Ethernet driver
options:
  -b = optional bridge interface name
  -B = run daemon in the background
  -c = Configuration file
  -C = ctrl_interface parameter (only used if -c is not)
  -i = interface name
  -d = increase debugging verbosity (-dd even more)
  -D = driver name (can be multiple drivers: nl80211,wext)
  -f = log output to debug file instead of stdout
  -g = global ctrl_interface
  -K = include keys (passwords, etc.) in debug output
  -s = log output to syslog instead of stdout
  -t = include timestamp in debug messages
  -h = show this help text
  -L = show license (GPL and BSD)
  -p = driver parameters
  -P = PID file
  -q = decrease debugging verbosity (-qq even less)
  -u = enable DBus control interface
  -v = show version
  -W = wait for a control interface monitor before starting
  -N = start describing new interface
example:
  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
# 
Looks ok I think

Thanks
Puppy Linux Blog - contact me for access

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

#219 Post by jemimah »

Yup looks good.

I had an extra Pwireless2.old script in /etc/init.d. I have removed it and uploaded a fixed pet.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#220 Post by 01micko »

Well it works, :D but there is a bug in the Lupu /etc/rc.d/rc.sysinit script :(

Code: Select all

#100227 choose default network tool...
NETCHOICE='other' #100304
DEFAULTCONNECT="`cat /usr/local/bin/defaultconnect | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
[ "`grep 'gprs' /usr/local/bin/defaultconnect`" != "" ] && DEFAULTCONNECT='pgprs-connect'
[ "$DEFAULTCONNECT" = "gkdial" ] && DEFAULTCONNECT="pupdial" #for older pups.
case $DEFAULTCONNECT in
 Pwireless2)
  NETCHOICE='Pwireless2'
 ;;
 net-setup.sh)
  NETCHOICE='net-setup.sh'
 ;;
 net_wiz_classic)
  NETCHOICE='net_wiz_classic'
 ;;
 sns)
  NETCHOICE='sns'
 ;;
 *) #try determine which tool was used to setup networking...
  if [ -s /etc/simple_network_setup/connections ];then #100306
   NETCHOICE='sns'
  else
   CHECKOLDWIZ="`ls -1 /etc/*[0-9]mode 2>/dev/null`" #ex: eth0mode, wlan0mode.
   if [ "$CHECKOLDWIZ" != "" -a -d /usr/local/net_setup ];then
    NETCHOICE='net_wiz_classic'
   else
    CHECKNEWWIZ="`ls -1 /etc/network-wizard/network/interfaces 2>/dev/null`"
    if [ "$CHECKNEWWIZ" != "" ];then
     NETCHOICE='net-setup.sh'
    else
     [ -f /usr/local/Pwireless2/interface ] && NETCHOICE='Pwireless2' #100304
    fi
   fi
  fi
 ;;
esac
[ -f /etc/init.d/Pwireless2 ] && chmod 644 /etc/init.d/Pwireless2 #prevent jemimah's script from running. 100304 100513
I tried Pwireless2 pfix=ram and rebooted, but the permissions on /etc/init.d/Pwireless2 were 644 ... why? ....So I dug up where they get changed. That's all well and good if you chose something beforehand, but probably not good for Pwireless2. I think this is the same script in Quirky.

So, what did I do? Yeah, one of my gross hacks :roll:

Code: Select all

set -x

if [ -f /usr/local/Pwireless2/interface ];then echo true
	else chmod 755 /etc/init.d/Pwireless2 2>/dev/null
	exec /etc/init.d/Pwireless2
fi

. /usr/local/Pwireless2/config

WIFI_IF=`cat /usr/local/Pwireless2/interface`

[ -z $WIFI_IF ] && exit




gtrayicon --activate="/usr/local/Pwireless2/connect" --activate-icon=/usr/share/pixmaps/network-offline.png --deactivate="/usr/local/Pwireless2/disconnect" --deactivate-icon=/usr/share/pixmaps/network-transmit-receive.png --menu-file=/usr/local/Pwireless2/network.menu --tooltip='Click to connect or disconnect Pwireless2'&
$WPA_CLI -i $WIFI_IF status|grep COMPLETED 
if [[ $? == 0 ]] ; then
	sleep 1
        killall -SIGCONT gtrayicon
	$DHCPCD -n $WIFI_IF
	exit
fi

pidof dhcpcd
if [[ $? != 0  ]] ; then
	/usr/local/Pwireless2/start-dhcp
fi
Far from perfect, but will do for me until woof is fixed.

Thanks for all your help.

Cheers
Puppy Linux Blog - contact me for access

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#221 Post by gerry »

@Jemima- I'm using the beta version, how do I upgrade to 1.0? Just install the new one and overwrite the beta, or uninstall/reinstall, or....

thanks- gerry

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

#222 Post by jemimah »

Uninstall the old version, then install the new version.

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#223 Post by gerry »

Been using PWireless2 for a few days on my Acer Aspire One, first on Puppy 431, then Fluppy 003. Works beautifully- until today. Neither Puppy would detect any networks. I tried reconfiguring again and again, deleting old profiles here and there, tried live usb without a save file- nada.

So I woke Windows XP from it's hibernation, to check that the computer itself was ok, and that worked. Gave Puppy 431 a last chance before I wiped it and re-re-re-re-installed Ubuntu NBR, and it made it's wireless connection on boot-up with no intervention. Haven't tried Fluppy yet, but I expect it to work. EDIT: yes, it does.

So....if your Puppy won't see any wireless networks, just run Windows XP to straighten things out.

gerry

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#224 Post by gyro »

Just downloaded Pwireless2, and tried to use it, to configure a second ethernet interface.
Situation:
eth0, auto dhcp, UP, connected to Internet.
eth1, not configured.

Trying to achieve, eth1 configured as 192.168.3.1/24, nothing more.
Gateway for machine is already defined, so should not be specified again.
DNS servers are already defined.

Run Pwireless2, select "DHCP" tab. Three interfaces are listed, lo, eth0, and eth1.
I click on eth1, then unset the "auto" box so static boxes become available.
Enter 192.168.3.1 and 255.255.255.0, leave rest blank.
Pwireless2 complains with "invalid gateway" error message, does nothing.

Run network wizard, specify only IP address and network mask, no problem, done and dusted.

gyro

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

#225 Post by jemimah »

gyro wrote: Trying to achieve, eth1 configured as 192.168.3.1/24, nothing more.
Gateway for machine is already defined, so should not be specified again.
DNS servers are already defined.
How are these already defined?

I could remove the error checking but I don't understand why I should do that.

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#226 Post by gyro »

jemimah wrote:How are these already defined?
By dhcpcd running on eth0.

gyro

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

#227 Post by jemimah »

Pwireless2 definitely wants to be the only subsystem managing the network. It wasn't designed to be friendly to running multiple network tools at the same time.

Combining roaming and NAT is probably fairly complicated. The right thing to do in my opinion would be to add a sharing tab to Pwireless2 itself.

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#228 Post by gyro »

I ran my test again.
This time I started with no interfaces defined.
In Pwireless2 I configured eth0 as "auto DHCP", then tried to configure eth1 as 192.168.3.1, but it won't let me.

So for anyone wanting to use puppy as a router (Internet sharing), I suggest that you use the normal Internet Connection Wizard.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#229 Post by gyro »

jemimah,

The way Pwireless2 currently functions is fine if there is only 1 real interface. But if you want Pwireless2 to be useful in configuring multiple interface situations, then I would suggest that changes are advisable.

The most likely explanation for puppy having more than 1 active network interface, is to run puppy as a router. In this case, a default gateway and DNS ip addresses, are required on 1 and only 1 of the interfaces, (the up-stream interface).
So if 1 of the interfaces is configured to use dhcp ("auto dhcp"), then all the other interfaces should be configured statically with just an IP address and a network mask.
But if all interfaces are configured statically, then 1 and only 1 interface should be configured with the extra information. (Although in this case I would be tempted to just leave all the fields available, and check none of them.)

gyro

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#230 Post by gerry »

I'm using Pwireless2 1.0 in a Puppy 431 frugal on Acer Aspire One. I often find that when I boot up it does not connect. I start Pwireless2 from the menu, click roam, and no networks are found. Here's a work-around: click the Disconnect button, then click Roam. My network is displayed, click Connect, and off we go.

Is it supposed to work this way? One thing that occurs to me is that I have the router configured to auto-select the best channel. Does Pwireless2 catch up if the router selects a different channel from last time? Or does that happen in wlan0?

gerry

Post Reply