Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

problem starting wlan automatically [SOLVED]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
menschmeier
l33t
l33t
User avatar
Posts: 727
Joined: Wed Dec 15, 2004 8:21 am

problem starting wlan automatically [SOLVED]

  • Quote

Post by menschmeier » Mon Jan 24, 2005 12:17 am

Hello,

my WLAN (centino laptop, ipw2100 driver) is running well, but I have a problem starting it automatically while booting. So when the system is up I have to call a script to configure the wireless nic:
/usr/sbin/iwconfig eth1 essid MYESSID
/usr/sbin/iwconfig eth1 nick MYNICKNAME
/usr/sbin/iwconfig eth1 key s:MYPASSWD

after doing this everything is alright:
eth1 IEEE 802.11b ESSID:"MYESSID" Nickname:"MYNICKNAME"
Mode:Managed Frequency:2.437 GHz Access Point: 00:A0:C5:60:D9:07
Bit Rate=11 Mb/s Tx-Power=32 dBm
Retry:on RTS thr=2304 B Fragment thr:off
Encryption key:636F-5B65-346D-6561-6E64-3475-33 Security mode:restricted
Power Management:off
Link Quality=100/100 Signal level=-46 dBm Noise level=-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

So tried then to configure the /etc/conf.d/wireless:
essid_eth1="MYESSID"
mode_eth1="managed"
iwconfig_eth1="essid MYESSID"
key_wireless="636F-5B65-346D-6561-6E64-3475-33"

But this didn't work. I tried a lot but now I am clueless.

Thanx for any hint
Last edited by menschmeier on Fri Jan 28, 2005 9:58 am, edited 1 time in total.
Please notice the back of this message.
Top
Keiss
n00b
n00b
User avatar
Posts: 43
Joined: Sun Sep 19, 2004 8:13 pm
Location: Prague, Czech Republic

  • Quote

Post by Keiss » Mon Jan 24, 2005 8:24 am

Hi,
what exactly happens when you run /etc/init.d/net.eth1 start ?

Keiss
Top
menschmeier
l33t
l33t
User avatar
Posts: 727
Joined: Wed Dec 15, 2004 8:21 am

  • Quote

Post by menschmeier » Mon Jan 24, 2005 8:55 am

Hi,

the interface eth1 will be started correctly with the call /etc/init.d/net.eth1 start. I gets its IP address and so, I do not use DHCP but static IP.

When the system is up I got the following:
# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:F1:00:52:9A
inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0xe000 Memory:d0200000-d0200fff


# iwconfig
eth1 IEEE 802.11b ESSID:"" Nickname:"ipw2100"
Mode:Managed Frequency:2.412 GHz Access Point: 00:00:00:00:00:00
Bit Rate=0 kb/s Tx-Power=32 dBm
Retry:on RTS thr=2304 B Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Later I have to call my script to set iwconfig the right way. It seems that /etc/conf.d/wireless is never called ...
Please notice the back of this message.
Top
Keiss
n00b
n00b
User avatar
Posts: 43
Joined: Sun Sep 19, 2004 8:13 pm
Location: Prague, Czech Republic

  • Quote

Post by Keiss » Mon Jan 24, 2005 11:30 pm

