Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147615 - Baselayout-1.12.5 doesn't set up wireless interface
Summary: Baselayout-1.12.5 doesn't set up wireless interface
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-14 14:48 UTC by Geoffrey Clements
Modified: 2006-09-27 13:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Clements 2006-09-14 14:48:38 UTC
Just emerged baselayout-1.12.5 and my wireless interface stopped working.
The ESSID and channel parameters are not set although the encryption key is.  This prevents connection with the access point.

Wireless interface is wlan0 provided by ndiswrapper-1.2-r1.

Downgrading to baselayout-1.12.4-r7 cures this problem.

$ emerge --info
Portage 2.1.1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(TM) XP 2500+
Gentoo Base System version 1.12.4
Last Sync: Thu, 14 Sep 2006 17:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://gentoo.modulix.net/gentoo/ http://gentoo.mirror.solnet.ch"
LINGUAS="en en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X a52 aac acpi alsa apm arts audiofile bash-completion berkdb bitmap-fonts bzip2 cdinstall cdparanoia cdr cli crypt dbus dlloader doc dri dvd dvdr dvdread eds elibc_glibc emboss encode exif expat fam ffmpeg flac gd gdbm gif glut gmp gpm gstreamer gtk gtk2 hal idn imagemagick imlib input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog java jpeg kde kdeenablefinal kernel_linux lcms lesstif libg++ linguas_en linguas_en_GB mad mikmod mmx mng motif mp3 mpeg ncurses nls nptl nsplugin nvidia ogg opengl oss pam pcre pda perl png postgres pppd python qt3 qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svga symlink tcltk tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa vorbis wifi win32codecs wmf xine xml xmms xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-09-15 02:04:31 UTC
Please attach your conf.d/net
Comment 2 Geoffrey Clements 2006-09-15 11:50:07 UTC
(In reply to comment #1)
> Please attach your conf.d/net
> 

I have included /etc/conf.d/net below.  Also I have included /etc/conf.d/wireless (with the encryption key removed ;-) as it is some of these parameters that are not being set; the interface parameters as reported by ifconfig are always set correctly.

$ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# see /etc/conf.d/net.example and put your configuration in this file.

config_wlan0=(
        "81.2.88.203 netmask 255.255.255.248 broadcast 81.2.88.207"
)

routes_wlan0=(
        "default via 81.2.88.201"
)

config_eth0=(
        "192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"
)

# cat /etc/conf.d/wireless
essid_wlan0="SOLSTICE"
mode_wlan0="Managed"
channel_wlan0="11"
key_SOLSTICE="<key>"
Comment 3 Tuan Van (RETIRED) gentoo-dev 2006-09-15 18:57:53 UTC
from good baselayout (1.12.4-r7):
# /etc/init.d/net.ra0 restart
 * Stopping ra0
 *   Bringing down ra0
 *     Shutting down ra0 ...                                              [ ok ]
 * Starting ra0
 *   Configuring wireless network for ra0
 *     ra0 connected to ESSID "sff"
 *     in managed mode on channel 6 (WEP enabled - restricted)
 *   Bringing up ra0
 *     192.168.0.4                                                        [ ok ]
 *   Adding routes
 *     default via 192.168.0.2 ...                                        [ ok ]
mail ~ # emerge baselayout -vp

from bad baselayout (1.12.5):
# /etc/init.d/net.ra0 restart
 * Caching service dependencies ...                                       [ ok ]
 * Stopping ra0
 *   Bringing down ra0
 *     Shutting down ra0 ...                                              [ ok ]
 * Starting ra0
 *   Configuring wireless network for ra0
 *     ra0 connected to ESSID "sff"
 *     in managed mode on channel 6 (WEP enabled - open)
 *   Bringing up ra0
 *     192.168.0.4                                                        [ ok ]
 *   Adding routes
 *     default via 192.168.0.2 ...                                        [ ok ]

the good one said WEP enabled - restricted which is right as I am using SHARED authentication mode.
Comment 4 Tuan Van (RETIRED) gentoo-dev 2006-09-15 19:28:43 UTC
the offended lines are:
--- /lib/rcscripts/net/iwconfig.sh      2006-09-15 18:56:09.000000000 -0700
+++ ./lib/rcscripts/net/iwconfig.sh     2006-09-14 03:11:34.000000000 -0700
@@ -740,6 +738,11 @@
        iwconfig "${iface}" rate auto 2>/dev/null
        iwconfig "${iface}" rts auto 2>/dev/null
        iwconfig "${iface}" frag auto 2>/dev/null
+
+       # Release the AP forced
+       # Must do ap and then essid otherwise scanning borks
+       iwconfig "${iface}" ap off 2>/dev/null
+       iwconfig "${iface}" essid off 2>/dev/null
 }

 # void iwconfig_strip_associated(char *iface)


