Improved Network Wizard (and rc.network)

Under development: PCMCIA, wireless, etc.
Message
Author
nic2109
Posts: 405
Joined: Mon 01 Jan 2007, 20:24
Location: Hayslope, near Middlemarch, Midlands, England

#31 Post by nic2109 »

Sorry to report a bug, but trying to create a WPA Profile goes well until you click on 'Save'. The whole wizard then crashes out completely. Poof - gone!

Edit - sorry it looks like you've just addressed this. I'll try the latest version.

Another Edit Sadly the July 22nd version behaves exactly the same as the earlier one. In addition the 'Use this profile' button has the same effect.

It's worth pointing out at this stage that I've never got WPA to work with the latest kernel since the iwp3945 driver was replaced by iwl3945 (and despite Tempestuous' best efforts), so this behaviour may be a symptom of those issues.

New Bug Resorting to wired (on eth0) - the internet isn't activated on reboot. It looks to me that this is because /etc/eth0mode isn't written - see screenshot.
Last edited by nic2109 on Wed 23 Jul 2008, 13:33, edited 1 time in total.
[color=darkblue][b][size=150]Nick[/size][/b][/color]

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#32 Post by prit1 »

Dougal wrote: It seems like it doesn't find anything with the wireless scan...
When you run "iwlist ra0 scan", does it detect anything?
I get the message "interface doesnt support scanning".

Please note that the when the default network wizard in Dingo would detect and save a profile, it worked on every reboot. No rescanning was required.
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

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

#33 Post by HairyWill »

using the 22nd july version I found a couple of problems in rc.network
using an IPW2200 card with WEP security

1.
for PROF in `ls ${PROFILES_DIR}/${CELL_AP_MAC}.w[ep][pa]*.conf 2>/dev/null` ; do
my profile is named 00:16:B6:28:90:C1.WEP.conf so the case is a problem

2.
if [ "$SUCCESS" = "yes" ] && testInterface; then
the testInterface function requires an argument $INTERFACE
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
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#34 Post by Keef »

I've tried the July 22nd version, but the wizard is still closing down when I try to save.
Same error message:
/usr/sbin/wag-profiles.sh: line 712: : No such file or directory

It did pick up the interface though (on second boot).
I've also copied scanpci and libscanpci.so from a 2.14R CD, so that error message has gone.

By the way, I am using WPA/TKIP. Just as an experiment I've found that selecting Open or WEP will allow a profile to save (won't connect of course) but not WPA.

Don't know if this is relevant, but when I select 'use this profile' the console throws up the message:

Invalid AP_SCAN command: needs one argument (ap_scan value)

It connects properly though.

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

#35 Post by Dougal »

OK, a few updates:
1) I fixed the bugs reported by HairyWill. The testInterface problem
existed in other places, including the wired connection code, so
with the last version I think no-one would have been able to
connect...

2) I noticed something small that I'm not sure what to do with, maybe
someone (tempestuous?) will know:
While testing, I tried using the "autoconnect" profile and got an error
from iwconfig, that the interface (wlan0, the Ralink in the Classmate
with rt73usb) does not support the "Auto" mode...

3) I've fixed something I implemented originally but was incomplete, but
I'm not even sure if it's the right thing to do:
When configuring a wireless interface (with iwconfig, wpa_sup or
wlanctl-ng), if any of the commands fails (setting mode, essid etc.), then
it will declare the configuration as failed, not even trying to see if
it's connected.
Is there a point in doing so, or just go on and test the interface (with
ifplugstatus) anyway?

4) I've found the problem that caused the crashing, the question is how
to solve it:
When creating a new profile not from a scan result (i.e, a
completely "made up" one, like the samples), the user is asked for a name
and ESSID.
But the profile is saved according to the MAC address... so you get the
file /etc/wireless/profiles/.Open.conf (blank MAC address before first
dot...)

The reason I use the MAC address is that, in my experience (cycling around
and scanning for networks...), people don't always make sure they have a
unique ESSID: I've seen things like "default", "connexant", "linksys"
and "k" (no kidding)...
I also assumed that people might change the ESSID, so sticking with the
MAC address would make the profile still usable.

