Improved Network Wizard (and rc.network)

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#401 Post by sullysat »

What I need to know is what bootsysinit.log shows, since that's where the failure to connect on boot will show --
Here's the bootsysinit.log:

VERSION UPDATE
LOAD KERNEL MODULES
LOAD SWAP
MISC. SYSTEM SETUP
WAIT MODULES LOADED
ls: cannot access /sys/bus/pcmcia/devices/*/modalias: No such file or directory
USER SELECTED MODULES
SETUP SERVICES
RECOGNISE MEDIA DEVICES
Loading "us" keyboard map... Loading /usr/share/kbd/keymaps/i386/qwerty/us.map
Waiting for interfaces to initialize...MISC. DESKTOP STUFF
PERSONAL BOOT SCRIPT
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; No such device.
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; No such device.
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device wlan0 ; No such device.
ifconfig: SIOCGIFFLAGS: No such device
Error, wlan0: ioctl SIOCGIFHWADDR: No such device
.....cups: started scheduler.
Starting PCMCIA services:
..
configuring network interface wlan0
wireless scan with iwlist failed (no networks found)... skipping interface
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device wlan0 ; Invalid argument.
Error for wireless request "Set Frequency" (8B04) :
SET failed on device wlan0 ; Invalid argument.
but as you can see, the code seems to be working, so it must be something related to the HW initializing.
I agree completely. I just don't know enough about it (YET!) to figure it out. Please let me know what else I can do to help.

Thanks,
Sully

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

bootsysinit.log after manual wireless setup

#402 Post by dogone »

Dougal,
I'm among those poor souls for whom 4.1 (w/ Oct 16 release) does not retain wireless settings across a boot. So as usual, I re-entered my WPA connection settings this morning. Following your exchange with sullsat, I decided to look over my own bootsysinit.log. It's pretty scary reading. Perhaps it will help shed some light on yon problem.


VERSION UPDATE
LOAD KERNEL MODULES
LOAD SWAP
MISC. SYSTEM SETUP
WAIT MODULES LOADED
ls: cannot access /sys/bus/pcmcia/devices/*/modalias: No such file or directory
USER SELECTED MODULES
SETUP SERVICES
RECOGNISE MEDIA DEVICES
Loading "us" keyboard map... Loading /usr/share/kbd/keymaps/i386/qwerty/us.map
MISC. DESKTOP STUFF
PERSONAL BOOT SCRIPT

