Improved Network Wizard (and rc.network)

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#421 Post by prit1 »

Dougal wrote:You should try running the wizard and having a terminal open at the same time. Then, when you load the ndiswrapper module, run in the terminal

Code: Select all

ifconfig -a
and see if wlan0 is appears.
If not, wait a few seconds and try again: maybe that what the wizard has to do -- it might be checking before the interface finished initializing.
You were right. I could see wlan0 in the terminal after the ndiswrapper loaded the driver. But then the wizard did not see it and asked me to unload the driver. After this ifconfig -a did not show the interface.

How can this be solved?
User avatar
Barburo
Posts: 298
Joined: Thu 14 Jun 2007, 18:49

#422 Post by Barburo »

@dogone
I too have a purpose-built script of simple commands that will always get my bcm43xx connected (it's for WEP). Sometimes I need to try multiple times. I use it because it works. B.
http://murga-linux.com/puppy/viewtopic. ... 8&start=45
[i]Laptop[/i]: Acer Aspire 5810TZ
mawebb88
Posts: 246
Joined: Sun 13 Jul 2008, 09:54
Location: France nr Lyon

Newwork wizard and Ausus Eee PC 901

#423 Post by mawebb88 »

Similar to dogone I have not had any success with the Network wizard in Puppy 4.1. (my apologies to Dogual and all).

Its the second time I have had to resort to make my own script (for 4.1) and putting a link to this in the Startup folder (see http://www.murga-linux.com/puppy/viewtopic.php?t=34184 re my solution for a USB stick install for a Acer Aspire 5100).

I just bought a Eee PC901. I took the stick I had previously made for my Acer Aspire 5100 laptop. It booted fine (press Esc during booting to get the boot device menu). But although I did not have the same problems as with the Acer laptop (never could get WiFi scanning in the wizard to work) I could not get it connected to my home WiFi no matter what I tried, be it DHCP or fixed. I monitored what what was happening with both ifconfig and iwconfig and it would not get a IP address from my routers DHCP server. In the end I cleared all profiles in the the Network wizard and decided to script the connection (like I resorted to on the Acer).

So make a file as below. Made is executable and put links(2) to it in the Startup folder:

Code: Select all

# For Mike's AP using USB stick or SD card on Asus Eee PC901
# For some reason this seems to take running twice to get it to work. Hence 2 links in the Startup folder
iwconfig ra0 essid AAA
iwconfig ra0 mode managed
iwconfig ra0 key xxx
iwconfig ra0 ap yyy
iwconfig ra0 channel 12
ifconfig ra0 192.168.1.239 netmask 255.255.255.0 broadcast 192.168.1.255
route add default gw 192.168.1.1
sleep 1
iwconfig ra0 key open
For some reason even using his I could not get the ESSID and Key to stick without running this twice. So I just make 2 links to the same script in the Startup folder. I know also there is some odd things in the script but I don't care as it works. For example putting the "open" in the same line as where I specify my key does not work hence a separate line.

Now it works perfectly. Installed it also on a SD card (SDHC 4G) copied my save file from the USB stick to the SD card and its working great without anything sticking out of the sides.

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

#424 Post by Dougal »

Sit Heel Speak wrote:Auto-dhcp does not work, even though it reports success; my adsl
modem is 10.0.0.2 but eth0 ends up with a 169.xxx.xx.xx address which
varies in the last three numbers. So I must set eth0 to a static IP.
The problem with dhcpcd is that even if you run it on an interface that's not plugged
in to anything it will return success and daemonize (probably expecting you to plug in at some later stage)... it seems to return an error only when there's a problem
with the actual HW/module.
You could try running dhcpcd on that interface manually (with the "-d" option) and see what
kind of messages it gives you.
if I then try to set eth0 (Network Wizard test shows an
available live network, OK) to static IP=10.0.0.13, netmask=255.0.0.0,
default gateway=10.0.0.2, DNS1=10.0.0.2, DNS2 not set,
and then try to ping 10.0.0.2, I get an error dialog box:
Could not set default route through10.0.0.2.
Note that Puppy has tried to do this:
route add -net default gw 10.0.0.2 dev eth0
route: SIOCADDRT: Network is unreachable
As I mentioned when I first added the support for multiple interfaces, I don't really
know anything about all these route commands and they might very need updating.

The original code (from Rarsa, I think) had the commands without the "dev" part,
so you just added items, regardless of which interface you were configuring.
Then I saw some script tempestuous posted where the "-net" was added before the "default"
and where the "dev" was used (or did I see that one in the man page?) and I figured
it might be the right thing to use if we're doing multiple interfaces. Which might
be wrong.
I just configured my eth0 with the wizard to the same settings as yours and it worked ok.
Then I configured wlan0 as static with similar info (10.0.0.2->10.0.03 etc.) and
it also configured ok -- and just overwrote the routing table:
iproute output changed from

Code: Select all

10.0.0.0/8 dev eth0  src 10.0.0.13 
default via 10.0.0.2 dev eth0 
to

Code: Select all

10.0.0.0/8 dev wlan0  src 10.0.0.12 
default via 10.0.0.3 dev wlan0
After that, "route add default gw 10.0.0.2 dev eth0" gave me an error, but
"route add default gw 10.0.0.2" didn't -- it just added it for wlan0:

Code: Select all

sh-3.00# iproute 
10.0.0.0/8 dev wlan0  src 10.0.0.12 
default via 10.0.0.2 dev wlan0 
default via 10.0.0.3 dev wlan0
Maybe I need to remove the "dev" part from the end? I just tried that and
configured eth0 with 4 at the end of all addresses and it worked:

Code: Select all

iproute 
10.0.0.0/8 dev wlan0  src 10.0.0.12 
10.0.0.0/8 dev eth0  src 10.0.0.14 
default via 10.0.0.4 dev eth0 
default via 10.0.0.2 dev wlan0 
default via 10.0.0.3 dev wlan0 
So I guess that will stay that way... but I still don't really understand why it
is that way -- I really have no idea about all this routing busyness.
Also, I would suggest, for the sake of logical consistency, change the subdir name from
/etc/network/network-wizard/network
to
/etc/network/network-wizard/wired
The reason for those names is that those directories were originally just in /etc,
but it turned out /etc/network is a file in other distros...
Anyway, the "network" directory does not contain wired networks only -- it contains
all of them (the "wireless" directory contains extra info for wireless).
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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#425 Post by Dougal »

MU wrote:Dougal, do you plan to localize the wizard?
Good question... I thought about it a while ago, but things were changing very
quickly, so I delayed it.

The problem is that it might not be very easy: not only are there lots of messages
that are used, but there are messages that include in them variable expansion,
so it might be a little complicated (maybe the messages should be replaced with
subshells where the message is echoed??).
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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#426 Post by Dougal »

BarryK wrote:I have hacked the 'net-setup.sh' script from Oct. 16 Wizard.

This "fixes" the handling of blacklisting.
I've added a function to do the blacklisting, by updating the SKIPLIST variable and
also some of the text updates.
However, I still don't like the fact that the wizard has to handle stuff like
blacklisting itself: there should be some kind of "API" for apps to use to
do such things, without having to mess with the boot-related config files
(so that changes in how the boot scripts work won't require updating all the apps,
just some "config-manager" that handles those kind of things).
I also put in further information in the ndiswrapper dialog box,
clarifying which interface, if any, needs to be brought down, and
warning of the risk of the system becoming unstable if a wireless
module is unloaded -- and explanation how to use the BootManager to get
around this.
I completely disagree with the whole "ndiswrapper warning" part:
There is no reason why users should be scared away from unloading a module and
driven to start another application and then reboot (what if they use a live cd
with no save file?), just because one out-of-tree driver causes instability when
unloaded (I wonder why it's out-of-tree...).
If anything, there should be a special dialog for only the acx drivers (and any
others that might be found to be problematic), which will inform the user of
the problem with unloading them and offer to blacklist the module, rather than
unload it, so that all the user has left to do is reboot.
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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#427 Post by Dougal »

dogone wrote:Neither laptop leaves
the house so all settings are fixed. My script will get me through
until a fix is found...and yes, I have followed the forum threads,
tested the latest updates and contributed feedback here and there.
Nothing has worked and entering wireless settings again after each boot
finally got the best of me.
Well, the question is what exactly your problem is: is it the problem of wireless
scans failing to detect networks at bootup, or a problem with getting WPA to
work (note that the latest update fixed a problem with WPA, where the wpa_supplicant
config files were affected, so the old ones need to be deleted).
The scan failure at boot I can get around by adding a checkbox in the wizard, where
you can select to force using a certain profile at bootup, without bothering with
scanning -- but I'd rather find the cause of the scan problems.
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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#428 Post by Dougal »

prit1 wrote:You were right. I could see wlan0 in the terminal after the ndiswrapper
loaded the driver. But then the wizard did not see it and asked me to
unload the driver. After this ifconfig -a did not show the interface.
Ok, I've added a loop that checks and, if nothing is found, sleeps one second and
tries again, and so on for a maximum of ten seconds.
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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#429 Post by Dougal »

mawebb88 wrote:I monitored what what was
happening with both ifconfig and iwconfig and it would not get a IP
address from my routers DHCP server. In the end I cleared all profiles
in the the Network wizard and decided to script the connection (like I
resorted to on the Acer).
What your script does is configure your network with a static IP -- you can also
have the wizard do that for you: just select "Static IP" instead of "Auto Dhcp"
after you configured the network.
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
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#430 Post by MU »

Dougal wrote:
MU wrote:Dougal, do you plan to localize the wizard?
Good question... I thought about it a while ago, but things were changing very
quickly, so I delayed it.

The problem is that it might not be very easy: not only are there lots of messages
that are used, but there are messages that include in them variable expansion,
so it might be a little complicated (maybe the messages should be replaced with
subshells where the message is echoed??).
Dougal, I attach the old, localized one, so that you may look, how it was done.
I think Barrys repository contains newer ones, but this one is the one that is part of Muppy 008.4c.
It will be replaced with yours in the next days.
The old thread was here:
http://www.murga-linux.com/puppy/viewtopic.php?t=25098

It contains net-setup.sh plus two locale files.

I know, that it is not easy to translate such a complex program :roll:
We could share the work, though.
I could use the existing .mo files as base to translate the current net-setup.sh.
Though you might prefer to do it yourself, as it is always difficult to keep the overview, if someone else added a lot of code.

Mark
Attachments
old-netsetup-localized.tar.gz
(17.29 KiB) Downloaded 387 times
tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#431 Post by tempestuous »

Forum member Slickness reports that /etc/wpa_supplicant2.conf is missing from Puppy 4.1 -
http://www.murga-linux.com/puppy/viewto ... 652#242652
I'm away from a Puppy computer right now and can't check.
Unless there has been a significant change in how the Network Wizard works, this must surely be a problem?
User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#432 Post by BarryK »

tempestuous wrote:Forum member Slickness reports that /etc/wpa_supplicant2.conf is missing from Puppy 4.1 -
http://www.murga-linux.com/puppy/viewto ... 652#242652
I'm away from a Puppy computer right now and can't check.
Unless there has been a significant change in how the Network Wizard works, this must surely be a problem?
No, it seems ok, Dougal has put them in /etc/network-wizard/wireless/wpa_profiles/.

There is still /etc/wpa_supplicant.conf, that comes from the wpa_supplicant package. That is not being used (I think).
[url]https://bkhome.org/news/[/url]
mawebb88
Posts: 246
Joined: Sun 13 Jul 2008, 09:54
Location: France nr Lyon

Eee PC 901

#433 Post by mawebb88 »

Dougal wrote:
mawebb88 wrote:I monitored what what was
happening with both ifconfig and iwconfig and it would not get a IP
address from my routers DHCP server. In the end I cleared all profiles
in the the Network wizard and decided to script the connection (like I
resorted to on the Acer).
What your script does is configure your network with a static IP -- you can also
have the wizard do that for you: just select "Static IP" instead of "Auto Dhcp"
after you configured the network.
I also had tried using "Static IP" in the wizard but still no joy as the ESSID and Key still did not stick.. Hence my script which uses a static IP just to speed things up as I have address reservation on my router hence no need to waste time by the DHCP server doing its thing.

Mike
User avatar
dogone
Posts: 202
Joined: Tue 22 Apr 2008, 02:53
Location: Arizona, USA

Dogone's wireless connection problem solved

#434 Post by dogone »

Dougal,

Good news! I've identified the precise cause of my trouble with wireless configuration in all 4 series Puppys. Please see my post in the 4.1.1. bug section.

http://murga-linux.com/puppy/viewtopic. ... 160#243160

I'll continue to keep everyone updated re observations here.

And thanks for hangin' in there!
Last edited by dogone on Tue 28 Oct 2008, 03:45, edited 1 time in total.
User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#435 Post by Dougal »

I've started localizing the wizard.
I'm half way through net-setup.sh and thought someone might want to start working on wag-profiles.sh at the same time.
At the top of the .mo file I've included soem rules about how to name the variables -- there are also plenty of examples in what I've already done.
Attachments
network-wizard-localized-oct-25th.tar.gz
(44.06 KiB) Downloaded 394 times
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
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#436 Post by MU »

Dougal, great, I'm happy that you started to localize it.
This week my todo-list is full unexpectedly, and for next week, it depends on this week.
If I can afford time then, I will look at the wag script, if nobody else has done the job then.
thanks, Mark
User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#437 Post by Dougal »

I've finished localizing everything except for wag-profiles.sh -- I'll probably do that one tomorrow and have everything finished in a couple of days.

I'm attaching what I've done until now, so people can start doing the translations.

Sit Heel Speek and prit1: This version also includes the fixes for the problems you reported.
Attachments
network-wizard-localized-oct-26th.tar.gz
(45.32 KiB) Downloaded 444 times
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
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#438 Post by prit1 »

Dougal,

I tried this latest version of the Network Wizard and it still doesn't recognize the interface after loading the windows driver through Ndiswrapper. But doing the ifconfig -a during the Ndiswrapper process does show wlan0.
tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#439 Post by tempestuous »

Dougal, an update is needed to wag-profiles.sh for 2 new wifi drivers that Barry has added since Puppy 4.1:
rt2860sta and rt2870sta.
Each of these modules may identify itself in /proc without the "sta", so it might be safe to add them as -
rt2860*
rt2870*
They should be listed on the "wext" line.
User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#440 Post by Dougal »

prit1 wrote:I tried this latest version of the Network Wizard and it still doesn't recognize the interface after loading the windows driver through Ndiswrapper. But doing the ifconfig -a during the Ndiswrapper process does show wlan0.
That could mean one of two things:
- You had a different module using that interface, which was unloaded, but the wizard did not update its list of interfaces (so the number it uses to keep track with hadn't shrunk by one).
- There's something wrong with how the interface is listed: the wizard checks the output of ifconfig -a for lines containing "Link encap:Ethernet" -- maybe it doesn't show that for the new interface?
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Post Reply