So, what should I do?
I could:
- make the profiles saved as $ESSID.$MAC_ADDRESS.$ENCRYPTION.conf, which
would make sure it has a unique name. But this adds a dependency on the
ESSID.

- if the MAC address is blank, save it as $ESSID.$ENCRYPTION.conf
but this way it will not be used at bootup (though the network might still
be autoconnected when trying to connect to open networks)

- let the user specify the MAC address, rather than the ESSID (or as well
as the ESSID, but this will make the wizard window bigger than it already
is...).

What I don't really understand is why would a user create a profile
that is not based on scan results? Is there any other "general" profile
but "autoconnect" that anyone would want?
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

#36 Post by Dougal »

prit1 wrote:I get the message "interface doesnt support scanning".

Please note that the when the default network wizard in Dingo would detect and save a profile, it worked on every reboot. No rescanning was required.
Does it use one of the prism2 modules? If so, then wlanctl-ng is supposed to be used for scanning, which should be done at bootup. What that would mean is that the problem is just that the interface configuration option telling it to use wlanctl-ng is missing (it should be in the config file in /etc/wireless/interfaces).
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

#37 Post by Dougal »

Keef wrote:I've tried the July 22nd version, but the wizard is still closing down when I try to save.
Same error message:
/usr/sbin/wag-profiles.sh: line 712: : No such file or directory
See my long post above about this.
By the way, I am using WPA/TKIP. Just as an experiment I've found that selecting Open or WEP will allow a profile to save (won't connect of course) but not WPA.
I'll look and see if there's anything in the WPA code that might cause problems...

Don't know if this is relevant, but when I select 'use this profile' the console throws up the message:

Invalid AP_SCAN command: needs one argument (ap_scan value)

It connects properly though.
This could be something to do with the specific driver (see the problem I mention I have with "Auto", point 2 above). I actually think that you might have a problem connecting with the latest version, since I just fixed the code that aborts if there's an error... (see my point 3 above)
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
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#38 Post by edoc »

Used your suggestion and after I downloaded 23July opened a terminal in my downloads folder and ran tgz2pet against the file and then ran the newly created PET.

Then I rebooted with both wired LAN and a wireless GigaFast USB modem attached.

Both connections were recognized and I was able to Scan and find my home network and add the WEP but even though it "says" that it is OK and ran dhcpd OK it still would not connect.

I tried switching over to the wired connection and my CF-28 locked up.

I have another laptop running 3.01 right next to this one and it is connected via internal wireless and is working fine.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#39 Post by prit1 »

Dougal wrote:Does it use one of the prism2 modules? If so, then wlanctl-ng is supposed to be used for scanning, which should be done at bootup. What that would mean is that the problem is just that the interface configuration option telling it to use wlanctl-ng is missing (it should be in the config file in /etc/wireless/interfaces).
My wireless card uses RT2500 modules. The scan from your network wizard works in the 1st or 2nd attempts. Does this not use iwlist?

How do I use wlanctl-ng?
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

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

#40 Post by HairyWill »

Dougal wrote:What I don't really understand is why would a user create a profile
that is not based on scan results?
I agree entirely. For a long time I didn't even realise that the network wizard had a scan button.

It would probably be better if you moved the scan button to the top of the form and make it clearer that the action is to "scan for available networks" or similar.

Maybe change the frame label Load Profile to Load Existing Profile, this makes it clear that you need to create one.
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]

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#41 Post by tempestuous »

prit1 wrote:
Dougal wrote:It seems like it doesn't find anything with the wireless scan...
When you run "iwlist ra0 scan", does it detect anything?
I get the message "interface doesnt support scanning".
This is very strange. The rt2500 driver should support scanning with iwlist. In fact, I just downloaded the source code now to check the README. I have attached it to this post for reference.
I suspect that the error message may occur because the wifi interface (ra0) has not created successfully, or the ra0 interface is not up.
Can iwconfig commands run successfully? Try this -

Code: Select all