/dev/sda:
setting standby to 24 (2 minutes)
Waiting for interfaces to initialize...
configuring network interface wlan0
cups: started scheduler.
Starting PCMCIA services:
cat: /tmp/wpa_status.txt: No such file or directory
rm: cannot remove `/tmp/wpa_status.txt': No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed...
failed to configure wireless interface wlan0... skipping
35eb1eeac6692d1e1ee6dee76dceb44d307f122f317a64c10aaf6100b5150eb"'.
Line 16: WPA-PSK accepted for key management, but no PSK configured.
Line 16: failed to parse network block.
Failed to read or parse configuration '/etc/network-wizard/wireless/wpa_profiles/00:15:05:22:D0:65.WPA.conf'.
Waiting for connection...
trying to connect
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
error while running:
wpa_cli -i wlan0 status | grep 'wpa_state='
end

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

#403 Post by davids45 »

G'day,
The last patch seems to have fixed my erratic problems.
I made a fresh frugal of 4.1 with the latest network wizard as well as this full version, and if I go through the wizard step-by-step, I get a log-in. I see the wpa directory and dhcpcd file in /var/run.
My only problem seems now to be the same one the other recent posters have that the re-boot does not necessarily give the automatic log-on that we'd all like.
Nothing in /var/run when this re-boot failure happens, but a step-by-step through the wizard has so far been good.

Must be getting close to the final fix though.

David S.

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

Re: Issues - 4.1 on Thinkpad 600E

#404 Post by Dougal »

popee wrote:You're right, the bootsysinit file is indeed complaining about failing during the network scan. After bootup, however, I can right-click on the Connect icon and zip right onto the net w/ no problem. I even have WEP turned on.
So it must be a problem of the HW not being initialized properly when rc.network is run.
This can be solved by increasing the sleep time waiting for it, but I can't just increase it for everybody, since people with HW that initializes fast will want to be connected already when X starts!

So I need info on the different setups that have this problem, so that I can detect them and know to wait a little longer:
- which kernel module is used
- which kernel version (i.e. the one from 4.1 or 4.1retro)
- maybe some info about the device: pci ids (from the output of "elspci -l", for example), any possible errors seen in dmesg output etc.
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

#405 Post by Dougal »

sullysat wrote:Here's the bootsysinit.log:

Code: Select all

Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; No such device.
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; No such device.
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device wlan0 ; No such device.
ifconfig: SIOCGIFFLAGS: No such device
Error, wlan0: ioctl SIOCGIFHWADDR: No such device
This implies that the interface was not fully initialized yet... see my reply 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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Re: bootsysinit.log after manual wireless setup

#406 Post by Dougal »

dogone wrote:configuring network interface wlan0
cups: started scheduler.
Starting PCMCIA services:
These three lines seem to imply that configuring wlan0 started before CPMCIA was properly working... is it a PCMCIA NIC you're using?
35eb1eeac6692d1e1ee6dee76dceb44d307f122f317a64c10aaf6100b5150eb"'.
Line 16: WPA-PSK accepted for key management, but no PSK configured.
Line 16: failed to parse network block.
Failed to read or parse configuration '/etc/network-wizard/wireless/wpa_profiles/00:15:05:22:D0:65.WPA.conf'.
This means there might be a problem with that config file -- try looking at it and make sure it's ok. I don't know how that psk (the long hex number) got in the log, but it has a double-quote (") at the end, that might suggest the problem fixed in the 16th version of the wizard (was that configuration file created by an earlier version?).
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
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

Re: Issues - 4.1 on Thinkpad 600E

#407 Post by sullysat »

Dougal wrote:So it must be a problem of the HW not being initialized properly when rc.network is run.
This can be solved by increasing the sleep time waiting for it, but I can't just increase it for everybody, since people with HW that initializes fast will want to be connected already when X starts!
I'll be happy to increase the the sleep time and test it. What file is that in?
Dougal wrote:So I need info on the different setups that have this problem, so that I can detect them and know to wait a little longer:
- which kernel module is used
- which kernel version (i.e. the one from 4.1 or 4.1retro)
- maybe some info about the device: pci ids (from the output of "elspci -l", for example), any possible errors seen in dmesg output etc.
I don't know about the kernel module, but I'm running the retro kernel version of 4.1 with a generic wireless pcmcia card that THIS version of puppy sees as 'hostap_cs' (has always been 'orinoco_cs' in previous versions). The output of elspci -l is as follows:
Image

Hope this helps.
Sully

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

Re: Issues - 4.1 on Thinkpad 600E

#408 Post by Dougal »

sullysat wrote:I'll be happy to increase the the sleep time and test it. What file is that in?
/etc/rc.d/rc.network
You'll have to add a sleep after the MAXWAIT loop, since that loop quits the moment the interface is found (which in your case is not enough).
I don't know about the kernel module, but I'm running the retro kernel version of 4.1 with a generic wireless pcmcia card that THIS version of puppy sees as 'hostap_cs' (has always been 'orinoco_cs' in previous versions).
The reason it changed is that I found out that hostap and orinoco overlap, but apparently hostap is preferable (it's newer), so Barry added an override.

I have a feeling this might actually be a problem with PCMCIA, where Barry actually needs to make sure it's initialized before starting rc.network...

What I can do, is add an extra sleep if a pcmcia networking module is loaded...
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

#409 Post by prit1 »

Dougal,

I am having problems with the Network Wizard in Puppy 4.1. I then tried downloading the latest from this thread. Still not working. Atleast now I can get to the Ndiswrapper page where it lets me select an .inf file. But bcmwl5.inf which is for Broadcom that works in Ubuntu and Puppy 4.00 is not working using this Network Wizard.

When I load the .inf file, it says, driver present. But then comes back with the message - no new interfaces found and asks me to unload.

Please help.
[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
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#410 Post by Dougal »

prit1 wrote:When I load the .inf file, it says, driver present. But then comes back with the message - no new interfaces found and asks me to unload.
Did you remove first the native module that might have been loaded?
The "bcm" part makes me think of Broadcom... if the native driver is b43, you'll need to blacklist the "ssb" module (in the Boot Manager), since that's the one that actually takes hold of the device.
If that's not the case, you might want to have a look at the output of dmesg and see if loading that driver with ndiswrapper produced any error messages.
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

#411 Post by Dougal »

I've made an attempt at solving the problem with PCMCIA NICs not being configured at boot.
I've added a check to see if any of the interfaces (in /sys/class/net) is pcmcia and, if so, sleep for an extra 10 seconds.

This file should be gunzipped and go in /etc/rc.d. It might need to be made executable to work (chmod +x rc.network).
Attachments
rc.network.gz
(6.49 KiB) Downloaded 588 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

#412 Post by prit1 »

Dougal,

The default linux driver could not have loaded as it does not show an interface. Anyway, I checked the blacklist.

Here is the output from the dmesg:

Code: Select all

ndiswrapper version 1.53 loaded (smp=no, preempt=no)
ndiswrapper: driver bcmwl5 (Broadcom,09/20/2007, 4.170.25.12) loaded
ACPI: PCI Interrupt 0000:05:00.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:05:00.0 to 64
ndiswrapper: using IRQ 10
wlan0: ethernet device 00:1f:e2:b4:58:3e using NDIS driver: bcmwl5, version: 0x4aa190c, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4315.5.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
usbcore: registered new interface driver ndiswrapper
ndiswrapper: device wlan0 removed
ACPI: PCI interrupt for device 0000:05:00.0 disabled
usbcore: deregistering interface driver ndiswrapper
The last few lines come after I am told by the wizard that no interfaces are found and that I need to unload it.
[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
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#413 Post by Sit Heel Speak »

Hi Dougal,

I'm using Puppy 4.1 (MU's k2.6.27 smp version, 2nd build), and the October 16th network-wizard build, on the rig described in my signature. No wireless lan here, just two onboard e1000 Intel gigabit ethernet ports. eth0 connects to my adsl "modem" and eth1 connects through a switching hub to other local computers.

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.

I would guess that what I need, is for the network-wizard to have the ability to set the default route (i.e. gateway machine's IP) for each of my two NIC's to its own gateway IP. For example: if eth1 is set to IP=192.168.1.13, netmask=255.255.255.0 default gateway=192.168.1.5, DNS1=192.168.1.5 DNS2 not set,

then it is possible to ping local machine 192.168.1.5, I can open its shares using PNetHood or gFTP.

But 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:

***
Error!
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
***

If I disconnect the cable from eth1 and reboot, I have no trouble assigning the static IP 10.0.0.13 to eth0.

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

Thanks for your help,
Philip

PS I have a Microsoft MN-500 wireless base station, no software, if anyone wants it PM me, you can have it for postage. Weight is about 1 pound (453g) including the 120VAC 60Hz AC adapter.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#414 Post by MU »

Dougal, do you plan to localize the wizard?
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
sullysat
Posts: 367
Joined: Tue 16 Oct 2007, 19:23
Location: San Antonio, TX

#415 Post by sullysat »

Dougal wrote:I've made an attempt at solving the problem with PCMCIA NICs not being configured at boot.
I've added a check to see if any of the interfaces (in /sys/class/net) is pcmcia and, if so, sleep for an extra 10 seconds.
Hey Dougal, sorry for the delayed response but life got in the way for a couple days.

I tried increasing the MAXWAIT to 20, then tried swapping the existing network file for the one you built. Neither of these corrected the issue.

Sully

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

#416 Post by Dougal »

prit1 wrote:Here is the output from the dmesg:

Code: Select all

wlan0: ethernet device 00:1f:e2:b4:58:3e using NDIS driver: bcmwl5, version: 0x4aa190c, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4315.5.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
usbcore: registered new interface driver ndiswrapper
ndiswrapper: device wlan0 removed
Well, the interface does seem to appear, so the question is why the wizard doesn't find it.

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

#417 Post by Dougal »

sullysat wrote:I tried increasing the MAXWAIT to 20, then tried swapping the existing network file for the one you built. Neither of these corrected the issue.
Changing MAXWAIT would not have any effect, since we've already established that
the interface is seen in the output of ifconfig (which will stop the loop before
MAXWAIT time has passed).

You should look if booting with the modified rc.network gave any different messages
than before.

You could also try increasing the sleep in line 291 and see if that helps.
It would also be good if you try adding before line 291 the follwing:

Code: Select all

cat /sys/class/net/*/device/modalias
...just to make sure my attempt fix actually does something.

Also, try looking at the output of dmesg and see if you can find anything about
pcmcia initializing and if it's done before/after the code in rc.network is
run.
(The rc.network code should start with lines like "eth0: link down", then do the
sleeping, then generate more lines like that.)
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
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#418 Post by Béèm »

MU wrote:Dougal, do you plan to localize the wizard?
Mark
Good question.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

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

#419 Post by BarryK »

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

This "fixes" the handling of blacklisting.

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've only done some basic testing. Haven't created a diff file. Done quickly, and Dougal might like to tidy it up a bit.

My edits have "v411" in the comments.
Attachments
net-setup.sh.gz
(17.61 KiB) Downloaded 581 times
[url]https://bkhome.org/news/[/url]

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

Given up on Network Wizard for the time being

#420 Post by dogone »

My appologies to Dogual and all, but I've finally caved with regard to wireless problems under Puppy post 4.0. I have disabled rc.network (chmod -x) and am employing my "bringup_wireless" script in rc.local (or /root/Startup) to bring up the pcmcia wireless cards (bcm43xx and ath_pci) on my two laptops. The script works flawlessly in both cases.

Desperate times call for desparate measures. 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.

Perhaps the following will help some of you. Many thanks to those who contributed and apologies for my own the crude coding. There's probably a better way, but this works.

#start dogone's wireless startup script

#!/bin/sh
# inspired by forum posts in an effort to autostart wireless
#shouldn't need xorg input driver as this is cli
#modprobe evdev
#reload card driver to be sure
rmmod bcm43xx
modprobe bcm43xx
#we don't appear to need sleep
#sleep 5s
#net interface must be up
ifconfig wlan0 up
#make sure nothing's left from prior attempt
rm -fr /var/run/*.pid
rm -f /var/run/wpa_supplicant/wlan0
#establish a wpa encrypted connection
wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
#this is done automagically
#route add 192.168.0.5 wlan0
#we don't appear to need sleep here either
#sleep 3s
#clear old dhcpcd info
rm -f /var/lib/dhcpcd/*.info
#get ip address and were done
dhcpcd -t 30 -h puppypc -d wlan0

#end dogone's bringup wireless script


#start dogone's wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=0
network={
ssid="61599243"
scan_ssid=1
psk="????????????"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
}

#end dogone's wpa_supplicant.conf

Post Reply