Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 01 Sep 2014, 19:45
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Improved Network Wizard (and rc.network)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 40 [596 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, ..., 38, 39, 40 Next
Author Message
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sun 27 Jul 2008, 14:24    Post subject:  

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
Back to top
View user's profile Send private message 
urban soul


Joined: 05 Mar 2008
Posts: 276
Location: "Killing a nerd is not as much fun as ist sounds" B.Simpson

PostPosted: Sun 27 Jul 2008, 20:22    Post subject:  

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
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 27 Jul 2008, 21:18    Post subject:  

Quote:
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.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 27 Jul 2008, 21:36    Post subject:  

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:
# modinfo rt73usb | grep '^description:'


That returns:
"Ralink RT73 USB Wireless LAN driver"

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 27 Jul 2008, 21:46    Post subject:  

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.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 27 Jul 2008, 21:50    Post subject:  

3rd item:

Having completed the operation of connecting wlan1 to the network, there is a return to the main window, with this text at the top:

"NETWORK CONFIGURATION OF wlan1 SUCCESSFUL!
The configuration has been saved to file /etc/wlan1mode.
This file is read at bootup by /etc/rc.d/rc.network

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 27 Jul 2008, 22:25    Post subject:  

4th item:

After setting up my rt73usb interface, I rebooted, but didn't get any Blinky.

I looked in /tmp/bootsysinit.log and found this:

Code:
/etc/rc.d/rc.network: line 172: syntax error near unexpected token `}'
/etc/rc.d/rc.network: line 172: `}'


My config files are as follows:

/etc/network/interfaces/00:1C:F0:0A:55:F9.conf
...empty file.

/etc/wireless/interfaces/00:1C:F0:0A:55:F9.conf
Code:
INT_WPA_DRV=''
USE_WLAN_NG=''


00:12:BF:19:ED:11.Open.conf
Code:
TITLE="WLAN"
        WPA_DRV=""
        WPA_TYPE=""
        WPA_AP_SCAN=""
        ESSID="WLAN"
        NWID=""
        KEY=""
        MODE="managed"
        SECURE="open"
        FREQ="2.437G"
        CHANNEL="6"
        AP_MAC="00:12:BF:19:ED:11"


/etc/wireless/profiles/autoconnect.conf
Code:
TITLE="autoconnect"
   IP=""
   GATEWAY=""
   ESSID="any"
   NWID=""
   KEY="off"
   MODE="Auto"
   SECURE="open"
   FREQ=""
   CHANNEL=""
   AP_MAC=""


/etc/wireless/profiles/template.conf
Code:
TITLE="template"
   IP="192.168.0.3"
   GATEWAY=""
   ESSID="hotspot"
   NWID=""
   KEY=""
   MODE="Managed"
   SECURE="open"
   FREQ="2.437G"
   CHANNEL=""
   AP_MAC=""


/etc/wireless/wpa_profiles/wpa_supplicant2.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
update_config=1

network={
   ssid="default"
   psk="defaultpsk"
   proto=WPA2
   key_mgmt=WPA-PSK
   pairwise=CCMP TKIP
   group=CCMP TKIP
}


/etc/wireless/wpa_profiles/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
update_config=1

network={
   ssid="default"
   psk="defaultpsk"
   proto=WPA
   key_mgmt=WPA-PSK
   pairwise=TKIP
   group=TKIP
}

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 28 Jul 2008, 06:05    Post subject:  

BarryK wrote:
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:
# modinfo rt73usb | grep '^description:'


That returns:
"Ralink RT73 USB Wireless LAN driver"

But of course that same info is already in /etc/networkmodules:

# cat /etc/networkmodules | grep 'rt73'
rt73usb "usb: Ralink RT73 USB Wireless LAN driver."

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Mon 28 Jul 2008, 12:57    Post subject:  

Quote:
iwconfig essid auto never worked for me for rt73usb or orinico or prism2.

Ok, I changed the "autoconnect" profile to use Managed.


Quote:
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.

I changed it back -- now it will always go and check if it actually is connected.


Quote:
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.

Ok, the max is now 12, but if all the interfaces that have been configured
are detected, it'll break the loop.


Quote:
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:
# modinfo rt73usb | grep '^description:'

I noticed you implemented something of this kind already, by looking in
/etc/networkmodules (I actually wrote a script for updating that file
for new kernels based on the modinfo output -- sent it to tempestuous a
while ago).

The problem I have with presenting that info is that it could be confusing
to the user, since they might not know which chip is in their device.
That's why I think using lsusb is good, since it will at least give the
right NIC manufacturer, which is what the user will know.

I've implemented your suggestion for now, but still prefer lsusb.


Quote:
Having completed the operation of connecting wlan1 to the network, there is a return to the main window, with this text at the top:

"NETWORK CONFIGURATION OF wlan1 SUCCESSFUL!
The configuration has been saved to file /etc/wlan1mode.
This file is read at bootup by /etc/rc.d/rc.network

I removed that. Might want to add some info later, but I don't know if
there's a point (it would be better to just explain everything in the man
page).


Quote:
After setting up my rt73usb interface, I rebooted, but didn't get any Blinky.

I looked in /tmp/bootsysinit.log and found this:

Code:
/etc/rc.d/rc.network: line 172: syntax error near unexpected token `}'
/etc/rc.d/rc.network: line 172: `}'

oops, that's the result of last-minute changes that weren't tested... fixed.


I've uploaded an updated attachment with all these updates (this time it
is properly tested...).

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Tue 29 Jul 2008, 06:19    Post subject:  

Oh dear, hit another problem. I just now booted my laptop, the profiles are as before, but this time no Blinky.