iwconfig ra0 mode managed
Dougal wrote:I tried using the "autoconnect" profile and got an error from iwconfig, that the interface (wlan0, the Ralink in the Classmate with rt73usb) does not support the "Auto" mode...
I really don't know how "Auto" works. Anyway in 99% of cases your wifi mode should be "managed" so maybe the answer is simply to change "Auto" to "managed" in /etc/wireless/profiles/autoconnect.conf
Attachments
rt2500-cvs-README.gz
(3.21 KiB) Downloaded 1037 times

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#42 Post by Keef »

Reading through previous posts, I tried scanning first, and then saving the profile, which I hadn't tried before - this works fine. There is no connection on reboot, ('interface does not support scanning' , so there you go...) but the profile is there, and it only takes a few clicks to get on-line. I could quite happily live with this!
Auto DHCP seems to work far quicker than in the original version, but I don't know if this is incidental or not.

I no longer get:
Invalid AP_SCAN command: needs one argument (ap_scan value)

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#43 Post by prit1 »

tempestuous wrote:This is very strange. The rt2500 driver should support scanning with iwlist. In fact, I just downloaded the source code now to check the README. I have attached it to this post for reference.
I suspect that the error message may occur because the wifi interface (ra0) has not created successfully, or the ra0 interface is not up.
Can iwconfig commands run successfully? Try this -

Code: Select all

iwconfig ra0 mode managed
I tried

Code: Select all

iwconfig ra0 mode managed
And it did not do anything, no errors, everything still the same. Then I did just iwconfig and got the below:

Code: Select all

lo    no wireless extensions

ra0  RT2500 Wireless ESSID:""
       Mode: Managed  Frequency=2.412 GHz  Bit Rate==11 Mb/s
       RTS  thr:off        Fragment thr:off
       Encryption key:off             Security mode:open
       Link Quality:0   Signal level:136   Noise level 177
       Rx invalid nwid:0   invalid crypt:0   invalid misc:0

eth0 no wireless extensions.
The default network wizard for Dingo works on this well. No problems at all.
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

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

#44 Post by HairyWill »

july 23 works for me
I'm not sure but I thought that a previous version managed to select wep automatically when I used an ap found by scanning.
Also I thought that previously hitting the "use this profile" button did an automatic save, but it doesn't now.

You are doing a great job here, an overhaul of network configuration was definitely needed.
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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#45 Post by Dougal »

Ok, I've progressed a little in trying to discover why connecting at boot
fails... but it only makes things a little confusing.

If I try to scan with the interface down, I get the "doesn't support
scanning" error, but it also tells me the interface is down:

Code: Select all

sh-3.00# iwlist wlan0 scan
wlan0     Interface doesn't support scanning : Network is down
So we know that isn't the problem.

On the other hand, if you write a wrong interface name it does give
exactly the same error reported!

Code: Select all

sh-3.00# iwlist wlanBLA scan
wlanBLA   Interface doesn't support scanning.
So it would seem the info given by iwlist is not very specific...

What I was thinking is maybe the problem at bootup is something like
we've had before with the time it takes firmware to load (at the moment
it sleeps for 10 seconds before starting, but maybe we need more).


Anyway, there is something I haven't mentioned before, that can make
tracking this problem easier:
In order to test the boot code you don't need to reboot!

You can run rc.network at any time, in order to do the autoconnecting.
In fact, I've just added support for a "connect" argument, so you can
use it at any time and it will skip the irrelevant code.
So you could add a desktop icon for autoconnecting to the net, which will
just point to /etc/rc.d/rc.network and pass "connect" as the argument
(Rox enables you to do this, just right-click on the icon and select "Edit
Item", then put it in the second field.)
One thing I wasn't sure about is whether I should give message windows
telling you it is connecting (like the wizard does). Anyone have an
opinion?

Note that rc.network also supports the "stop" argument, if you want to
kill the connection and bring down the interfaces.

Now that I think about it, the "Connect" appdir could be modified to add
options for autoconnecting and disconnecting ethernet/wireless networks,
without having to run the network-wizard every time! I'm including an
attachment with modifications to enable it (note that any error messages
will be directed into /tmp/xerrs.log).


Ok, another thing I've done is modify the wireless profiles dialog, to
try and make it a little clearer as to how things work.
I just made some quick changes, so the wording and layout might need some
improving (any suggestions welcome), but note that I'm trying to keep
the window from getting too big -- it's already problematic on 7" screens.
Attachments
connect-update.tar.gz
(743 Bytes) Downloaded 1149 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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#46 Post by Dougal »

Another update.
I've changed the code that finds info about usb devices (for display in
the first wizard window). I hope it works ok.