menschmeier wrote: the interface eth1 will be started correctly with the call /etc/init.d/net.eth1 start. I gets its IP address and so, I do not use DHCP but static IP.
...
Later I have to call my script to set iwconfig the right way. It seems that /etc/conf.d/wireless is never called ...
Well , i have the ipw220 and running the unstable baselayout (thi package includes the init scripts and configs for wireless/network cards ) , the only thing i set is the preferred_aps=("ESS1" "ESS2") and it runs ok, hope it helps , other than that i am clueless too :(. Good luck.

Keiss
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

Re: problem starting wlan automatically

  • Quote

Post by UberLord » Tue Jan 25, 2005 9:39 am

menschmeier wrote: So tried then to configure the /etc/conf.d/wireless:
essid_eth1="MYESSID"
mode_eth1="managed"
iwconfig_eth1="essid MYESSID"
key_wireless="636F-5B65-346D-6561-6E64-3475-33"
This config may be better

Code: Select all

key_MYESSID="636F-5B65-346D-6561-6E64-3475-33"
preferred_aps=( "MYESSID" )
But then, your ESSID may be "wireless", in which case

Code: Select all

key_wireless="636F-5B65-346D-6561-6E64-3475-33"
preferred_aps=( "wireless" )
But this didn't work. I tried a lot but now I am clueless.
Maybe if you posted the error of it not working we could help.
Top
AbieS
n00b
n00b
Posts: 2
Joined: Mon Jan 24, 2005 1:18 pm

  • Quote

Post by AbieS » Tue Jan 25, 2005 10:18 am

Hi,

I've recently installed gentoo on my HP / Compaq nx9110 laptop with a Broadcom BCM4306 wireless nic. I am using ndiswrapper and Windows driver and have emerged baselayout-1.11.8
I seem to have the same problem as menschmeier. If I try to start my wireless I get the following:

Code: Select all

asterix ~ # /etc/init.d/net.wlan0 start
 * Starting wlan0
 *    Configuring wireless network for wlan0
 *       wlan0 connected to "Abie Home Lan" at 00:12:17:C8:76:26
 *       in managed mode (WEP enabled - restricted)
 *    Bringing up wlan0
 *       192.168.1.91                                                                               [ !! ]
After running this I can sart the connection manually with

Code: Select all

asterix ~ # ifconfig wlan0 up
asterix ~ # route add default gw 192.168.1.1
and everything is OK.

It seems that the /etc/conf.d/wireless gets read and processed because running iwconfig after attempting the automatic start (and before manually bringing the interface up) produce the following:

Code: Select all

asterix ~ # iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11g  ESSID:"Abie Home Lan"  Nickname:"Abie Home Lan"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:12:17:C8:76:26
          Bit Rate=54 Mb/s   Tx-Power:24 dBm
          RTS thr=2347 B   Fragment thr=2346 B
          Encryption key:35AD-FB9C-08   Security mode:restricted
          Power Management:off
          Link Quality:100/100  Signal level:-63 dBm  Noise level:-256 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:35  Invalid misc:22821   Missed beacon:0

My net and wireless config files are -

net:

Code: Select all

dhcpcd_eth0="-t 5"
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 10"
and wireless:

Code: Select all

key_Abie_Home_Lan="35AD-FB9C-08 enc restricted"
preferred_aps=( "Abie Home Lan" )
channel_wlan0="11"
config_Abie_Home_Lan=( "192.168.1.91 netmask 255.255.255.0 broadcast 192.168.1.255" )
routes_Abie_Home_Lan=("default gw 192.168.1.1")
Why does it not start automatically?
Top
AbieS
n00b
n00b
Posts: 2
Joined: Mon Jan 24, 2005 1:18 pm

  • Quote

Post by AbieS » Thu Jan 27, 2005 12:10 pm

Well, I solve my problem with a hack!

There is a check in the ifconfig_add_address() function in the /lib/rcscripts/net.modules.d/ifconfig script that checks for multiple ip numbers (wlan0:0, wlan0:1 etc) that truly believes I am trying to add another ip number to my interface when in fact it does not even have the first one assigned!!

I just commented the whole pice of code that attempts to assign multiple addresses and now it works beutifully. I don't need more than one ip anyway.

Extract from /lib/rcscripts/net.modules.d:

Code: Select all

ifconfig_add_address() {
        local iface=${1} i=0

        # Extract the config
        local -a config=( "$@" )
        config=( ${config[@]:1} )
        if [[ ${config[0]} == *:* ]]; then
                # Support IPv6 - nice and simple
                config[0]="inet6 add ${config[0]}"
        else
                # IPv4 is tricky - ifconfig requires an aliased device
                # for multiple addresses
#               if ifconfig ${iface} | grep -v Scope | xargs | grep -Eq "\<addr:.*" ; then
#                       # Get the last alias made for the interface and add 1 to it
#                       i=$( ifconfig | tac | grep -m 1 -o "^${iface}:[0-9]*" | awk -F: '{ print $2 }' )
#                       i=${i:-0}
#                       (( i++ ))
#                       iface=${iface}:${i}
#               fi

                # Support iproute2 style config where possible
                config=( "${config[@]//brd/broadcast}" )
                config=( "${config[@]//peer/pointtopoint}" )
        fi

        ifconfig ${iface} ${config[@]} &>${devnull}
        return $?
}
I guess this is the price you have to pay for emerging masked packages!

Hope this helps somebody.
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Thu Jan 27, 2005 12:47 pm

Well, that sort of works I guess :)

A fix we made in baselayout-1.11.8 for a sort of unrelated bug exposed this bug.