diff of bug output:
--- bad.rc      2006-09-15 19:23:01.000000000 -0700
+++ good.rc     2006-09-15 19:23:35.000000000 -0700
@@ -4506,8 +4506,6 @@
 + iwconfig ra0 rate auto
 + iwconfig ra0 rts auto
 + iwconfig ra0 frag auto
-+ iwconfig ra0 ap off
-+ iwconfig ra0 essid off
 + iwconfig ra0 txpower off
 + for mod in '${MODULES[@]}'
 + is_function rename_post_stop
@@ -9382,8 +9380,6 @@
 + iwconfig ra0 rate auto
 + iwconfig ra0 rts auto
 + iwconfig ra0 frag auto
-+ iwconfig ra0 ap off
-+ iwconfig ra0 essid off
 + iwconfig_user_config ra0
 + local iface=ra0 conf= aconf= ifvar=
 + [[ -z '' ]]
@@ -9490,7 +9486,7 @@
 ++ [[ ra0       RT61 Wireless  ESSID:"sff"
           Mode:Managed  Frequency:2.437 GHz  Bit Rate=54 Mb/s
           RTS thr:off   Fragment thr:off
-          Encryption key:7468-616E-3232-3130-3038-3239-76   Security mode:open
+          Encryption key:7468-616E-3232-3130-3038-3239-76   Security mode:restricted
           Link Quality=52/100  Signal level:-73 dBm  Noise level:-111 dBm
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0 =~
@@ -9500,11 +9496,11 @@
 +++ LC_ALL=C
 +++ /sbin/iwconfig ra0
 +++ sed -n -e 's/^.*Security mode:\(.*[^ ]\).*/\1/p'
-++ mode=open
-++ [[ -n open ]]
-++ mode=' - open'
-++ echo '(WEP enabled - open)'
-+ w='(WEP enabled - open)'
+++ mode=restricted
+++ [[ -n restricted ]]
+++ mode=' - restricted'
+++ echo '(WEP enabled - restricted)'
++ w='(WEP enabled - restricted)'
 + iwconfig ra0 essid sff
 + LC_ALL=C
 + /sbin/iwconfig ra0 essid sff
@@ -9518,7 +9514,7 @@
 + [[ -n '' ]]
 + conf='iwpriv_sff[@]'
 + [[ -n '' ]]
-+ vebegin 'Connecting to "sff" in managed mode (WEP enabled - open)'
++ vebegin 'Connecting to "sff" in managed mode (WEP enabled - restricted)'
 + [[ no != \y\e\s ]]
 + [[ sff != \a\n\y ]]
 + is_function preassociate
@@ -9573,21 +9569,21 @@
 ++ [[ ra0       RT61 Wireless  ESSID:"sff"
           Mode:Managed  Frequency:2.437 GHz  Bit Rate=54 Mb/s
           RTS thr:off   Fragment thr:off
-          Encryption key:7345-8700-0000-0000-0000-0000-00   Security mode:open
+          Encryption key:7345-8700-0000-0000-0000-0000-00   Security mode:restricted
           Link Quality=52/100  Signal level:-73 dBm  Noise level:-111 dBm
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0 =~
  +Encryption key:[0-9,A-F] ]]
 ++ status=enabled
 +++ iwconfig ra0
-+++ sed -n -e 's/^.*Security mode:\(.*[^ ]\).*/\1/p'
 +++ LC_ALL=C
 +++ /sbin/iwconfig ra0
-++ mode=open
-++ [[ -n open ]]
-++ mode=' - open'
-++ echo '(WEP enabled - open)'
-+ local 'wep_status=(WEP enabled - open)'
++++ sed -n -e 's/^.*Security mode:\(.*[^ ]\).*/\1/p'
+++ mode=restricted
+++ [[ -n restricted ]]
+++ mode=' - restricted'
+++ echo '(WEP enabled - restricted)'
++ local 'wep_status=(WEP enabled - restricted)'
 ++ iwgetid --raw --channel ra0
 ++ LC_ALL=C
 ++ /sbin/iwgetid --raw --channel ra0
@@ -9627,12 +9623,12 @@
 + return 0
 + LAST_E_CMD=einfo
 + return 0
-+ einfo 'in managed mode on channel 6 (WEP enabled - open)'
-+ einfon 'in managed mode on channel 6 (WEP enabled - open)\n'
++ einfo 'in managed mode on channel 6 (WEP enabled - restricted)'
++ einfon 'in managed mode on channel 6 (WEP enabled - restricted)\n'
 + [[ no == \y\e\s ]]
 + [[ yes != \y\e\s ]]
-+ echo -ne ' *     in managed mode on channel 6 (WEP enabled - open)\n'
- *     in managed mode on channel 6 (WEP enabled - open)
++ echo -ne ' *     in managed mode on channel 6 (WEP enabled - restricted)\n'
+ *     in managed mode on channel 6 (WEP enabled - restricted)
 + LAST_E_CMD=einfon
 + return 0
 + LAST_E_CMD=einfo
Comment 5 Geoffrey Clements 2006-09-16 03:01:49 UTC
I've had a chance to do a little investigation.  I set up the PC to boot without the wlan0 interface and I deleted the net.wlan0 symlink to prevent it being run by hotplug.

I created the following script called setnet:
ifconfig wlan0 81.2.88.203 netmask 255.255.255.248 broadcast 81.2.88.207
route add default gw router
iwconfig wlan0 mode managed
iwconfig wlan0 essid "SOLSTICE"
iwconfig wlan0 key <key>
iwconfig wlan0 channel 8
iwconfig

(note that I have changed the channel since the previous post as another part of the investigation)

Then did the following:
# modprobe ndiswrapper
# ./setnet

This did _not_ work.

I did rmmod ndiswrapper after all the following tries.

I changed the order of the iwconfig comands going through all permutations.  This did _not_ work.

I then added sleep 1 commands between the iwconfig commands.  Ran through a few permutations but the following was the only one I could get to work:

# cat setnet
ifconfig wlan0 81.2.88.203 netmask 255.255.255.248 broadcast 81.2.88.207
route add default gw router
iwconfig wlan0 mode managed
iwconfig wlan0 essid "SOLSTICE"
sleep 1
iwconfig wlan0 key <key>
sleep 1
iwconfig wlan0 channel 8
iwconfig

So I guess we have a timing problem associated with ndiswrapper.  But I'm not sure where to go from here.
Comment 6 Geoffrey Clements 2006-09-16 16:18:00 UTC
Ok, after more experimentation I have finally got baselayout-1.12.5 to work with the wireless interface!

My access point was configured to not broadcast the ESSID hence the "essid_wlan0="SOLSTICE"" command in /etc/conf.d/wireless.  I have now configured the access point to broadcast the ESSID and the /etc/conf.d/wireless file now becomes:

# cat /etc/conf.d/wireless
key_SOLSTICE="<key>"
preferred_aps=( "SOLSTICE" )


and that does the trick :-)
Comment 7 David Grant 2006-09-17 17:34:41 UTC
I had a similar problem when I upgraded to 1.12.5:

Failed configuration:
essid_wlan0="DavidandNasha"
key_DavidandNasha="B61344C82A"

What made it work:
preferred_aps=( "DavidandNasha" )
key_DavidandNasha="B61344C82A"
associate_order="preferredonly" #optional

I was getting something like this while starting net.wlan0:

wlan0 connected to ESSID "" at 00:00:00:00:00:00

and then dhcp would fail. Everything's working now but it took 2 days to fix because I never suspected it was a problem in my /etc/conf.d/wireless file.
Comment 8 David Grant 2006-09-17 17:41:04 UTC
By the way, this only caused a problem with ndiswrapper, with the acx drivers, it was a non-issue. (I cannot use acx drivers though because my connection gets dropped after a few hours and other problems).
Comment 9 Geoffrey Clements 2006-09-18 01:25:46 UTC
(In reply to comment #7)

> because I never suspected it was a problem in my /etc/conf.d/wireless file.

Well to be fair I don't think we can blame baselayout here although I'm not speaking with any authority or knowledge on baselayout.  I suspect that the new baselayout is tickling a bug/timing issue with iwconfig/ndiswrapper but maybe uberlord can confirm or deny.

BTW I wouldn't post your key. DavidandNasha may be enough information for somebody to identitfy you and make use of your wireless network.  Now would be a good time to change the key!  Ok - maybe I'm paranoid but you never know.
Comment 10 David Grant 2006-09-18 01:51:56 UTC
I'm pretty sure it is a problem with baselayout. I tested it repeatedly (emerged various baselayout versions probably 20-30 times) and even to the point where I was rebooting my system between emerges just to make sure. In the end I flipped back and forth between 1.12.15 and the version right before that several times and I was able to confirm that 1.12.15 was causing the problem.

At least it works for me now, with the preferred_aps thing.
Comment 11 chris morgan 2006-09-24 11:45:24 UTC
i've had a similar problem with baselayout-1.12.5 which went away when i reverted back to baselayout-1.11.15-r3.

i am running wpa_supplicant with ipw2200. net.eth1 would complete but an ip address would never get assigned. my log contained the following repeated over and over. 

Sep 20 11:22:29 pluto wpa_cli: interface eth1 CONNECTED
Sep 20 11:22:31 pluto dhcpcd[32475]: MAC address = 00:12:f0:03:17:f9
Sep 20 11:22:31 pluto dhcpcd[32475]: verified 10.3.6.10 address is not in use
Sep 20 11:22:31 pluto dhcpcd[32475]: your IP address = 10.3.6.10
Sep 20 11:22:31 pluto ipw2200: Firmware error detected.  Restarting.
Sep 20 11:22:31 pluto wpa_cli: interface eth1 DISCONNECTED
Sep 20 11:22:33 pluto dhcpcd[32477]: terminating on signal 15
Comment 12 Roy Marples (RETIRED) gentoo-dev 2006-09-24 12:43:11 UTC
(In reply to comment #11)
> i've had a similar problem with baselayout-1.12.5 which went away when i
> reverted back to baselayout-1.11.15-r3.
> Sep 20 11:22:31 pluto ipw2200: Firmware error detected.  Restarting.
> Sep 20 11:22:31 pluto wpa_cli: interface eth1 DISCONNECTED
> Sep 20 11:22:33 pluto dhcpcd[32477]: terminating on signal 15

That's because baselayout-1.11 does not respond to wpa_cli events whereas 1.12 does. That is an ipw2200 and unrelated to this bug.
Comment 13 Roy Marples (RETIRED) gentoo-dev 2006-09-27 07:23:16 UTC
The initial bug report is invalid, as sometimes we cannot connect with SSID is not broadcast. This is due to driver/AP/hardware issues and not something that baselayout can easily "fix".

Other reports here are just noise, so open new bugs if you think you still have issues.
Comment 14 David Grant 2006-09-27 10:55:56 UTC
I think the fact that this:

essid_wlan0="DavidandNasha"
key_DavidandNasha="XXXXXXXXXX"

worked before and now no longer works is a legitimate bug and this change in baselayout's behaviour should have been accompanied by an ewarn message. I now have my ELOG setup and I actually do read those messages. It is a bug that there was no warning for this and it should be fixed.

For those new to this, what made it work is:
key_DavidandNasha="XXXXXXXXX"
preferred_aps=( "DavidandNasha" )

A warning telling me that I may need to put in a preferred_aps=() line in my wireless config would make a lot of sense. I understand totally what you mean by it being a driver/AP/hardware issue, but the truth is that the baselayout change does cause breakage for some people and I think if we can avert that with a simple warning then it should be done. My personal opinion is that we can never have too many warnings on package upgrades.
Comment 15 Roy Marples (RETIRED) gentoo-dev 2006-09-27 11:00:32 UTC
(In reply to comment #14)
> I think the fact that this:
> 
> essid_wlan0="DavidandNasha"
> key_DavidandNasha="XXXXXXXXXX"
> 
> worked before and now no longer works is a legitimate bug

Yeah, in the driver.

essid_wlan="UberNET"
key_UberNET="XXXXX"

Works for me on my ipw2200, prism54, madwifi, rt2500 (also using rt2x00 driver) cards just fine.
Comment 16 David Grant 2006-09-27 11:06:40 UTC
Interesting, I wish I was using a real solid native wireless device drier. It seems like it might just be ndiswrapper? as that's what Geoffrey and I are using? Could there be a brief warning targetted at "certain" ndiswrapper users?
Comment 17 Roy Marples (RETIRED) gentoo-dev 2006-09-27 11:11:11 UTC
(In reply to comment #16)
> Interesting, I wish I was using a real solid native wireless device drier. It
> seems like it might just be ndiswrapper? as that's what Geoffrey and I are
> using? Could there be a brief warning targetted at "certain" ndiswrapper users?
> 

ndiswrapper is always a shot in the dark as it could be a bug in ndiswrapper by itself, a bug in the windows driver, or a bug caused by the combination of the two.

Comment 18 David Grant 2006-09-27 11:14:06 UTC
Yeah I was thinking that. Maybe this bug will convince some of us to look hard for a card with native drivers.
Comment 19 Geoffrey Clements 2006-09-27 13:05:42 UTC
(In reply to comment #18)
> Maybe this bug will convince some of us to look hard
> for a card with native drivers.
> 

Or check out the latest open source drivers.  That's what I did and found that the latest driver works with my card (I last tried it about 9 months ago when it didn't work) and I've now dumped ndiswrapper.  Yes, I was lucky but it may be worth a look.

My card is a Netgear WG311v2 with the Texas Instruments chipset. I found that the acx driver in portage (stable), net-wireless/acx-0.3.35, works fine.
Comment 20 David Grant 2006-09-27 13:13:32 UTC
Hehe, my card (a Linksys PCMCIA card) has the exact same chipset as you. When I tried acx it did work (even with my old /etc/conf.d/wireless config, without the prefered_aps line). The only problem with acx is that my connection dies after a while and I have to restart it. The other problem is that restarting it doesn't seem to work.

Looks like this bug maybe only affects people with ndiswrapper and the acx chipset?