I've also added some failsafes, so if you try and create a profile without
scanning first (and thus it is incomplete), the wizard will not crash.

Also, if you use the option of autoconnecting after boot (when using my
update to the "Connect" desktop icon, as posted last time), you will get
dialogs telling you which network it tries to connect to and if it
succeeded or failed.
This is also different when connecting with the wizard: when you try and
configure a wireless network, the dialog will give you a message like:
Configuring interface $INTERFACE to network $ESSID
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
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:

#47 Post by urban soul »

Dougal wrote: 2) I noticed something small that I'm not sure what to do with, maybe
someone (tempestuous?) will know:
While testing, I tried using the "autoconnect" profile and got an error
from iwconfig, that the interface (wlan0, the Ralink in the Classmate
with rt73usb) does not support the "Auto" mode...
iwconfig essid auto never worked for me for rt73usb or orinico or prism2.
Dougal wrote: 3) I've fixed something I implemented originally but was incomplete, but
I'm not even sure if it's the right thing to do:
When configuring a wireless interface (with iwconfig, wpa_sup or
wlanctl-ng), if any of the commands fails (setting mode, essid etc.), then
it will declare the configuration as failed, not even trying to see if
it's connected.
Is there a point in doing so, or just go on and test the interface (with
ifplugstatus) anyway?
Yes, it is. My orinico card does not support set frequency and some others, however it connects just fine. In fact you only need the essid (and the key) for wep.
Dougal wrote: 4) I've found the problem that caused the crashing, the question is how
to solve it:
When creating a new profile not from a scan result (i.e, a
completely "made up" one, like the samples), the user is asked for a name
and ESSID.
But the profile is saved according to the MAC address... so you get the
file /etc/wireless/profiles/.Open.conf (blank MAC address before first
dot...)
After a scan, you have the MAC address. (PROFILE_MAC or so in function SetupNewProfile in wag-profiles.sh). I would make scanning obligatory as i have done in wag-profiles.sh last time. It also saves typing and is a known procedure to every user. Please wait with editing wag-profiles.sh a bit, Barry is reviewing it now.

Urban

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#48 Post by BarryK »

Please wait with editing wag-profiles.sh a bit, Barry is reviewing it now.
Yes, I was looking at some changes Urban Soul made a week or so ago.
I have just downloaded the Jul27 wizard, and will checkout the connect mods.

It would be really great if the 'sleep 10' could be replaced with a loop that can terminate sooner. Although your profiles are not based on eth0, wlan0 etc. names, you can still lookup the interface (eth0, wlan0 etc) of each profile and wait on it. If the max wait is 10 or 12 seconds, it doesn't matter, as it runs in the background, but you will get the bonus of earlier completion of the loop if the interfaces are available.
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#49 Post by BarryK »

First item of feedback, testing Jul27th tarball:

Running 4.1alpha "pre-5"

In the first window, my wlan1 interface has no description:

wlan1 Wireless rt73usb usb: <nothing>

I suggest have the fallback to getting info from the module itself:

Code: Select all

# modinfo rt73usb | grep '^description:'
That returns:
"Ralink RT73 USB Wireless LAN driver"
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#50 Post by BarryK »

2nd item of feedback:

The prominent 'Scan' button is very nice.

Perhaps this is a dumb question, but isn't it a bit confusing that the user is asked to save twice? I mean, asked to save the profile, then a bit later asked to save the configuration for next boot.

..no, the profile is a different thing from saving the configuration for reboot.

But, perhaps the user should not be asked to save the profile until the final step, so the user is only asked once to save. Just a thought.
[url]https://bkhome.org/news/[/url]

Post Reply