wlan1 is down, and /tmp/bootsysinit.log has this:
Code:
configuring network interface wlan1
wireless scan with iwlist failed... skipping interface


And /var/log/messages has this:
Code:
Jul 29 18:03:41 (none) local0.err dhcpcd[5272]: wlan1: dhcpcd not running

... a few lines repeating this message.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Tue 29 Jul 2008, 07:01    Post subject:  

Strange. I shutdown the laptop, started it again, this time I got Blinky.

/tmp/bootsysinit.log has this:

Code:
..Configuring interface wlan1 with iwconfig...

cheching if interface wlan1 is alive...
Info, wlan1: dhcpcd 3.1.8 starting
Info, wlan1: hardware address = 00:1c:f0:0a:53:f8
Info, wlan1: broadcasting for a lease
Debug, wlan1: sending DHCP_DISCOVER with xid 0x51992b6e
Debug, wlan1: waiting on select for 20 seconds
Debug, wlan1: waiting on select for 20 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 19 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: got a packet with xid 0x51992b6e
Info, wlan1: offered 10.1.1.3 from 10.1.1.1
Debug, wlan1: sending DHCP_REQUEST with xid 0x51992b6e
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 18 seconds
Debug, wlan1: waiting on select for 17 seconds
Debug, wlan1: got a packet with xid 0x51992b6e
Info, wlan1: checking 10.1.1.3 is available on attached networks
Debug, wlan1: sending ARP probe #1
Debug, wlan1: sending ARP probe #2
Debug, wlan1: sending ARP probe #3
Debug, wlan1: sending ARP claim #1
Debug, wlan1: sending ARP claim #2
Info, wlan1: leased 10.1.1.3 for 172800 seconds
Info, wlan1: no renewal time supplied, assuming 86400 seconds
Info, wlan1: no rebind time supplied, assuming 151200 seconds
Info, wlan1: adding IP address 10.1.1.3/24
Info, wlan1: adding default route via 10.1.1.1 metric 0
Info, wlan1: adding route to 169.254.0.0/16 metric 0
Debug, wlan1: writing /etc/resolv.conf
Debug, wlan1: writing /var/lib/dhcpcd/dhcpcd-wlan1.info
Debug, wlan1: exec "/etc/dhcpcd.sh" "/var/lib/dhcpcd/dhcpcd-wlan1.info" "new"
Debug, wlan1: forking to background
Success!


And /var/log/messages still has a couple of these:
Code:
Jul 30 03:01:54 (none) local0.err dhcpcd[5098]: wlan1: dhcpcd not running

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Tue 29 Jul 2008, 14:05    Post subject:  

BarryK wrote:
Oh dear, hit another problem. I just now booted my laptop, the profiles are as before, but this time no Blinky.

wlan1 is down, and /tmp/bootsysinit.log has this:
Code:
configuring network interface wlan1
wireless scan with iwlist failed... skipping interface

This would mean that the scan didn't find anything. The question is if it is related to some bug (like someone here who got a "interface doesn't support scanning" error, which I assumed came from firmware not being loaded yet (are we sure everything is ok if the interface is listed in "ifconfig -a"?).
I could add a test for when the scan returns nothing, sleep 1 and then try again.

Quote:
And /var/log/messages has this:
Code:
Jul 29 18:03:41 (none) local0.err dhcpcd[5272]: wlan1: dhcpcd not running

... a few lines repeating this message.

I think these messages can be ignored: every time it goes to configure an interface, it runs a clean_up_interface, which, among other things, runs dhcpcd -k $INTERFACE -- just in case. I'm assuming these errors come from that.

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Tue 29 Jul 2008, 18:52    Post subject:  

Dougal wrote:

This would mean that the scan didn't find anything. The question is if it is related to some bug (like someone here who got a "interface doesn't support scanning" error, which I assumed came from firmware not being loaded yet (are we sure everything is ok if the interface is listed in "ifconfig -a"?).

Well, I would like to upload 4.1alpha5 soon, so maybe I'll just stick in a 'sleep 1' after that ifconfig loop, in case it does need a little bit of extra time to settle sometimes.

But then, my rc.network goes straight ahead after the ifconfig loop without any sleep, and that works reliably.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4367
Location: Southeast Georgia, USA

PostPosted: Tue 29 Jul 2008, 22:41    Post subject:  

[quote="HairyWill"]
Dougal wrote:
For a long time I didn't even realise that the network wizard had a scan button.


Just tried Pwireless wireless scan and it discovered my wireless router then prompted for the WEP.

After I entered it the app asks if I want to use that connection which I did then it promptly locked up my computer so that I had to do a cold reboot.

This is on my Panasonic CF-28 laptop using a GigaFast USB modem (ZyDAS).

I have also tried the Scan feature inside of Setup - Network Wizard - Wireless window. It all looks good there but still fails to create a connection that Seamonkey or Sylpheed in 4.00 can use.

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 30 Jul 2008, 07:59    Post subject:  

Dougal,
Is there something you can do to cater for laptop people on-the-go who need to connect to the Internet at different places. If the profiles are based only only the mac address, doesn't this leave us with the same limitation as the old system?

In my case, I was in Perth at a relative's place, then I came home, but the same profile worked at home. The wireless networks are open at both places.

But, that won't always be the case. I do move around a lot, need to get online at many places. With a wired network, it is simpler, just use whatever dhcpd returns, but the wireless networks may have major differences.

Perhaps include something else as well as the mac address in the profile name? essid?

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 4 of 40 [596 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, ..., 38, 39, 40 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1293s ][ Queries: 12 (0.0070s) ][ GZIP on ]