Rest assured that this error will be fixed in baselayout-1.11.9
Top
menschmeier
l33t
l33t
User avatar
Posts: 727
Joined: Wed Dec 15, 2004 8:21 am

  • Quote

Post by menschmeier » Thu Jan 27, 2005 3:36 pm

Thany you very much for your asdvises, but I still have the same problem.

I updated my /etc/conf.d/wireless, now it is:

Code: Select all

key_mysystem="636F-6B65-346D-6561-6E64-3475-33"
preferred_aps=( "mysystem" )
I also checked my baselayout version, it must be very new, but it is far away from 1.11.9 ...

Code: Select all

*  sys-apps/baselayout
      Latest version available: 1.9.4-r6
      Latest version installed: 1.9.4-r6
So maybe I have to try AbiS hack ... or get baselayout 1.11.9 somehow

Unfortunately I do not have an error message, the system is quite silent in this case ...
All I can see with dmesg is:

Code: Select all

...
ipw2100: Intel(R) PRO/Wireless 2100 Network Driver, 0.56
ipw2100: Copyright(c) 2003-2004 Intel Corporation
ACPI: PCI interrupt 0000:02:02.0[A] -> GSI 5 (level, low) -> IRQ 5
ipw2100: 0000:02:02.0: Detected at mem: 0xD0200000-0xD0200FFF -> e096e000, irq: 5
eth1: Using hotplug firmware load.
eth1: Bound to 0000:02:02.0
ieee80211_crypt: registered algorithm 'WEP'
...
After I called my script wich is setting the ESSID, NICKNAME, PASSWD
this line is added to the output of dmesg:

Code: Select all

eth1: Associated with 'mysystem' at 11Mbps, channel 6 BSSID=00:00:00:00:00:00)
To me it seems that /etc/conf.d/wireless is never used by the system.
Any further ideas? Thanx!
Please notice the back of this message.
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Thu Jan 27, 2005 3:51 pm

menschmeier wrote:I also checked my baselayout version, it must be very new, but it is far away from 1.11.9 ...

Code: Select all

*  sys-apps/baselayout
      Latest version available: 1.9.4-r6
      Latest version installed: 1.9.4-r6
To me it seems that /etc/conf.d/wireless is never used by the system.
Any further ideas? Thanx!
The problem is that baselayout-1.11.x is masked as UNSTABLE
This is basically done by putting a ~ character infront of your ARCH
To unmask baselayout, you need to add something like

Code: Select all

sys-apps/baselayout ~x86
to /etc/portage/package.keywords - but change x86 to your ARCH (~amd64 for example)

and the /etc/conf.d/wireless is only used by baselayout-1.11.x - not any earlier versions
Top
menschmeier
l33t
l33t
User avatar
Posts: 727
Joined: Wed Dec 15, 2004 8:21 am

  • Quote

Post by menschmeier » Thu Jan 27, 2005 5:30 pm

Ok,

I am not so experienced using an unstable package. If I unmask sys-apps/baselayout I have unmask some other sys libs too, like sys-apps/sysvinit
sys-libs/readline
and maybe more.

So I prefer waiting till these packages are declared a stable. Because my system is running well I do not like to risk getting an unstable system or worse...

But I am happy to know what the problem is. Thank you.
:D
Please notice the back of this message.
Top
McFly0
n00b
n00b
User avatar
Posts: 32
Joined: Sat Aug 16, 2003 11:34 am

  • Quote

Post by McFly0 » Wed Feb 09, 2005 1:56 pm

From which package do you guys got the /etc/conf.d/wireless config-files?!

I don't have such a file although I'm looking for something like that.
your air condition works well, until u
open windows - so use Gentoo !!
Top
menschmeier
l33t
l33t
User avatar
Posts: 727
Joined: Wed Dec 15, 2004 8:21 am

  • Quote

Post by menschmeier » Wed Feb 09, 2005 2:22 pm

Hi,
I didn't got this file by a package, I assembled its content here in the forum. But I think if you emerge the masked packed sys-apps/baselayout you will get it but I am not sure about this.
Ciao
Please notice the back of this message.
Top
McFly0
n00b
n00b
User avatar
Posts: 32
Joined: Sat Aug 16, 2003 11:34 am

  • Quote

Post by McFly0 » Wed Feb 09, 2005 4:12 pm

You're absolutly right with the masked package baselayout. Now I got the latest version and everything works fine :)
your air condition works well, until u
open windows - so use Gentoo !!
Top
Post Reply

14 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic