# Wireless configuration and startup - The Gentoo way (part 2)

## amne

Part 2 of Wireless configuration and startup - The Gentoo way.

----------

## ongardie

Uberlord:

Thanks a lot, that did the trick for me. I assume this will be included in a later version?

----------

## UberLord

The FAQ is now maintained over at 

http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_StartupLast edited by UberLord on Mon Nov 29, 2004 2:45 pm; edited 1 time in total

----------

## markfl

With the old thread being locked, how is UberLord going to edit the first post when a new version comes out?

Markfl

----------

## pratttech

Can't seem to emerge baselayout-1.11.0...

I just finished syncing and masking: 

 *Quote:*   

> root@privateer ~ # cat /etc/portage/package.keywords
> 
> =sys-fs/udev ~x86
> 
> =sys-apps/sysvinit ~x86
> ...

 

Portage thinks 1.10.4 is the latest:

 *Quote:*   

> root@privateer ~ # emerge -av baselayout
> 
> These are the packages that I would merge, in order:
> 
> Calculating dependencies ...done!
> ...

 

even though I have the 1.11ebuild:

 *Quote:*   

> root@privateer ~ # ls -l /usr/portage/sys-apps/baselayout/baselayout-1.11.0.ebuild
> 
> -rw-r--r--  1 root root 15700 Sep 20 14:39 /usr/portage/sys-apps/baselayout/baselayout-1.11.0.ebuild
> 
> 

 

it fails: 

 *Quote:*   

> root@privateer ~ # emerge -av =sys-apps/baselayout-1.11.0
> 
> These are the packages that I would merge, in order:
> 
> Calculating dependencies
> ...

 

----------

## UberLord

 *pratttech wrote:*   

> Can't seem to emerge baselayout-1.11.0...
> 
> I just finished syncing and masking: 
> 
>  *Quote:*   root@privateer ~ # cat /etc/portage/package.keywords
> ...

 

Remove ~x86 from /etc/portage/package.unmask -you only need the ebuild cat/name-version (you don't even need version)

----------

## UberLord

 *markfl wrote:*   

> With the old thread being locked, how is UberLord going to edit the first post when a new version comes out?

 

The ebuild is discontinued as wireless-config is now in portage, so there should be no need. Although it's package.masked, I would rather it's used purely because /etc/conf.d/net no longer requires patching.

In fact, it should not require patching like that again as net-scripts (now part of rc-scripts in baselayout) are modular - just drop the script in /etc/net.modules.d and it gets loaded  :Smile: 

----------

## bennettp

Well I tried this for my Netgear MA301 (prism2.5 chipset & OLD firmware) card, and I couldn't get WEP working. The problem of course, was buggy firmware. Instead of flashing the firmware, as suggested by a link in uberlord's old thread, I decided to use wlan-ng instead, since this loads the firmware into the network card's ram when it starts up (much less dangerous than flashing the rom). Of course, wlan-ng doesn't work with baselayout-1.11.0's scripts, so I had to downgrade to the latest stable version.

So now WEP works perfectly, but for some reason, I can't get wlan0 to start on bootup! I need to restart it after the boot sequence! Aaargh curse my crappy hardware!

EDIT: Got it! I created a new /etc/init/net.wlan0 (instead of being a symlink to net.eth0/net.lo):

```
#!/sbin/runscript

depend() {

        need wlan

        use hotplug pcmcia

}

source /etc/init.d/net.eth0
```

"wlan" is a separate script that initialises wlan-ng, loads the firmware, etc. The "use hotplug pcmcia" was copied directly from net.eth0.:wq

----------

## pratttech

 *UberLord wrote:*   

>  *pratttech wrote:*   Can't seem to emerge baselayout-1.11.0...
> 
> I just finished syncing and masking: 
> 
>  *Quote:*   root@privateer ~ # cat /etc/portage/package.keywords
> ...

 

Worked perfectly!

Now-- since I am pretty impressed with the support so far  :Wink: 

 *Quote:*   

> * GNU info directory index is up-to-date.
> 
>  * IMPORTANT: 24 config files in /etc need updating.
> 
>  * Type emerge --help config to learn how to update config files.
> ...

 

Linux is such a chaotic environment.  I have seen many conflicting statements in the few weeks I have been using gentoo.  What do you recommend for dealing with /etc changes?

dispatch-conf, etc-update, dep, emerge-depclean ...

Also I noticed 2.6.8 does not support orinoco_cs scan and monitor "out of the box".  

 *Quote:*   

> 
> 
> root@privateer ~ # iwpriv
> 
> lo        no private ioctls.
> ...

 

I am interested in trying Kismet and AirSnort.  I went to Shmoo but I am not sure or which patch I need or what to once I have it.

I'm running gentoo-dev-sources 2.6.8-r3   

 *Quote:*   

> root@privateer ~ # uname -a
> 
> Linux privateer 2.6.8-gentoo-r3 #2 Sun Sep 19 00:32:47 EST 2004 i686 Intel(R) Pentium(R) III Mobile CPU      1133MHz GenuineIntel GNU/Linux
> 
> 

 

----------

## bennettp

 *pratttech wrote:*   

>  *Quote:*   * GNU info directory index is up-to-date.
> 
>  * IMPORTANT: 24 config files in /etc need updating.
> 
>  * Type emerge --help config to learn how to update config files.
> ...

 The reason there are 24 /etc files that need updating is that baselyout is basically just /etc scripts...

I prefer to use etc-update to update the etc files. Any files that don't contain configurations can just be copied straight over the old ones (like the /etc/init.d files), but files such as /etc/rc.conf, /etc/conf.d/*, and so-on need to be updated manually if you don't want to lose your old settings. Just select "interactively merge" the two files, and for each differeing block of text, it will show you the old version on the left, and the new version on the right. Enter "l" or "r" to chose which you want.

----------

## VAXinate

Is there a way to get this to work with no network installed?? My only access to the internet is via a wireless connection. So I really need a way to set up that wireless connection. Any help with this would be much appreciated!! I finally got Gentoo installed (first try) and i rip roaring ready to get some portage going!! TIA!!!

--VAXinate

----------

## pratttech

Your wireless drivers might be in the livecd kernel.  Do you know what wifi chipset you have?  Did you boot with pcmcia enabled?  You must be doing a stage3 since you have no net.  Even if the livecd doesn't have the drivers you should have enough there to build a kernel with the right stuff.

----------

## VAXinate

well... I have the drivers built... i think... it's a d-link dwl-520 i'm pretty sure it uses the prism 2.5 chipset which uses hermes.o its a pci card. I jsut don't know how to configure it... that's the problem...  I've never configured a wireless card in linux all other times iv'e used linux i was using a wired NIC and linux always autoconifgured... jeez...

----------

## pratttech

Is this PCI or PCMCIA?  I don't really know about your card.  I've never dealt with PCI wifi, but if it  but is I would definitely emerge wireless-tools and gentoolkit.  Use lspci to probe that bus and iwconfig to view wireless extentions once the card is recognized.

----------

## VAXinate

it is a PCI card. Is it possible to emerge wireless-tools without an internet connection though? This is my problem. I have no internet connection to use to install any portage packages. I need to get this configured so i can start installing packages. Thanks for attempting to help here. I'm somewhat lost on what to do.    :Confused: 

----------

## pratttech

Well if you are already installed, you must have done a stage3 off the livecd.  There is an accompanying iso to the livecd which you should grab that is all binaries.  You should find wireless-tools and gentoolkit there.

----------

## VAXinate

i'll check that out... i might try to complie wireless-tools from source if i can... it just seems that portage would be a more viable option. I'll see what i can figure out. I found a little howto of sort specifically for my card so I'm going to give that a go. Thanks for the help. I'll post back with status as soon as i'm able to get to my computer.

----------

## pratttech

portage is very nice because it maintains the world file.  manual installs are possible, but not registered with the system.  If you don't have net connectivity, how will you install from source?

----------

## VAXinate

i have internet connectivity in windows and i can push things accross my FAT partition.... i got wireless-tools emerged luckily... but we'll see...  so far i'm not having much luck with anythin iwconfig doesn't even know my wifi card is there... so now that's more fun.. ugh...

----------

## UberLord

 *VAXinate wrote:*   

> so far i'm not having much luck with anythin iwconfig doesn't even know my wifi card is there... so now that's more fun.. ugh...

 

You have installed a driver for your card yes? If iwconfig thinks it's not there then the chances are that the driver isn't loading correctly.

----------

## VAXinate

i thoght i had... but apperently this card uses a different driver than what i thought. I'm about o attempt to load the correct driver now. so hopefully we'll know something soon...

----------

## VAXinate

I guess i should update that i finally got it working... I'm going to go ahead and emerge Uberlord's ebuild now and see if that makes it a bit more stable... cuz right now i'm having to insmod the drivers and crap every time i boot. and that's annoying... for some reason modprobe won't load the hostap.ko and hostap_pci.ko drivers...

----------

## kikidonk_raf

Hi !

Thanks UberLord for that wonderful script, i've made a little modification to fit my needs, and I thought it could be interesting to put in the official version:

I don't need to force connection to my preferred AP's because their ESSID is not hidden. So when i'm somewhere where there are no APs, it tries to connect to my preferred APs, and it takes time..

So I introduced a new preferred_only argument "noforce", that will only connect to preferred APs if found in the scan, but not force the connection if it fails.

Here it is:

the /etc/net.modules.d/wireless file

```

--- wireless   2004-09-25 14:44:29.182646392 +0200

+++ /root/wireless   2004-09-25 14:23:15.651252592 +0200

@@ -817,7 +817,8 @@

    eval e=\"\$\{preferred_only_${iface}\}\"

    [[ -n ${e} ]] && preferred_only=${e}

    preferred_only=$( echo ${preferred_only:-no} | tr '[:upper:]' '[:lower:]' )

-

+   

+   

    if [[ ${preferred_only} == force ]]; then

       wireless_force_preferred ${iface} && return 0

    else

@@ -832,8 +833,13 @@

       [[ no != ${unique_ap} ]] && wireless_strip_associated ${iface}

 

       wireless_connect_preferred ${iface} && return 0

-      wireless_force_preferred ${iface} && return 0

-      [[ ${preferred_only} == no ]] && wireless_connect_not_preferred ${iface} && return 0

+      

+      # If we have "noforce", we will not try to force preferred AP's

+      # and we won't try to connect to unknown AP's

+      if [[ ${preferred_only} != noforce ]]; then

+         wireless_force_preferred ${iface} && return 0

+         [[ ${preferred_only} == no ]] && wireless_connect_not_preferred ${iface} && return 0

+      fi

    fi

 

    e="associate with"

```

the /etc/conf.d/wireless.example file

```

--- wireless.example.bak   2004-09-25 14:26:50.305620168 +0200

+++ wireless.example   2004-09-25 14:29:26.508873664 +0200

@@ -182,9 +182,11 @@

 #preferred_aps_eth0=( "ESSID 3" "ESSID 4" )

 

 # You can also say whether we only connect to preferred APs or not

-# Values are "yes", "no" and "force"

+# Values are "yes", "no" , "force" and "noforce"

 # "force" means it forceably connects to the APs in order and does not bother

 # to scan

+# "noforce" means it will only connect to preferred APs, but not try to force

+# the connection (useful if you do not have hidden APs)

 # Default is "no"

 #preferred_only="no"

 #preferred_only_eth0="no"

```

Hope it helps !

----------

## Steffen

I cannot claim that I´ve read all the 60 pages of this wireless thread, so please forgive me if this has already been asked.  :Confused: 

I´m using the new baselayout-1.11.0 and have the following networking devices:

eth0: Intel PRO/1000

eth1: Intel PRO/2200BG Wireless (Using ipw2200 v0.8 kernel module)

When I manually start /etc/init.d/net.eth0 and /etc/init.d/net.eth1 everything works fine (Have not tried WEP yet). Now I´ve done "rc-update add net.eth0 default" and "rc-update add net.eth1 default" to automatically establish a network connection while booting.

But this fails and I have no clue why. Here is an excerpt from the boot messages: (I´ve typed it in here manually, any way to copy these messages?)

```

* Loading networking modules...

* Loading networking modules...

*   modules: wireless ifconfig dhcpcd

*     ifconfig provides interface

*     dhcpcd provides dhcp                                [ ok ]

*   Configuring wireless network for eth1

*   Connecting to "{MY_ESSID}" (WEP Disabled)...

*   modules: wireless ifconfig dhcpcd

*     ifconfig provides interface

*     dhcpcd provides dhcp                                [ ok ]

*   Wireless extensions not found for eth0

* Bringing eth0 up...

*   eth0 dhcp

*     eth0 received address 192.168.0.2

[Other stuff like starting vixie-cron and local...]

* Failed to configure wireless for eth1                   [ !! ]

```

Strange things:

"Loading networking modules" is printed twice directly after each other, is this correct?

Why does he say "Wireless extensions not found for eth0" while he tries to establish an wireless network on eth1?

If I manually do "/etc/init.d/net.eth1 start" after the boot process my wireless connection gets established without any problems.

----------

## andrewbarr

I just upgraded my baselayout to 1.11.0, and it seems that /etc/conf.d/wireless no longer has the preauth_ESSID config variable. What happened to it? One of the networks I connect to requires Xsupplicant 1.0.1, and I thought that would be the perfect hook to get it to run on.

----------

## kamina

For some reason I'm not getting the correct baselayout...

 *Quote:*   

> 
> 
> # emerge -av sys-apps/baselayout
> 
> These are the packages that I would merge, in order:
> ...

 

I have done emerge sync twice today (once after a fresh install, and a second time after the wrong option was offered here). I'm afraid to do it a third time as it warns about netiquette...

I tried with both masking options, but get the same results, currently my package.keywords read:

 *Quote:*   

> 
> 
> # cat /etc/portage/package.unmask 
> 
> =sys-apps/baselayout-1.11.0
> ...

 

The only thing I can think of is that while I did the emerge sync I probably had ~x86 added to that... Could it make a differance, and will I get a ban from the server if I sync again?

----------

## UberLord

 *kikidonk_raf wrote:*   

> 
> 
> I don't need to force connection to my preferred AP's because their ESSID is not hidden. So when i'm somewhere where there are no APs, it tries to connect to my preferred APs, and it takes time..
> 
> So I introduced a new preferred_only argument "noforce", that will only connect to preferred APs if found in the scan, but not force the connection if it fails.
> ...

 

Thanks for the patch  :Smile: 

I think I'll make the "noforce" option default though.

----------

## UberLord

 *andrewbarr wrote:*   

> I just upgraded my baselayout to 1.11.0, and it seems that /etc/conf.d/wireless no longer has the preauth_ESSID config variable. What happened to it? One of the networks I connect to requires Xsupplicant 1.0.1, and I thought that would be the perfect hook to get it to run on.

 

It was removed for the time-being. It may come back at somepoint, but not how it was.

If you need to run a supplicant, you can put it into preup

----------

## tam

Hi!

 *UberLord wrote:*   

> The ebuild is discontinued as wireless-config is now in portage, so there should be no need.

 

```
emerge -s wireless

Searching...

[ Results for search key : wireless ]

[ Applications found : 3 ]

*  net-wireless/wireless-tools

      Latest version available: 26-r1

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 116 kB

      Homepage:    http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html

      Description: A collection of tools to configure wireless lan cards

      License:     GPL-2

*  x11-plugins/desklet-wireless [ Masked ]

      Latest version available: 0.2

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 6 kB

      Homepage:    http://gdesklets.gnomedesktop.org/categories.php?func=gd_show_app&gd_app_id=69

      Description: The wireless monitoring sensor and display for gDesklets

      License:     as-is

*  x11-plugins/gkrellmwireless

      Latest version available: 2.0.3

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 9 kB

      Homepage:    http://gkrellm.luon.net/

      Description: A plugin for GKrellM that monitors your wireless network card

      License:     GPL-2

```

Hmm, I cannot find it.

----------

## DevSolar

I understood that wireless-config is the discontinued one, as being replaced by the new baselayout scripts. Am I correct so far, UberLord?

I don't feel very well having to unmask one package (baselayout) and "~x86" two packages (baselayout and sysvinit) to get some way of not having to iwconfig my WEP key after every bootup (or hacking ~/.profile).

No offense intended, but "the Gentoo way" should be available in x86, not ~x86, and unmasked...

That being said, is the posting #1 on thread #1 still up-to-date? Since I will *not* sift through 60 pages of postings...

(/me slightly disappointed, as WLAN can't be *that* uncommon...)

----------

## Maxwell

Hi!

I've followed the instructions on setting "wirelless the gentoo way", but, don't know why, my wireless ipw2100 works just for (and precisely) 40 seconds. It has static ip, no dhcp is working but it just works for that specific time and then it goes down. With ifplugd stopped, it starts ok, but after 40 seconds it stops.

I also noticed that the "Invalid misc" field in iwconfig eth1 is always being incremented.

Drivers are up-to-date. This happens with a wep connection, i don't have an open one!   :Crying or Very sad: 

What could this be?

Thanks in advance

----------

## HeraldMage

 *kamina wrote:*   

> For some reason I'm not getting the correct baselayout...
> 
> ```
> 
> # emerge -av sys-apps/baselayout
> ...

 

I had the same thing, and discovered that today they updated baselayout to 1.11.1. If you want it, you need to change the numbers in your package.unmask. But a WARNING: It contains a new rc-scripts (1.6.1) which unfortunately does NOT exist on the mirrors yet, so emerge fails and now i'm stuck with a system I dare not shut down as I hope the baselayout/rc-scripts issue gets fixed in the early AM. I guess I can try emerging back to 1.10.4, which is the next newest ebuild I still have on my system. And here I was, trying to do the proper gentoo updates...

----------

## DevSolar

This is a very sorry state of affairs, and not really good advertising for Gentoo. It cannot be that you are forced deep into hack & beta country in order to set up your WLAN "the Gentoo way".

I urge the maintainers to come up with a solution soon that doesn't require unmasking or setting ~x86. Some people (like me) want to use Gentoo because of its ease, not because of its hack / geek value.

In the very least, give an updated how-to. Referring to a months-old posting in a closed megathread doesn't feel trustworthy, and from what I read here, I'm not in a mind to try around and potentially wreck my startup scripts...

 :Sad: 

----------

## UberLord

 *DevSolar wrote:*   

> I urge the maintainers to come up with a solution soon that doesn't require unmasking or setting ~x86. Some people (like me) want to use Gentoo because of its ease, not because of its hack / geek value.

 

Networking is very much a core part of Gentoo (or any OS) - and incase you haven't noticed the network script has just undergone a total rewrite so we can support network plugin modules - for example wireless.

As it's such a core part, it's been marked "experimental" as it probably has a few major bugs still - even though it's been working fine for me and a few others for a while now.

Just incase you hadn't noticed - other packages go the same route. Gnome 2.6 is a good example as it was "released" for a few weeks before it hit ~x86 and even longer before it hit x86.

2.8 has also been released and it's not even ~x86 yet

We cannot make a special exception.

Besides, the old wireless-config ebuild is still available if you don't like it.

----------

## UberLord

 *tam wrote:*   

> Hmm, I cannot find it.

 

Sorry, I should have been more clear

The wireless-config script has been incorporated into the latest baselayout (currently 1.11.1 which is package masked)

----------

## DevSolar

 *UberLord wrote:*   

> Just incase you hadn't noticed - other packages go the same route. Gnome 2.6 is a good example as it was "released" for a few weeks before it hit ~x86 and even longer before it hit x86.
> 
> 

 

No arguing there, and I don't criticize the ~x86 mechanism in general - to the contrary, I think it's nice thought-out.

But I want to configure my wireless, so I look on gentoo.org for help, and this very thread shows up very prominently telling me "the Gentoo way" is still deep in beta.

 *Quote:*   

> 
> 
> Besides, the old wireless-config ebuild is still available if you don't like it.

 

As was pointed out previously - it is not. My portage tree doesn't offer it, either.

So, what is the non-beta Gentoo way of configuring your WLAN? I don't want to sound offensive, but it strikes me as odd that this isn't handled.

----------

## DevSolar

 *UberLord wrote:*   

> 
> 
> The wireless-config script has been incorporated into the latest baselayout (currently 1.11.1 which is package masked)

 

So if I don't like to go masked / ~x86 I shall use wireless-config, which has been incorporated into the (masked / ~x86) baselayout-1.11.1?

We're going in circles here...

----------

## UberLord

 *DevSolar wrote:*   

> No arguing there, and I don't criticize the ~x86 mechanism in general - to the contrary, I think it's nice thought-out.
> 
> But I want to configure my wireless, so I look on gentoo.org for help, and this very thread shows up very prominently telling me "the Gentoo way" is still deep in beta.

 

Thats fair enough - but the forums are the Gentoo community, not Gentoo itself.

 *Quote:*   

> 
> 
>  *Quote:*   
> 
> Besides, the old wireless-config ebuild is still available if you don't like it. 
> ...

 

wireless-config ebuild was NEVER in portage - it's a downloadable ebuild which I provided instructions for.

The wireless-config script that the ebuild installed is NOW incorporated into baselayout-1.11.1 which IS in portage.

Hopefully thats the last time I have to say that.

 *Quote:*   

> So, what is the non-beta Gentoo way of configuring your WLAN? I don't want to sound offensive, but it strikes me as odd that this isn't handled.

 

There are many ways of configuring your wireless.

Don't want beta? Then go with waproamd which has been in portage for months. I have problems running it though - and it doesn't support many features as my script. There's a few others in portage as well - wpa-supplicant may work for you.

I don't want to sound offensive either, but there have and are many different ways of configuring wireless that have been either in portage or forum in the forums for some time.

What you have found here, started off as a very simple wireless script that has now turned into something much much bigger that has only just made it into portage. It went into portage around Sept 15th in the baselayout package. People were clamoring for it it be in portage around Feburary.

Sorry it took so long, but I AM NOT a Gentoo developer.

----------

## DevSolar

Looks like we had a couple of misunderstandings here. Sorry.

 *UberLord wrote:*   

> 
> 
> Thats fair enough - but the forums are the Gentoo community, not Gentoo itself.
> 
> 

 

When the Gentoo docs don't help, the forums are the next point people look for; and with the title of this thread and stuff in baselayout it is rather easy to get the impression you actually are in some kind of "official" function.

 *Quote:*   

> 
> 
> wireless-config ebuild was NEVER in portage - it's a downloadable ebuild which I provided instructions for.
> 
> 

 

At least two of us fell for that trap.  :Wink: 

 *Quote:*   

> So, what is the non-beta Gentoo way of configuring your WLAN? I don't want to sound offensive, but it strikes me as odd that this isn't handled.

 

 *Quote:*   

> 
> 
> Don't want beta? Then go with waproamd which has been in portage for months. I have problems running it though - and it doesn't support many features as my script. There's a few others in portage as well - wpa-supplicant may work for you.
> 
> 

 

Thanks,  that was very helpful! Now, point me in the direction of the person I have to bugger to have them mentioned in the docs...  :Very Happy: 

 *Quote:*   

> 
> 
> What you have found here, started off as a very simple wireless script that has now turned into something much much bigger that has only just made it into portage. It went into portage around Sept 15th in the baselayout package. People were clamoring for it it be in portage around Feburary.
> 
> 

 

And thanks for your work, I'll check it out the moment gets out of ~x86.

 *Quote:*   

> Sorry it took so long, but I AM NOT a Gentoo developer.

 

Consider it a compliment that I took you for one.  :Wink: 

----------

## kamina

I still have the same problem...

 *Quote:*   

> 
> 
> # cat /etc/portage/package.unmask 
> 
> =sys-apps/baselayout-1.11.1
> ...

 

 *Quote:*   

> 
> 
> # emerge -av sys-apps/baselayout
> 
> These are the packages that I would merge, in order:
> ...

 

----------

## UberLord

 *kamina wrote:*   

> I still have the same problem...
> 
>  *Quote:*   
> 
> # cat /etc/portage/package.unmask 
> ...

 

Can you see baselayout-1.11.1.ebuild in /usr/portage/sys-apps/baselayout? If not, try emerge sycning - or is there a newer version?

----------

## kamina

 *Quote:*   

> 
> 
> $ ls /usr/portage/sys-apps/baselayout
> 
> ChangeLog                 baselayout-1.9.4-r3.ebuild
> ...

 

It seems to be there, but still doesnt work.

----------

## UberLord

If you're not using ~x86 then you need to add the following to /etc/portage/package.keywords

```
=sys-apps/baselayout-1.11.1 ~x86
```

----------

## credo

Thanks for the great documentation guys. I have it working on my new card, however, each time it starts up it connects on Channel 7, not Channel 4 like I have asked. I have this code in my /etc/conf.d/wireless:

```

essid_wlan0="tsunami"

channel_wlan0="4"

```

I also have this in my /etc/conf.d/net (I dont like DHCP - its too slow for me):

```

ifconfig_wlan0=(

        "192.168.254.30 netmask 255.255.255.0"

)

routes_wlan0=(

        "default gw 192.168.254.1"

)

```

... and that is it. You see, my wireless router seems to broadcast a strong signal on Channel 4, and an incredibly weak one on Channel 7.

Cheers guys

----------

## Maxwell

It looks like nobody noticed my post.

My problems are the following:

I've installed baselayout 1.11 as expected. No problems found. Easy configuration (Great Work!), and also installed ifplugd (which works very fine with my ethernet card).

The problems start when i put my wireless card, an ipw2100, working. Dmesg says  *Quote:*   

>  eth1: Associated with 'mecatronica' at 11Mbps, channel 9

 , but when i do 

```
ifconfig eth1
```

 it outputs the following:

 *Quote:*   

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

 

When i start the wireless card with ifplugd, dmesg outputs an error related to a wep failure or something.

The problem is that whatever i do my wireless card never runs. Suggestions?

----------

## UberLord

 *credo wrote:*   

> Thanks for the great documentation guys. I have it working on my new card, however, each time it starts up it connects on Channel 7, not Channel 4 like I have asked. I have this code in my /etc/conf.d/wireless:
> 
> ```
> 
> essid_wlan0="tsunami"
> ...

 

In managed mode - which you need to connect to APs, the AP decides the channel, not the client.

So if you need to connect on channel 7, change the AP to channel 7.

----------

## UberLord

 *Maxwell wrote:*   

> Hi!
> 
> I've followed the instructions on setting "wirelless the gentoo way", but, don't know why, my wireless ipw2100 works just for (and precisely) 40 seconds. It has static ip, no dhcp is working but it just works for that specific time and then it goes down. With ifplugd stopped, it starts ok, but after 40 seconds it stops.
> 
> I also noticed that the "Invalid misc" field in iwconfig eth1 is always being incremented.
> ...

 

So, even with ifplugd stopped, you restart eth1 and the connection works (ie you can ping something) and it then stops after 40 seconds?

Thats really odd.

I would say it's a driver problem, or a very bad wireless signal. Could you post any errors relating to eth1, ipw or wireless from /var/log/messages?

----------

## Maxwell

First of all, net.eth1 never gets started.Besides that, dmesg says the following when the module is loaded:

 *Quote:*   

> 
> 
> ipw2100: Intel(R) PRO/Wireless 2100 Network Driver, 0.54
> 
> ipw2100: Copyright(c) 2003-2004 Intel Corporation
> ...

 

And i don't usually have metalog working and /var/log/messages isn't there. But from times to times i get the error "&ip_nat_lock writelocked". I don't why it shows up, but the wireless was working alright with it.

NOTE: After all i WAS using ifplugd with the card. I've just noticed that, as i was using  *Quote:*   

> INTERFACES="auto"

 . Now it doesn't show up for 40 seconds, it just goes down after 1 second.

It's really strange, because i'm having signal strengh info on my gkrellm (always 98-100%).

----------

## UberLord

Try the following

```

/etc/init.d/ifplugd stop

killall ifplugd -9

/etc/init.d/net.eth1 restart
```

Hopefully, that should get you connected.

Note that ifplugd doesn not work well with wireless

----------

## Maxwell

That was what i thought... but today i wasn't working with it. It looks like the problem is with the wireless module load. Yesterday, with ifplgud working, i was getting a kind of error that was related to bad firmware loading. It happened with prior versions of mey drivers. Maybe the problem is elsewhere. Maybe the problem is hotplug.  :Question: 

But i'm tired, i'm going home and tomorrow will be a brand new day...

----------

## wizard_ct

Using baselayout-1.11.1 wireless is working great with my Prism 2.5 mini-pci card. 

However, in addition to the crypt and /etc/profile issues, running emerge reduces my console to approximatly 1/4 the size of my viewable framebuffer screen. Has anyone seen this/have a hack to fix it?

Thanks.

----------

## DevSolar

I've seen this happen, too, but that was when I did "make menuconfig"...

I used baselayout 1.11.1 right from the start (i.e., not using 1.9.x first and then updating, but going for 1.11.1 with a fresh install). Two things I noticed where dependencies aren't really "clean":

* it needs sysvinit ~x86 (>=2.84 if I remember correctly);

* during boot, the system complains that it cannot find /bin/cryptsetup.

----------

## kamina

 *UberLord wrote:*   

> If you're not using ~x86 then you need to add the following to /etc/portage/package.keywords
> 
> ```
> =sys-apps/baselayout-1.11.1 ~x86
> ```
> ...

 

I have an A64 but it's running the normal x86 distro.

 *Quote:*   

> 
> 
> =sys-apps/baselayout-1.11.1 ~x86
> 
> 

 

 *Quote:*   

> 
> 
> # emerge -av sys-apps/baselayout
> 
> These are the packages that I would merge, in order:
> ...

 

Still not working...   :Embarassed: 

----------

## geekporn

Thanks for this solution... was having a bit of trouble with my wife breathing down my neck to get her wireless connection a bit more automated!

----------

## UberLord

 *Maxwell wrote:*   

> That was what i thought... but today i wasn't working with it. It looks like the problem is with the wireless module load. Yesterday, with ifplgud working, i was getting a kind of error that was related to bad firmware loading. It happened with prior versions of mey drivers. Maybe the problem is elsewhere. Maybe the problem is hotplug. 
> 
> But i'm tired, i'm going home and tomorrow will be a brand new day...

 

If the firmware error is reported by the wireless module, then there's a fix for that right at the end of the 60 page thread - the fix isn't in portage yet.

----------

## UberLord

 *kamina wrote:*   

> 
> 
> I have an A64 but it's running the normal x86 distro.

 

I can't help ...... yet

I have AMD64 myself, but haven't got around to installing Gentoo on it yet - mainly due to a lack of an AMD64 HAL for the madwifi driver which I need ......  :Sad: 

----------

## UberLord

NEW NET-SCRIPTS PACKAGE AVAILABLE

http://rsm.demon.co.uk/~roy/downloads/net-scripts-1.0.2.tar.bz2

Simply put the contents of the archive into /etc to install  :Smile: 

Or, just replace the /etc/net.modules.d/wireless file with the similar one from the archive

There's a changelog in the archive.

I'm on holiday now for 2 weeks, so if any problems arise then they'll just have to wait   :Wink: 

warning any people using the preferred_only var will have to change to the new associate_order var. See wireless.example for details

An older version net-scripts is included in baselayout-1.11.1 if you're wondering ......

----------

## RK7

after emerging the masked version of baselayout, i checked my /etc/conf.d directory to see if everything was updated properly, and for some reason there was no net.lo. any ideas what might be going on?

thanks.

----------

## dyqik

The ipw2100 disconnecting problem sounds like the same problem I've been having with the 0.11 ipw2200 drivers. (same disconnect after some time, and no dmesg errors).  The 0.10 ipw2200 drivers wdidnt have that problem, so maybe an earlier version of the ipw2100 drivers don't either.  Try the ipw2100.sf.net mailing list archive for driver support.

----------

## doalwa

UberLord, I just wanted to thank you for your great work, I just completed the task of joining my home network with a Dlink dwl-g502+ PCI card using Linuxants driver Loader..everythings working fine, including WEP encryption,thanks to your really cool startup script!

Anyway, you just totally rock, man!   :Very Happy: 

----------

## yamakawa

Wow! Brilliant!!! 

 :Very Happy: 

----------

## vicG

Fool newb here --

Followed the steps verbatim:

mkdir -P /etc/portage

emerge sync

echo "=sys-apps/baselayout-1.11.0" >> /etc/portage/package.unmask

and when I emerged it, it grabbed baselayout 1.9.4.

So I deleted package.unmask, and changed it to 

echo "=sys-apps/baselayout-1.11.0 ~x86" >> /etc/portage/package.keywords

(why does this one have to be in package.keywords and the other in package.unmask?)

I then re-ran emerge sync (sorry, but I wanted to follow the instructions exactly), but when I ran emerge -av sys-apps/baselayout again, it still grabbed 1.9.4.

Why am I getting this older version when everyone else is getting 1.11?

----------

## oisch

@UberLord: The /etc/conf.d/net.example says that there is a $ESSID global variable that I can use for example in the postup() function.

But this variable doesn't exist. Is this a bug in the current scripts or is it my mistake (I only test for $ESSID without any special tricks).

----------

## mope

 *DevSolar wrote:*   

> I've seen this happen, too, but that was when I did "make menuconfig"...
> 
> I used baselayout 1.11.1 right from the start (i.e., not using 1.9.x first and then updating, but going for 1.11.1 with a fresh install). Two things I noticed where dependencies aren't really "clean":
> 
> * it needs sysvinit ~x86 (>=2.84 if I remember correctly);
> ...

 

any idea on what to do about the cryptsetup issue?

----------

## DevSolar

@ vicG:

The  packet version is 1.11.1.

 *mope wrote:*   

> any idea on what to do about the cryptsetup issue?

 

I found it to be "nonlethal", i.e. got my wireless to work regardless, so I didn't investigate further.

----------

## jaycochran

For some reason my wireless card starts on system boot even though it is not on in the "default" runlevel

Neither my wired card "eth0" or my wireless card "eth1" are turned on through rc-update. The only network device that should start is "lo0" in the boot level. After the system boots, running /etc/init.d/net.eth1 status shows it started so some where the rc script was kicked off. "eth0" behaves the way it should and is not started.

I'm running baselayout-1.11.1 and everything else works just the way it should be. net.eth0 and net.eth1 are sym linked to net.lo

```

/etc/conf.d/net:

ifconfig_eth0=( "dhcp" )

ifconfig_eth1=( "dhcp" )

/etc/conf.d/wireless:

essid_eth1="DaVinci"

key_DaVinci="xxx enc open"

rc-update show | grep net:

            net.eth0 |                               

            net.eth1 |                               

              net.lo | boot                         

```

Any thoughts?[/code]

----------

## seppe

Emerging this new and masked baselayout did b0rked some things:

I get several errors at boot that /usr/bin/cryptsetup (or something) doesn't exist, localmount service can't started either.

I did also

```

rc-update add net.eth1 default

```

It is started, but it didn't made any connection to my AP, probably because localmount failed to start  :Sad: 

/etc/init.d/net.eth1 restart

works fine though

EDIT: I downgraded baselayout, and keept my modded net.eth0 and net.eth1, and now it all works without problems (yeah, wireless config as well)

----------

## nyda

 *jaycochran wrote:*   

> For some reason my wireless card starts on system boot even though it is not on in the "default" runlevel

 

Using hotplug? Try adding its modulename to /etc/hotplug/blacklist

----------

## jcosters

I have a problem using WEP and an ESSID with '.'s in it:

```
root@maertens ~ # /etc/init.d/net.wlan0 start

 * Loading networking modules...

/sbin/runscript.sh: line 122: key_wifi.subnet.domain.net=open s:xxxxxxxxxxxxx: command not found

 *   modules: wireless ifconfig dhcpcd

 *     ifconfig provides interface

 *     dhcpcd provides dhcp                                               [ ok ] *   Configuring wireless network for wlan0

 *   Scanning for access points

 *     no access points found

 * Couldn't find any access points on wlan0

 * Failed to configure wireless for wlan0
```

```
root@maertens ~ # iwconfig wlan0

wlan0     IEEE 802.11g  ESSID:off/any  Nickname:"wifi.subnet.domain.net"

          Mode:Managed  Frequency:2.462GHz  Access Point: 00:00:00:00:00:00

          Bit Rate=54Mb/s   Tx-Power:24 dBm

          RTS thr=2347 B   Fragment thr=2346 B

          Encryption key:off

          Power Management:off

          Link Quality:100/100  Signal level:-62 dBm  Noise level:-256 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:17  Invalid misc:5001   Missed beacon:0
```

Connecting to my AP manually using iwconfig works:

```
 iwconfig wlan0 essid wifi.subnet.domain.net key s:xxxxxxxxxxxxx open
```

```
root@maertens ~ # iwconfig wlan0 

wlan0     IEEE 802.11g  ESSID:"wifi.subnet.domain.net"  Nickname:"wifi.subnet.domain.net"

          Mode:Managed  Frequency:2.437GHz  Access Point: 00:0D:88:8C:88:19

          Bit Rate=54Mb/s   Tx-Power:24 dBm

          RTS thr=2347 B   Fragment thr=2346 B

          Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX   Security mode:open

          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:17  Invalid misc:5101   Missed beacon:0
```

----------

## scoon

 *wizard_ct wrote:*   

> Using baselayout-1.11.1 wireless is working great with my Prism 2.5 mini-pci card. 
> 
> However, in addition to the crypt and /etc/profile issues, running emerge reduces my console to approximatly 1/4 the size of my viewable framebuffer screen. Has anyone seen this/have a hack to fix it?
> 
> Thanks.

 

Hey there, 

Ever get that 1/4 screen problem fixed.  I get it as well.  Not really certain how to fix it.

scoon

----------

## roeles

10 times sorry if this has been posted already, but I did not see it yet in this nor the original thread.

I configured (afaik) correctly, but my wlan card seems to nag a little bit. It's a Sitecom WL-012. I had a successfull attempt at trying to connect to an Ad-Hoc network before, with the 'old' scripts (the wlanctl-ESSID files and such). It connected straight away when plugging in the thingy.

However, I had more and more trouble getting it to connect to my (WEP encrypted) AP. Therefore I got the ~x86 baselayout stuff.

I get this error when running /etc/init.d/net.wlan0 (wich points to net.lo btw):

```

 * Loading networking modules...

 *   modules: wireless iproute2 dhcpcd

 *     iproute2 provides interface

 *     dhcpcd provides dhcp                                               [ ok ]

 *   Configuring wireless network for wlan0

 * wlan0 does not support setting the mode to "managed"

 * Failed to configure wireless for wlan0

```

I don't remember having to set a mode when connecting to Ad-Hoc, but that might just be a coincidence. Does anyone happen to know a fix for this? It does this too when I tell him to go into ad-hoc or master mode, so I am kind of clueless on this...

----------

## ralle

concerning the 1/4 screen problem:

I only recognized this as root, so I copied .bash_profile and .bashrc from some user dir to the root dir (I did not have these files before).

Until now the problem has disappeared, but I am not completely sure because it only occured sometimes before, not always.

----------

## nyda

 *vicG wrote:*   

> 
> 
> ...
> 
> So I deleted package.unmask, and changed it to 
> ...

 

 :Question:   :Exclamation:   :Question:   :Exclamation:   :Very Happy: 

package.unmask is used to unmask a masked package. masked packages are usually not intended for common use but testing. You cannot merge masked packages. If masked packages are merged, they will be unmerged during a package or wordupdate. Sometimes packages will be masked after they were stable, possibly because of security issues. Since baselayout is still masked in /usr/portage/profiles/package.mask, you have to unmask it in portage's /etc/portage/package.unmask. (You could also delete the mask from the mask file, but this one is maintained by portage and any changes will be lost on sync).

package.keywords sets the ~xxx keyword for that package, meaning you don't want the stable version but the most recent one, except for package-masked versions.

Using both and not deleting the package.unmask (*hint*) would cause emerge to fetch the most recent, possibly masked version of a package. By deleting the unmask file (which is used to overrride /usr/.../package.mask) you masked your baselayout again. As I said above, masked packages will be downgraded on the next update to that package or the world.

btw, you can use >> to append to a file, i.e. echo media-sound/rhythmbox >> /etc/portage/package.keywords. Using > will overwrite the file leaving it with only the one entry.

----------

## scoon

 *ralle wrote:*   

> concerning the 1/4 screen problem:
> 
> I only recognized this as root, so I copied .bash_profile and .bashrc from some user dir to the root dir (I did not have these files before).
> 
> Until now the problem has disappeared, but I am not completely sure because it only occured sometimes before, not always.

 

Hey there, 

thanks for the response.  Unfortunately, those are there and the problem still, consistently, remains.

scoon

----------

## jcosters

 *Ice-o-lator wrote:*   

> I have a problem using WEP and an ESSID with '.'s in it:
> 
> ```
> root@maertens ~ # /etc/init.d/net.wlan0 start
> 
> ...

 

Hasn't anybody got the same problem?

I read a similar problem ('.'s in ESSID) earlier in this thread, but it was supposed to be fixed ...

It is clearly a problem with the initscript because I can connect to the AP manually with iwconfig.

----------

## roeles

I had exactly the same problem, but since my AP was still not used by anyone but me, I renamed it

----------

## KShots

Wow - this is an incredibly large thread. I'd like to get my wireless working, but I don't want to try it until I've got a clear idea of exactly what to do... and I have anything but that. Starting from page 1, I've unmasked and ~x86'ed the baselayout 1.11.0 package (I know, it's been moved to 1.11.1 from the latest posts)... and I'm not sure anymore that I want to take that leap yet.

I have a WG511U Netgear card, supporting two 108Mbit simultaneous networks... claims to support "all major operating systems," which I take with a grain of salt (all major may mean just Windoze to some people). I made sure my cardbus was able to detect the card (it does)

```
root@beastie rich # lspci

0000:00:00.0 Host bridge: Intel Corp. 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)

0000:00:01.0 PCI bridge: Intel Corp. 82865G/PE/P PCI to AGP Controller (rev 02)

0000:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)

0000:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)

0000:00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02)

0000:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)

0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev c2)

0000:00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)

0000:00:1f.1 IDE interface: Intel Corp. 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)

0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)

0000:00:1f.6 Modem: Intel Corp. 82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller (rev 02)

0000:01:00.0 VGA compatible controller: nVidia Corporation NV31M [GeForce FX Go 5600] (rev a1)

0000:02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

0000:02:01.0 CardBus bridge: ENE Technology Inc CB-710/2/4 Cardbus Controller (rev 02)

0000:02:01.1 FLASH memory: ENE Technology Inc CB710 Memory Card Reader Controller

0000:02:02.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)

0000:03:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
```

... poked around the kernel a bit and found that the module with the most promise of working appears to be the prism54 module... which I currently have inserted

```
root@beastie rich # lsmod

Module                  Size  Used by

prism54                48156  0

firmware_class          7680  1 prism54

nvidia               4819924  0
```

In case you're wondering, here's my kernel version:

```
root@beastie rich # uname -a

Linux beastie 2.6.8.1 #5 SMP Mon Oct 11 00:50:05 Local time zone must be set--see zic  i686 Intel(R) Pentium(R) 4 CPU 3.06GHz GenuineIntel GNU/Linux
```

Now, at this point, is there anything I can check to make sure that linux knows how to use this card before I start making radical changes to my network structure?

Also, at home I do not use/support wireless. I use wireless for travel purposes only, so I have no way of testing traffic throughput at the moment (I have no wireless router/hub/whatever else).

----------

## vicG

 *nyda wrote:*   

>  (much needed schooling snipped)
> 
> 

 

Thanks.  I did as you recommended, and I'm getting this:

```

bash-2.05b# emerge -av sys-apps/baselayout

These are the packages that I would merge, in order:

Calculating dependencies \

!!! all ebuilds that could satisfy ">=sys-apps/sysvinit-2.84" have been masked.

!!! possible candidates are:

- sys-apps/sysvinit-2.85-r1 (masked by: ~keyword)

- sys-apps/sysvinit-2.84 (masked by: ~keyword)

- sys-apps/sysvinit-2.85 (masked by: ~keyword)

!!!    (dependency required by "sys-apps/baselayout-1.11.1" [ebuild])

!!! Error calculating dependencies. Please correct.

```

How can I correct this?

----------

## MrStaticVoid

KShots, you have an atheros based card.  Don't use the prism drivers, use the madwifi-drivers.  emerge madwifi-driver and modprobe ath_pci

----------

## nyda

 *vicG wrote:*   

> 
> 
> ```
> 
> - sys-apps/sysvinit-2.85-r1 (masked by: ~keyword)
> ...

 

Well, I told you how to unmask stuff that was masked in packages.mask and how to tell portage to use stuff that is keyword-masked.

As the message says, the above package (it's just one package, but all listed versions would satisfy baselayout) is keyword-masked. So you add that thing to /etc/portage/package.keywords (make sure you use echo >> as > would nuke the existing file before appending the line). [Of course you could also use your favourite editor to do this.]

Then try again. If a package gives you an error like "masked by package.mask" then you will need to add one specific version to /etc/portage/package.unmask. That's again as above.

(I know, it's a pain. But it's the correct way at the moment. I seriously hope the portage devs will provide a proper interface to do this later.)

----------

## KShots

 *Mr. Static Void wrote:*   

> KShots, you have an atheros based card.  Don't use the prism drivers, use the madwifi-drivers.  emerge madwifi-driver and modprobe ath_pci

 Thanks, that actually cleared things up a bunch - I now have ath0 listed when I do an ifconfig -a. This gives me some confidence that things can work  :Smile: .

So - out of curiosity (and so I don't have to ask again later if a friend gets a different card), how did you know that's the driver I needed? I didn't even see it listed in the kernel... and the prism54 driver stated it supported Netgear 511 wireless cards (though it didn't show anything under an ifconfig -a). A google search for WG511U comes up empty as far as linux goes, and a forum search here proved completely empty (before I mentioned it  :Smile: ).

Thanks for the heads-up, I really appreciate it  :Smile: .

----------

## allan

I updated to baselayout 1.11.2 yesterday and now the wireless interface won't come up automatically.

It says it's loading the modules but exits out with "wlan0 does not exist".  It appears that ndiswrapper is no longer being loaded by the scripts, as if I load it by hand and then run /etc/init.d/net.wlan0, it works.

Any ideas?Last edited by allan on Sat Oct 16, 2004 3:51 am; edited 1 time in total

----------

## harlequin11

Hi all,

I'm running a card with an atheros based chipset. I've made and installed the madwifi drivers and I can see my WIFI card. iwconfig reveals the following;

```

ath0      IEEE 802.11  ESSID:"LIAMEGAN"  Nickname:"LIAMEGAN"

          Mode:Managed  Frequency:2.427 GHz  Access Point: FF:FF:FF:FF:FF:FF

          Bit Rate:1 Mb/s   Tx-Power:50 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:XXXX-4A37-B1   Security mode:open

          Power Management:off

          Link Quality=38/94  Signal level=-57 dBm  Noise level=-95 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

/etc/conf.d/wireless looks like;

```

essid_ath0="any"

mode_ath0="Managed"

channel_ath0="11"

key_LIAMEGAN="s:XXXX4A37B1 enc open"

preferred_aps=("LIAMEGAN")

```

and when I try to do a /ets/init.d/net.ath0 start, I get the following;

```

 * Starting ath0

 *    Loading networking modules for ath0

 *       modules: wireless ifconfig dhcpcd

 *          ifconfig provides interface

 *          dhcpcd provides dhcp                                          [ ok ]

 *    Configuring wireless network for ath0

 *      Connecting to "any" (WEP Disabled) . . . . . . . . . . . . . . .  [ !! ]

 *    Trying to force preferred in case they are hidden

 *      Connecting to "LIAMEGAN" (WEP enabled) . . . . . . . . . . . . .  [ !! ]

 *    Failed to associate with any preferred access points on ath0

 *    Failed to configure wireless for ath0

```

Can anyone please help me.

Liam.

----------

## UberLord

 *oisch wrote:*   

> @UberLord: The /etc/conf.d/net.example says that there is a $ESSID global variable that I can use for example in the postup() function.
> 
> But this variable doesn't exist. Is this a bug in the current scripts or is it my mistake (I only test for $ESSID without any special tricks).

 

Well, it Works For Me :/

Here's some sample code for /etc/conf.d/net to demonstrate

```

postup() {

        einfo ESSID = ${ESSID}

}

```

----------

## UberLord

 *Ice-o-lator wrote:*   

> I have a problem using WEP and an ESSID with '.'s in it:
> 
> ```
> root@maertens ~ # /etc/init.d/net.wlan0 start
> 
> ...

 

Replace the . with a _ when using it to specify stuff

```
key_wifi_subnet_domain_net=open s:xxxxxxxxxxxxx
```

Basically, variable names do not like many characters outside A-Z, so I change them to be _ instead.

This is documented

----------

## UberLord

[quote="harlequin11"

/etc/conf.d/wireless looks like;

```

essid_ath0="any"

mode_ath0="Managed"

channel_ath0="11"

key_LIAMEGAN="s:XXXX4A37B1 enc open"

preferred_aps=("LIAMEGAN")

```

[/quote]

Here's a better one

```

key_LIAMEGAN="s:XXXX4A37B1 enc open"

preferred_aps=("LIAMEGAN")

```

 *Quote:*   

> 
> 
> and when I try to do a /ets/init.d/net.ath0 start, I get the following;
> 
> ```
> ...

 

Well, the new config probably won't fix your problem (but it may!)

If not, please post the results of

```
iwlist ath0 scanning
```

----------

## harlequin11

Thanks Uber'.

That returns;

```

ath0     Interface doesn't support scanning : Invalid argument

```

Liam.

----------

## Mythos

Hi there i am having some problems with my wireless. 

I have compiled rt2500 amd 64 driver sucessfully i guess:

```
eth2      RT2500 Wireless  ESSID:""

          Mode:Auto  Frequency=6 MHz  Bit Rate=11 Mb/s

          RTS thr:off   Fragment thr:off

          Encryption key: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

```

```
lsmod

rt2500                187360  1
```

dmesg:

```
rt2500: module license 'unspecified' taints kernel.

Pin 1-18 already programmed

ACPI: PCI interrupt 0000:00:0c.0[A] -> GSI 18 (level, low) -> IRQ 177

Uninitialised timer!

This is just a warning.  Your computer is OK

function=0x0000000000000000, data=0x0

Call Trace:<ffffffff80140c9e>{check_timer_failed+78} <ffffffff8014107a>{del_timer_sync+26} 

       <ffffffffa007b91c>{:rt2500:RT2500_close+76} <ffffffff804c71e4>{dev_close+100} 

       <ffffffff804c8458>{dev_change_flags+104} <ffffffff80502225>{devinet_ioctl+725} 

       <ffffffff8050388c>{inet_ioctl+92} <ffffffff804be99c>{sock_ioctl+684} 

       <ffffffff8018d8cf>{sys_ioctl+927} <ffffffff80111045>{error_exit+0} 

       <ffffffff801106ae>{system_call+126} 

eth2: no IPv6 routers present

eth2: no IPv6 routers present

eth2: no IPv6 routers present

mtrr: 0xd8000000,0x8000000 overlaps existing 0xd8000000,0x200000

[ACPI Debug] String: Length 0x24, "---------------------------- AC _PSR"

[ACPI Debug] String: Length 0x27, "---------------------------- AC on line"

wlanctl-ng[8845]: segfault at 00000000bffff188 rip 000000000040113c rsp 00000000bfffe19c error 4

wlanctl-ng[8900]: segfault at 00000000bffff198 rip 000000000040113c rsp 00000000bfffe1ac error 4
```

i cand change almost with iwconfig key, mode manual ...

but i can't put essid:

Now i ask how can i connect to my wireless router at home.

Router ssid = xpto, wep open-shared key 128b: 0d1e686070g7825058445856787

```
how can i connect to my router, i already tried some examples here, but not working.

eth2      Link encap:Ethernet  HWaddr 00:11:09:22:4E:DF

          inet6 addr: fe80::211:9ff:fe22:4edf/64 Scope:Link

          UP BROADCAST RUNNING 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:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:177 Base address:0xd000
```

----------

## UberLord

 *harlequin11 wrote:*   

> Thanks Uber'.
> 
> That returns;
> 
> ```
> ...

 

Well, I know for sure that madwifi supports scanning - bug the developers or check their FAQ to get it working.

----------

## UberLord

 *Mythos wrote:*   

> Hi there i am having some problems with my wireless. 
> 
> I have compiled rt2500 amd 64 driver sucessfully i guess:
> 
> 

 

I don't know of any working AMD64 drivers aside from Prism54 - so best of luck!

I say this as it looks like a driver problem due to the kernel messages.

However, it may also be WEP. Try removing all security from the AP and trying again.

----------

## CHs

Hi,

first of all thanks for this great script.

But I have also a problem with my wireless connection (ipw2100), dhcpd gets no ip from my access point. But with windows und suse linux it works. So there is maybe something wrong with my config?

in /etc/conf.d/wireless is not much set:

key_CH_WLAN="s:xxxxxxxx"

preferred_aps=( "CH-WLAN" "XXX2" )

ifconfig_CH_WLAN=( "dhcp" )

Starting eth1

 *    Loading networking modules for eth1

 *       modules: wireless ifconfig dhcpcd

 *          ifconfig provides interface

 *          dhcpcd provides dhcp                                          [ ok ] 

*    Configuring wireless network for eth1

 *    Scanning for access points

 *      Found "CH-WLAN" at XX:XX:XXXX:XX:XX (WEP required)

 *      Connecting to "CH-WLAN" (WEP enabled) . . . . . . . . . . . . .   [ ok ] 

*      eth1 connected to "CH-WLAN" at XX:XX:XX:XX:XX:XX

 *      in managed mode on channel 4 (WEP enabled)

 *    Bringing up eth1

 *       eth1 dhcp

 *          Running dhcpcd . . . . . . . . . . . . . . . . . . . . . . .  [ !! ]

Maybe somebody has an idea what i can try to get dhcp to work.

Thanks

----------

## UberLord

Double check the encrytion key is right.

Also, check the encryption type reported by iwconfig matches the AP encryption type

----------

## CHs

Thanks for the fast reply.

The encryption key is right.

iwconfig seems to be right (because it shows link quality..) too:

eth1   IEEE 802.11b  ESSID:"CH-WLAN"  Nickname:"CH-WLAN"

          Mode:Managed  Frequency:2.427 GHz  Access Point: xx:xx:xx:xx:xx:xx

          Bit Rate=11 Mb/s   Tx-Power=32 dBm

          Retry:on   RTS thr=2304 B   Fragment thr:off

          Encryption key:xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx   Security mode:open

          Power Management:off

          Link Quality=94/100  Signal level=-64 dBm  Noise level=-98 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

for test purposes i disabled wep but it is still the same:

* Starting eth1

 *    Loading networking modules for eth1

 *       modules: wireless ifconfig dhcpcd

 *          ifconfig provides interface

 *          dhcpcd provides dhcp                                          [ ok ] 

*    Configuring wireless network for eth1

 *    Scanning for access points

 *      Found "CH-WLAN" at xx:xx:xx:xx:xx:xx

 *      Connecting to "CH-WLAN" (WEP Disabled) . . . . . . . . . . . . .  [ ok ] 

*      eth1 connected to "CH-WLAN" at xx:xx:xx:xx:xx:xx

 *      in managed mode on channel 4 (WEP disabled)

 *    Bringing up eth1

 *       eth1 dhcp

 *          Running dhcpcd . . . . . . . . . . . . . . . . . . . . . . .  [ !! ]

why does it not getting an ip address via dhcp? any ideas?

----------

## oisch

After upgrading to the latest baselayout the $ESSID variable is now available.

However now I have to bind mac adresses to essids to make it detect any access point, but I think that is a problem of my ipw2100 driver.

The new network scripts are really a joy. I only wish they didn't make them check if the net device exists. I used to use preup to load my network modules. This does not work anymore  :Sad: 

Nevertheless I think the check should be in there as it helps alot when debugging network problems.

----------

## kikidonk_raf

@CHs: I got the same problems, wireless script won't bring up net.eth1 because dhcp fails, even if I can manually set all the things and get associated with the AP.

It appears tht reverting to the ipw2200 0.8 drivers make the things work again ?? This is quite strange and i'll investigate further, but in the meantime i just use thos drivers..

----------

## UberLord

 *CHs wrote:*   

> 
> 
> for test purposes i disabled wep but it is still the same:
> 
> ....
> ...

 

Maybe DHCP server isn't working - maybe there is more security on the AP or the DHCP server.

Does it work with a static IP?

----------

## UberLord

 *oisch wrote:*   

> 
> 
> The new network scripts are really a joy. I only wish they didn't make them check if the net device exists. I used to use preup to load my network modules. This does not work anymore 
> 
> Nevertheless I think the check should be in there as it helps alot when debugging network problems.

 

I've moved the interface exists check after the preup function for the next version. Not sure when it's going to be posted though as there's a fair bit of debugging I need todo for other stuff going in.

----------

## yangman

 *UberLord wrote:*   

> Well, I know for sure that madwifi supports scanning - bug the developers or check their FAQ to get it working.

 

According to the MadWifi FAQ, ifconfig ath0 up needs to be run before scanning is avaliable. It appears that that isn't the case with the script.

----------

## mokiearny

 *harlequin11 wrote:*   

> Thanks Uber'.
> 
> That returns;
> 
> ```
> ...

 

Yes, same here, driver problem. Workaround:

First problem:

```

root@halso ~ # iwpriv ath0 mode 0  ### this is the default mode

root@halso ~ # iwlist ath0 scan

ath0      Failed to read scan data : Resource temporarily unavailable

root@halso ~ # iwpriv ath0 mode 1

root@halso ~ # iwlist ath0 scan

ath0      No scan results

root@halso ~ # iwpriv ath0 mode 2

root@halso ~ # iwlist ath0 scan

ath0      Scan completed :

          Cell 01 - Address: 00:03:2F:08:E7:2F

          [... blah ....]

root@halso ~ # iwpriv ath0 mode 3

root@halso ~ # iwlist ath0 scan

ath0      Scan completed :

          Cell 01 - Address: 00:03:2F:08:E7:2F

          [....]

```

Put in your /etc/conf.d/wireless 

```
 iwpriv_ath0="mode 2" 
```

.

Now you have a

Second Problem:

That works only if you start the interface the second time! Looks like "iwpriv_ath0" executed _after_ scanning (UberLord? Is this true? :Smile: 

To resolve this prolem put into your /etc/conf.d/net

```

preup() {

        if [ $1 == "ath0" ] ; then

                iwpriv $1 mode 2

        fi

       return 0

}

```

This works for me.

----------

## yangman

I've tried mokiearny's workaround with no success.

```
 * Starting ath0

 *    Loading networking modules for ath0

 *       modules: wireless ifconfig dhcpcd

 *          ifconfig provides interface

 *          dhcpcd provides dhcp                                                           [ ok ]

 *    Running preup function

 *    Configuring wireless network for ath0

 *    Scanning for access points

 *      Found XX:XX:XX:XX:XX:XX (WEP required)

 *      Found "Pro 1" at XX:XX:XX:XX:XX:XX (WEP required)

 *    WEP key is not set for "Pro 1" - not connecting

 *    Couldn't associate with any access points on ath0

 *    Failed to configure wireless for ath0

```

My router is the first match found. It does not broadcast its ESSID.

I can, however, connect fine by manually setting essid and WEP key then running ifconfig ath0 up.

----------

## UberLord

 *yangman wrote:*   

> 
> 
> My router is the first match found. It does not broadcast its ESSID.
> 
> I can, however, connect fine by manually setting essid and WEP key then running ifconfig ath0 up.

 

So, if it's not broadcasting ESSID, how does the script know the ESSID to associate with?

You need to tell it - wireless.example has a good and clear example for howto associate a MAC address (which is always broadcast) with and ESSID

----------

## UberLord

 *yangman wrote:*   

>  *UberLord wrote:*   Well, I know for sure that madwifi supports scanning - bug the developers or check their FAQ to get it working. 
> 
> According to the MadWifi FAQ, ifconfig ath0 up needs to be run before scanning is avaliable. It appears that that isn't the case with the script.

 

As the main developer of the scripts and an owner of a NetGear 311 - which requires the madwifi driver - I can assure you that the interface is up before scanning.

In fact, every driver I know of needs the interface to be up to be able to scan.

----------

## UberLord

 *mokiearny wrote:*   

>  *harlequin11 wrote:*   Thanks Uber'.
> 
> That returns;
> 
> ```
> ...

 

Interesting.

I'll have to build a parition on my AMD64 in pure 32-bit to see if I can replicate this on my NetGear 311.

----------

## yangman

Hm... I was under the impression that scanning would receive replies from the AP which include ESSID information. I've mapped ESSID to the MAC address of my router -- I'll give it another try when I get home from school tonight.

However, with the workaround, I can now successfully connect to my school's open networks using the script.  :Very Happy: 

----------

## andrewbarr

Are there any plans to integrate wpa_supplicant and/or xsupplicant into these scripts? My home network now uses WPA and most of the APs here on campus use LEAP.

----------

## UberLord

 *yangman wrote:*   

> Hm... I was under the impression that scanning would receive replies from the AP which include ESSID information. I've mapped ESSID to the MAC address of my router -- I'll give it another try when I get home from school tonight.
> 
> However, with the workaround, I can now successfully connect to my school's open networks using the script. 

 

On most AP's you can choose not to broadcast the ESSID.

However, you still need to know the ESSID to connect.

----------

## UberLord

 *andrewbarr wrote:*   

> Are there any plans to integrate wpa_supplicant and/or xsupplicant into these scripts? My home network now uses WPA and most of the APs here on campus use LEAP.

 

Yes there are.

I have WPA hardware - but I'm having problems getting wpa_supplicant to work outside of the scripts. So until I get this working there won't be any immediate support - unless someone sends me patches  :Wink: 

LEAP users already work fine - they can launch LEAP in the preup user function in /etc/conf.d/net

I don't have LEAP myself, so I'm unsure about how to help you futher.

----------

## yangman

With the workaround, the script now works perfectly for both home and school.  :Very Happy: 

----------

## MrSandman666

Hi guys...

I've been using the old wireless-config ebuild for a while now and have been very happy with it. Worked like a charm. Well, recently I managed to totaly b0rk my system and thus had to reinstall gentoo. This worked pretty well but of course I can't get wireless config any more. I now tried the new baselayout and things just don't work out.

Whenever I fire up eth1 I can only connect to my neighbor's AP but not my own. My neighbor's AP is wide open, broadcasts its SSID and has no encryption, so no problem there. Mine is relatively locked down. No SSID Broadcast, 128 bit encryption and MAC Filter. For some reason I can't find it any more under Gentoo (Windows XP still works fine - so it's not the AP).

even with 

```
iwlist eth1 scanning
```

 I can't find it. It's just not there.

I tried assigning it's MAC to the ESSID via mac_essid_xxxx but to no avail. 

Any idea what could be going wrong here? Thanks a lot...

BTW, I'm using the current ~x86 ipw2100 drivers...

----------

## Butts

Still can't get the new baselayout. Please see my issues here.

Thanks,

Matt

----------

## trad511

First, thanks for all your work UberLord.  I've been with your work 

since the "download from my site" days.  Great to see your work 

integrated with the baselayout!

Second, thanks mokiearny for your research and resolution.

I spent many an hour trying to get my ath0 ifx to come up via the 

new wireless networking scripts, but to no avail.  Bringing things up 

by hand was no big deal though.

mokiearny, you hit the mode change on the head for my case.   Ran 

through your (below) iwpriv example and things worked.  The 

only way I could get the ifx to run was by running the startup 

script 2x or by adding the preup() function given my mokiearny.

 *Quote:*   

> Put in your /etc/conf.d/wireless
> 
> Code:
> 
>  iwpriv_ath0="mode 2"
> ...

 

Interesting indeed! 

Am attempting to track the reasoning down and will let all know if

I find anything.

----------

## Bob Paddock

I'm trying to bring up a WG511 on a Thinkpad 600 for the first time.

I am getting an error message that I do not understand.

When I do /etc/init.d/net.eth1 start

I get:

* Starting eth1

*  Bringing up eth1

*   eth1 dhcp

*    Running dhcpcd...

/sbin/runscrip.sh: line 307: rc_splash: command not foound [!!]

I have no clue what this rc_splash stuff is all about.  Only place I

see rc_splash is in /etc/init.d/functions.sh.

/etc/init.d/net.eth0 start works fine.

Ideas?

----------

## UberLord

 *trad511 wrote:*   

> First, thanks for all your work UberLord.  I've been with your work 
> 
> since the "download from my site" days.  Great to see your work 
> 
> integrated with the baselayout!
> ...

 

There appears to be a bug in some versions of the madwifi driver in portage which causes this problem. The latest version in ~x86 should fix it.

----------

## UberLord

 *MrSandman666 wrote:*   

> Mine is relatively locked down. No SSID Broadcast, 128 bit encryption and MAC Filter. For some reason I can't find it any more under Gentoo (Windows XP still works fine - so it's not the AP).

 

Maybe you had the wrong MAC address.

Try broadcasting your AP and double check it with iwconfig.

----------

## fatboyjim

OK go easy on the newb... i've read quite a few pages here but feel I need specialist help  :Wink: 

I've got _no_ internet connection other than through wireless

Dell Inspiron 5150

PCMCIA Netgear WG511T

Connecting to a WAP with no WEP  :Very Happy: 

Could somebody please give me a rough step-by-step for doing this networkless? 

I installed Stage 3 from a Universal Live CD... and have the packages CD if I need it for this... I can also download stuff from Windows if you gimme the link... and copy it when I'm in my gentoo install...

Using gentoo-dev-sources which is kernel-2.6.7-gentoo-r11

Any more info you need from me I will be sure to supply  :Wink: 

TIA  :Very Happy: 

----------

## MrSandman666

I did some checks and I can log onto the router manually with iwconfig. It just doesn't work with the scripts. I will try with broadcasting later, however this is nothing I want to keep.

----------

## UberLord

 *MrSandman666 wrote:*   

> I did some checks and I can log onto the router manually with iwconfig. It just doesn't work with the scripts. I will try with broadcasting later, however this is nothing I want to keep.

 

It may be that you need to force preferred_aps list as the newer versions don't do this by default anymore.

Checkout the variable associate_order.

----------

## UberLord

 *fatboyjim wrote:*   

> OK go easy on the newb... i've read quite a few pages here but feel I need specialist help 
> 
> I've got _no_ internet connection other than through wireless
> 
> I installed Stage 3 from a Universal Live CD... and have the packages CD if I need it for this... I can also download stuff from Windows if you gimme the link... and copy it when I'm in my gentoo install...
> ...

 

Provided you can get the correct kernel driver working for your wireless card, you'll need a recent portage snapshot. Once you have a snapshot that contains the sys-apps/baselayout-1.11.3.ebuild or newer, edit the ebuild file (/usr/portage/sys-apps/baselayout/baselayout-1.11.3.ebuild) to find what files you need.

The current one is rc-scripts-1.6.3.tar.bz2 - which can be downloaded from a good gentoo mirror.

You'll need to repeat the process for the net-wireless/wireless-tools ebuild.

----------

## MrSandman666

 *UberLord wrote:*   

> 
> 
> It may be that you need to force preferred_aps list as the newer versions don't do this by default anymore.
> 
> Checkout the variable associate_order.

 

Thanks! That worked.

Just one more issue:

I have both eth0 and eth1 added to the default runlevel. However, when I boot, only the status information for eth0 is shown. Both interfaces are properly initialized but I get no messages whatsoever for eth1. Later, when I start or restart eth1 by hand, everything is shown properly. Any ideas? Thanks!

----------

## UberLord

 *MrSandman666 wrote:*   

> 
> 
> Just one more issue:
> 
> I have both eth0 and eth1 added to the default runlevel. However, when I boot, only the status information for eth0 is shown. Both interfaces are properly initialized but I get no messages whatsoever for eth1. Later, when I start or restart eth1 by hand, everything is shown properly. Any ideas? Thanks!

 

Oh - thats easy.

Hotplug is starting eth1 for you - and it does this without echoing any messages to the console.

----------

## MrSandman666

And, um.... can I do something about this?

I really want to see what my card is doing during bootup but I also need hotplug. Is there any way to change this? It did work before, with the old scripts after all (but back then I wasn't running udev either...)

----------

## el toro

Well, so I updated to the latest baselayout (1.11.3) and experienced the lovely fsck error that so many people have been complaining about--to fix this I downgraded back to baselayout 1.10.4 and now my wireless pcmcia card doesn't start on boot.  In fact, it doesn't really start at all.  At boot, it just says bringing up eth1 [ok], without getting an ip or finding my ap or anything like that, so I stop it once I'm at a terminal.  However, when I run 

```
/etc/init.d/net.eth1 start
```

 it just says "ok", without bringing my card up or anything.  I have it symlinked to net.lo, but I checked the contents of net.eth1 and they are the exact same as net.lo, which I don't think they were previously.  I'm just hoping I did something silly when I was doing etc-update and that a simple tweak of a config file will return my wireless card to its former glory...Thanks for any help anyone can offer--I realize I'm being a little vague, but I'm not quite sure what the problem is, so I can't exactly give a detailed description.

----------

## funklord

 *Bob Paddock wrote:*   

> I'm trying to bring up a WG511 on a Thinkpad 600 for the first time.
> 
> I am getting an error message that I do not understand.

 

I'm not sure about your particular error message, but I followed  this guide to setting up a WG511 on my Thinkpad T21. Sorry if this is all stuff you know already.

----------

## funklord

 *el toro wrote:*   

> Well, so I updated to the latest baselayout (1.11.3) and experienced the lovely fsck error that so many people have been complaining about--to fix this I downgraded back to baselayout 1.10.4 and now my wireless pcmcia card doesn't start on boot.

 

I fought with this same problem yesterday, and I couldn't get wireless to work with 1.10.4 or a combination of 1.10.4/1.11.3. My solution was this:

- emerge udev and baselayout (1.11.3) There's a spartan guide to upgrading/changing to udev here.

- recompile the kernel without devfsd support (make a backup!)

- setup the networking stuff with UberLord's directions

And it worked like a charm. This was after about 6 hours of trying to get any network capability to work.

----------

## joejag

hey el toro,

If you went back to 1.10 then you have probably reset your /etc/conf.d/net so it has nearly nothing uncommented.  Hence the lack of action!

You need to set your networking device in there.

----------

## TiE10

Hey again, 

everything was working fine until i did a bad etc-update... instead of rewriting everything, there's more stuff about that here: 

https://forums.gentoo.org/viewtopic.php?p=1691150#1691150

but yea, my eth1 disappeared and then later became my ethernet, and my eth0 somehow became my wireless. I changed my conf.d/wireless to:

```

mode_eth0="managed"

preferred_aps=( "DLINK-HOME" "linksys" "belkin54g" )

sleep_associate_eth0="5"

key_DLINK_HOME="open 000*******"

```

when i tried to start wireless as eth0, it just says:

```

root@phoenix4188 tie10 # /etc/init.d/net.eth0 start

 * Bringing eth0 up via DHCP...                                           [ !! ]

```

and seems not to be using the conf.d/wireless at all. If possible, I'd like to revert wireless back to eth1 and ethernet back to eth0 and know if there's anything wrong with my conf.d/wireless that may be causing this problem.

thx

----------

## TiE10

sorry, also forgot to add that my  modules.autoload.d/kernel-2.6 file got overwritten too and i forgot what network modules i had in there... anyway is there any way i can check?

----------

## el toro

joejag:

I've checked my /etc/conf.d/net--all that's uncommented are my ethernet and wireless cards like so:

```
ifconfig_eth0=( "dhcp" )        # for ifconfig

ifconfig_eth1=( "dhcp" )

```

So...I'm not sure what I've done but I'd sure like to fix it without the hassle/possible danger of doing a full-on udev migration.

----------

## UberLord

 *el toro wrote:*   

> joejag:
> 
> I've checked my /etc/conf.d/net--all that's uncommented are my ethernet and wireless cards like so:
> 
> ```
> ...

 

DHCP is the default - you don't need to specify anything in conf.d/net - we try and autmate things as much as possible  :Smile: 

I'm on a udev system myself, so I can't really comment about the apparent udev problem

----------

## UberLord

 *MrSandman666 wrote:*   

> And, um.... can I do something about this?
> 
> I really want to see what my card is doing during bootup but I also need hotplug. Is there any way to change this? It did work before, with the old scripts after all (but back then I wasn't running udev either...)

 

Sure you can - you can stop hotplug from starting net devices by removing /etc/hotplug/net.agent

----------

## UberLord

 *TiE10 wrote:*   

> 
> 
> when i tried to start wireless as eth0, it just says:
> 
> ```
> ...

 

Looks like you've overwritten net.eth0 by mistake - ensure that >baselayout-1.10 is installed and link net.eth0 to net.lo and try again

----------

## tisham

Hi guys,

It i have just built a level 1 system , my kernel is compiling for the 12th time with the serial_cs driver i dug up thanks to the forum.I use an Atmel chipset wifi card, got the driver from sourceforge.It is pretty good and used to work on suse.But the gentoo network config is a bit confusing, i have symlinked net.atml0 to net.eth0, the driver loads up and ataches to atml0. The wireless extension is working, i can scan and see the AP's available, but i can't associate with any. How do I fix this, to scan i go iwlist atml0 scanning.iwspy also works and gets me all the active macs it can locate  :Smile: 

hey I force associated and it works seems i need to add any  to my iwconfig  :Smile: 

----------

## cricalix

I've just uninstalled linux-wlan-ng in an attempt to switch to the new baselayout etc.

Kernel is 2.6.7-gentoo-r11, wireless is enabled, baselayout 1.11.3 is installed, pcmcia-cs is installed, as is wireless tools.  Card is a WPC11 V3.  iwconfig tells me that eth1 has no wireless extensions.

No wireless extensions makes it a bit hard to config the card to talk to the AP properly  :Smile: 

I've trawled through this thread and the starter thread, but I haven't seen anything (too much text!).

Help?

----------

## mäkke_renamed

hm... I upgraded today to the latest baselayout (1.11.4) - and then my wireless stoped working. I had installed your old wireless-config, which I unmerged now, replaced all files from the baselayout and it doesn't really work  :Sad: 

```
iwlist eth1 scan

eth1      Scan completed :

          Cell 01 - Address: 00:00:00:00000

                    ESSID:"AccessPoint"

                    Protocol:IEEE 802.11b

                    Mode:Master

                    Channel:1

                    Encryption key:on

                    Bit Rate:11 Mb/s

                    Extra: Rates (Mb/s): 1 2 5.5 11 

                    Extra: Signal: -62  dBm 

                    Extra: Last beacon: 23ms ago

```

the wireless adaptor works fine, but I can't get a connection with my AccessPoint. 

```
cat /etc/conf.d/wireless

mode_eth1="Managed"

essid_eth1="AccessPoint"

channel_eth1="1"

key_AccessPoint="[1] xxxx key [2] xxxx key [3] xxxx key [4] xxxx key [2]"

preferred_aps=("AccessPoint")

```

and in the /etc/conf.d/net there is just that eth1 should be dhcped...

```
/etc/init.d/net.eth1 start

 * Starting eth1

 *    Configuring wireless network for eth1

 *      Connecting to "AccessPoint" (WEP enabled) ...                                         [ !! ]

```

```
dmesg

eth1: Associated with 'AccessPoint' at 11Mbps, channel 1 (BSSID=00:a0:c5:50:47:1c)

eth1: Association lost.

```

I am pretty shure that the wep-keys are right, because they are in the wireless file for a long time. 

somebody got an idea what's wrong?

thanx! && greetz

----------

## UberLord

 *cricalix wrote:*   

> I've just uninstalled linux-wlan-ng in an attempt to switch to the new baselayout etc.
> 
> Kernel is 2.6.7-gentoo-r11, wireless is enabled, baselayout 1.11.3 is installed, pcmcia-cs is installed, as is wireless tools.  Card is a WPC11 V3.  iwconfig tells me that eth1 has no wireless extensions.
> 
> No wireless extensions makes it a bit hard to config the card to talk to the AP properly 
> ...

 

You may need to re-compile and install your kernel modules if you recently enabled wireless extensions in the kernel.

You may need to re emerge wireless-tools as well

----------

## cricalix

 *UberLord wrote:*   

>  *cricalix wrote:*   
> 
> No wireless extensions makes it a bit hard to config the card to talk to the AP properly 
> 
>  
> ...

 

Hmm, I've done all of that unfortunately.  I'll have to give it another spin when I'm not at work.

----------

## UberLord

You may still be using the linux-wlan-ng driver which doesn't support wireless-tools yet.

----------

## UberLord

[quote="mäkke"]

```
cat /etc/conf.d/wireless

mode_eth1="Managed"

essid_eth1="AccessPoint"

channel_eth1="1"

key_AccessPoint="[1] xxxx key [2] xxxx key [3] xxxx key [4] xxxx key [2]"

preferred_aps=("AccessPoint")

```

Here's an optimsied one - managed is default and you don't set a channel for managed mode

```

essid_eth1="AccessPoint"

key_AccessPoint="[1] xxxx key [2] xxxx key [3] xxxx key [4] xxxx key [2]"

preferred_aps=("AccessPoint")

```

 *Quote:*   

> 
> 
> ```
> dmesg
> 
> ...

 

Well, that shows it lost association.

Maybe there's something interfering with the wireless signal

----------

## Butts

I am using the following workaround, but I am only getting a connection of 11Mbps. My router and my card are capable of 54Mbps. Any ideas as to how to correct this?

I can live without scanning as I know the name ESSID of all the access points I use, but without this workaround it never associates with any of them.

 *UberLord wrote:*   

>  *mokiearny wrote:*    *harlequin11 wrote:*   Thanks Uber'.
> 
> That returns;
> 
> ```
> ...

 

----------

## mäkke_renamed

thank you for the "optimised" config Uberlord. The problem was solved with a reboot, don't know what really changed - but it works  :Wink: 

----------

## UberLord

 *Butts wrote:*   

> I am using the following workaround, but I am only getting a connection of 11Mbps. My router and my card are capable of 54Mbps. Any ideas as to how to correct this?

 

iwconfig_ath0="rate 54M"

----------

## jammey97

use mode 3 if you're using 11g, mode 2 for 11b,  mode 1 for 11a

mode 0 is supposed to autoselect but I guess that's not quite working properly with scanning yet

 *Butts wrote:*   

> I am using the following workaround, but I am only getting a connection of 11Mbps. My router and my card are capable of 54Mbps. Any ideas as to how to correct this?
> 
> I can live without scanning as I know the name ESSID of all the access points I use, but without this workaround it never associates with any of them.
> 
> 

 

----------

## Butts

 *UberLord wrote:*   

>  *Butts wrote:*   I am using the following workaround, but I am only getting a connection of 11Mbps. My router and my card are capable of 54Mbps. Any ideas as to how to correct this? 
> 
> iwconfig_ath0="rate 54M"

 

Thanks so much. Everything works seemlessly now.

----------

## BloodyNewbie

Hi Uberlord

Perhaps you remember me, I had a time ago problems with the madwifi-driver so I emerged madwifi-cvs instead.

Now I thought to maybe give the new drivers a try and it was ok, too:

I am using now:

Linux Gentoo 2.6.8.1 Kernel and emerged for my IBM a/b/g wlan card:

sys-apps/baselayout-1.11.4

sys-apps/sysvinit 2.85

net-wireless/madwifi-driver-0.1_pre20041019

net-wireless/madiwifi-tools-0.1_pre20041019

net-wireless/wireless-tools-27_pre26

I "installed" your net-scripts-1.0.3.tar.bz2

so far so good.

I linked all interfaces to net.lo (ln -s) as you tell and try to connect a wired iface

A stone falls from my heart, when I see it works(even if the procedure of getting the ip via dhcp goes WAY LONGER than with any script before...??).

After browsing through the bash scripts in /lib/rcscripts/net.modules.d/

I do the following first:

ifconfig ath0 up

iwlist ath0 scan

works perfectly! see all cells etc

for the memo: I have preferred_aps set to my ap, and the variable in the iwconfig script in /lib/rcscripts... gives that one back when I output it at runtime. because somehow my card doesnt seem to find any access points when going through the init script  :Sad:  but when then going to try preferred, it finds... so thanks for taking that out(someone here patched this, some posts ago, now I really don't get into wlan anymore, cause it breaks up after not finding an ap, here you go:

```

# /etc/init.d/net.ath0 start

 * Starting ath0

 *    Configuring wireless network for ath0

 *    ath0 does not support scanning

 [*    "public" are the preferred apps] <-- put this in by myself

 *      no access points found

 *    Couldn't find any access points on ath0

 *    Failed to configure wireless for ath0

```

/var/log/message says the same lines as rc-scripts: messages(so this didn't help me).

I am atm studying:

man test

and

man bash

just to get my wlan to work!

Uberlord, don't get me wrong, trying to figure out things and having for that more than several months makes me a bit harsh, but this doesn't go against you, I really am very thankful, that you are doing all that for the community, and I'd like to help whereever I could.

But I have to say something else, truly 'cause of open source issue: the net.* script is more than just cryptic and I wonder why no one else mentioned that before... I could read the init script for the stable baselayout but now it's all gone impossible to understand anymore....

I would highly appreciate more comments(I know, there already are, but imo they don't help much for the understanding).

Or is this only me?.. eg:

```

        local x="$*"

        [[ $# -gt 1 ]] && x=$( echo -e "${x// /\n}" | sort | xargs )

```

 :Smile: 

Next section could be helpful for others:

However, before switching to the new baselayout I found out that in your script, you would have to switch on one point a dhcpcd "-z" with a "-k" because one deletes the cache DHCP-given IP(in binary under /var/cache..) and one doesn't!

I now saw lots of threads that claim about that, so if the got under /var/log/messages an IP seeing in the cache by dhcpcd, you know, that this ain't good, you have to delete the cache after a stop of the interface.

Also Uberlord your ebuild links to rsm1.demon.co.uk, but this link doesn't work for me, I can't find that server adress, you could put out the 1 for downloading the newest tar...

Hope this helps others...

Thanks for these scripts anyway very very much !!

And thanks for any answers  :Smile: 

I know that we are "on the front" of the developement, so I say it again: Nothing in this posting is meant to be an emotional attack against you  :Smile: 

greets and thx for everything

Patrick Fehr

----------

## mokiearny

 *Butts wrote:*   

> I am using the following workaround, but I am only getting a connection of 11Mbps. My router and my card are capable of 54Mbps. Any ideas as to how to correct this?
> 
> 

 

try 'iwpriv athX mode 3' (mode 2 only supports up to 11MBit).

[EDIT]

OKOKOK! First i should read, and the write... *g* Already answered.

Another problem:

I have two cards. One build in, one cardbus. I'm sitting in my favourite beer-bar, playing with my notebook. The AP is far away, but both cards can 'see' it. I start the first (buldin, ath0) one, but fails to DHCP. If i start the second one (ath1, cardbus), it fails with 'AP already assiosated' (unique_ap="yes"). If i set unique_ap="no" ath1 can conncet.

I think it is better to check for unique_ap only if the interface is successfully 'up'.

----------

## cricalix

 *UberLord wrote:*   

>  *cricalix wrote:*   
> 
> No wireless extensions makes it a bit hard to config the card to talk to the AP properly 
> 
>  
> ...

 

Built a new kernel (time to upgrade anyway), and now iwconfig is showing information for eth1.  It's not associating properly yet, but at least I can see stuff!

----------

## fatboyjim

 *fatboyjim wrote:*   

> OK go easy on the newb... i've read quite a few pages here but feel I need specialist help 
> 
> I've got _no_ internet connection other than through wireless
> 
> I installed Stage 3 from a Universal Live CD... and have the packages CD if I need it for this... I can also download stuff from Windows if you gimme the link... and copy it when I'm in my gentoo install...
> ...

 

 *Uberlord wrote:*   

> 
> 
> Provided you can get the correct kernel driver working for your wireless card 

 

How do I go about doing this? I've installed Prism54 drivers and support for Wireless in menuconfig for the kernel (2.6), is that what you mean? And should I compile these into the kernel (as I have done) or as modules?

 *Uberlord wrote:*   

> 
> 
> You'll need a recent portage snapshot. 
> 
> 

 

OK, I can manage that one, do I just do

tar -xvjf portage-xxxxxxxxx.tar.bz2 -C /usr ?

 *Uberlord wrote:*   

> 
> 
> Once you have a snapshot that contains the sys-apps/baselayout-1.11.3.ebuild or newer, edit the ebuild file (/usr/portage/sys-apps/baselayout/baselayout-1.11.3.ebuild) to find what files you need. The current one is rc-scripts-1.6.3.tar.bz2 - which can be downloaded from a good gentoo mirror.
> 
> 

 

OK, so edit the ebuild, look for a list of files? Download rc-scripts-1.6.3.tar.bz2 and put it where? And do what with it? (Sorry about this)

 *Uberlord wrote:*   

> 
> 
> You'll need to repeat the process for the net-wireless/wireless-tools ebuild.

 

OK  :Very Happy: 

Thanks for putting up with me

Jim

----------

## UberLord

 *mokiearny wrote:*   

> I have two cards. One build in, one cardbus. I'm sitting in my favourite beer-bar, playing with my notebook. The AP is far away, but both cards can 'see' it. I start the first (buldin, ath0) one, but fails to DHCP. If i start the second one (ath1, cardbus), it fails with 'AP already assiosated' (unique_ap="yes"). If i set unique_ap="no" ath1 can conncet.
> 
> I think it is better to check for unique_ap only if the interface is successfully 'up'.

 

Thats probably a good idea.

----------

## UberLord

 *fatboyjim wrote:*   

> 
> 
> How do I go about doing this? I've installed Prism54 drivers and support for Wireless in menuconfig for the kernel (2.6), is that what you mean? And should I compile these into the kernel (as I have done) or as modules?

 

You also need the prism54 firmware installed properly, along with hotplug. Check the prism54 site for this

 *Quote:*   

> 
> 
>  *Uberlord wrote:*   
> 
> You'll need a recent portage snapshot. 
> ...

 

I think so - Gentoo install docs should tell you

 *Quote:*   

> 
> 
>  *Uberlord wrote:*   
> 
> Once you have a snapshot that contains the sys-apps/baselayout-1.11.3.ebuild or newer, edit the ebuild file (/usr/portage/sys-apps/baselayout/baselayout-1.11.3.ebuild) to find what files you need. The current one is rc-scripts-1.6.3.tar.bz2 - which can be downloaded from a good gentoo mirror.
> ...

 

/usr/portage/distfiles

----------

## boobytrapped

Hello UberLord.

I have a LEAP setup at work using a cisco aironet card.. Currently i have a shell script that manages my interface that I run whenever I reach work:

```

iwconfig eth2 essid SOMETHING commit

/opt/cisco/bin/leapscript 'me@what.com' 'secret'

dhcpcd -d eth2

```

I was trying to automate this process (and use the 'Gentoo Way') by putting my leap login in the preup function in /etc/conf.d/net.  The problem I am running into is that for LEAP to work, the interface needs the essid to be set before I attempt the leap login.   So I copied the first two lines of my script into the preup for eth2.. however this is what I get when I try to start net.eth2:

```
 * Starting eth2

 *    Running preup function

 *       Attempting to authenticate on LEAP...

me@what.com authenticated

 *    Configuring wireless network for eth2

 *      Connecting to "SOMETHING" (WEP Disabled) ...                                                      [ !! ] *    Failed to configure wireless for eth2

```

Perhaps the problem is that since the interface is already associated before I reach the wireless module, it tries to associate again and drop the association that we have already.

Secondly, wouldn't it make more sense for us to scan and figure out that I am at a location where the "SOMETHING" Essid is present and then try to the LEAP authentication?

----------

## cricalix

 *cricalix wrote:*   

>  *UberLord wrote:*   
> 
> You may need to re-compile and install your kernel modules if you recently enabled wireless extensions in the kernel.
> 
> You may need to re emerge wireless-tools as well 
> ...

 

Well, it still refuses to associate, and this is a problem I've had before with the kernel drivers vs the linux-wlan-ng drivers:

```

Oct 28 09:47:04 [cardmgr] socket 1: Linksys WPC11 11Mbps 802.11b WLAN Card

Oct 28 09:47:04 [kernel] orinoco 0.13e (David Gibson <hermes@gibson.dropbear.id.au>, Pavel Roskin <proski@gnu.org>, et al)

Oct 28 09:47:04 [kernel] orinoco_cs 0.13e (David Gibson <hermes@gibson.dropbear.id.au>, Pavel Roskin <proski@gnu.org>, et al)

Oct 28 09:47:05 [kernel] eth1: Station identity 001f:0002:0001:0004

Oct 28 09:47:05 [kernel] eth1: index 0x01: Vcc 5.0, irq 11, io 0x0100-0x013f

Oct 28 09:47:06 [cardmgr] executing: './network start eth1 2>&1'

Oct 28 09:47:06 [cardmgr] +  * WARNING:  "net.eth1" has already been started.

Oct 28 09:47:06 [rc-scripts] WARNING:  "net.eth1" has already been started.

Oct 28 09:47:07 [rc-scripts] eth1 does not support scanning

Oct 28 09:47:07 [kernel] eth1: New link status: Disconnected (0002)

Oct 28 09:47:07 [rc-scripts] no access points found

Oct 28 09:47:07 [rc-scripts] Couldn't find any access points on eth1

Oct 28 09:47:07 [rc-scripts] Failed to configure wireless for eth1

grep -v '#' wireless

key_critical="s:rightkey"

mac_key_0040055d8a27="s:rightkey"

mac_key_0040055e240a="s:rightkey"

preferred_aps_eth1=( "critical" )

```

The AP is a DLink, using shared keys.  If I boot Windows, it'll talk to me usually (though it took an upgrade to SP2 to get it to work reliably).  The two MACs are the wired and wireless side of the AP - it's almost as if the WPC11 doesn't support MAC broadcasting?

If I hardcode the essid for eth1, 

```

Oct 28 09:25:34 [kernel] eth1: New link status: Disconnected (0002)

Oct 28 09:25:34 [kernel] eth1: New link status: Association Failed (0006)

Oct 28 09:25:44 [rc-scripts] Failed to configure wireless for eth1

```

----------

## UberLord

 *cricalix wrote:*   

> 
> 
> ```
> 
> key_critical="s:rightkey"
> ...

 

Firstly, that setting only works for the MAC address of the AP you're connecting to - not cards on the other side.

Secondly, orinoco cards do not support scanning in standard kernels

http://www.tzi.de/~plasmahh/orinoco.html

That page has a patch that enables scanning

Thirdly, you could use the option essid_eth1="any" which forces the driver to pick any AP it can find

 *Quote:*   

> 
> 
> If I hardcode the essid for eth1, 
> 
> ```
> ...

 

Well, the WEP key is wrong - shared means it will not associate unless the key is correct.

----------

## UberLord

 *boobytrapped wrote:*   

> Hello UberLord.
> 
> I have a LEAP setup at work using a cisco aironet card.. Currently i have a shell script that manages my interface that I run whenever I reach work:
> 
> 

 

At present there's nothing you can do without hacking the wireless module.

There used to be a preassociate_ESSID script function, but that was removed. Hopefully there will be something we can replace it with soon  :Smile: 

----------

## fatboyjim

OK, I have come home for the weekend so I can get an internet connection through my network (which works perfectly)

Unfortunately, I'm having trouble getting this PCMCIA Netgear WG511T card working

I can paste/PM anything you want, but excuse my stupidity  :Very Happy: 

OK, here's what I've done

compiled pcmcia support into the kernel

emerged pcmcia-cs

copied firmware to /usr/lib/hotplug/firmware (a directory I had to create) and renamed it

added yentoo_socket and prism54 to modules.autoload.d/kernel-2.6

emerged baselayout-1.11.4

emerged sysvinit-2.8.4 (a dep for the above)

I just can't see where to go next, net.eth1 doesn't exist, net.lo isn't in conf.d so I can't symlink to net.eth1

Although the light is on the card, I don't think it's "functioning"

Any ideas? Need any more info?

Cheers,

Jim

----------

## UberLord

 *fatboyjim wrote:*   

> 
> 
> compiled pcmcia support into the kernel
> 
> emerged pcmcia-cs
> ...

 

You don't need pcmcia-cs - that's really only for 16-bit cards. Hotplug takes care of pcmcia cards now  :Smile: 

net.lo is in /etc/init.d - here's some steps for you

```

cd /etc/init.d

ln -sf net.lo net.eth1

```

----------

## cricalix

 *UberLord wrote:*   

>  *cricalix wrote:*   
> 
> The two MACs are the wired and wireless side of the AP - it's almost as if the WPC11 doesn't support MAC broadcasting?
> 
>  
> ...

 

I realise that, but last time I tried to make the two APs talk to each other, the client one wanted the LAN side MAC of the master AP.  Go figure.

 *Quote:*   

> 
> 
> Thirdly, you could use the option essid_eth1="any" which forces the driver to pick any AP it can find
> 
> 

 

Tried that, didn't like me.

 *Quote:*   

> 
> 
> Well, the WEP key is wrong - shared means it will not associate unless the key is correct.

 

I know the key is correct - pulled it from the AP to be sure.  Same key works in windows just fine.

----------

## fatboyjim

hmm, well i unmerged pcmcia-cs... and now cardmgr doesn't work at boot.. "make sure pcmcia support is in your kernel"... well, it is

eth1 still "doesn't exist"

Jim

----------

## UberLord

 *fatboyjim wrote:*   

> hmm, well i unmerged pcmcia-cs... and now cardmgr doesn't work at boot.. "make sure pcmcia support is in your kernel"... well, it is
> 
> eth1 still "doesn't exist"
> 
> Jim

 

You shoudn't need cardmgr anymore.

Does ifconfig -a report eth1? What does dmesg say

----------

## UberLord

 *cricalix wrote:*   

> 
> 
> I know the key is correct - pulled it from the AP to be sure.  Same key works in windows just fine.

 

So, you could for example disable WEP and it works?

----------

## harlequin11

Okay, so I've got like 10 minutes between jobs, so I'm giving this another shot  :Very Happy: .

I've made some progress by using the iwpriv mode 3 mentioned below. I'm now getting the following;

```

/etc/init.d/net.ath0 start

* Starting ath0

*     Loading networking modules for ath0

*          modules: wireless ifconfig dhcpcd

*               ifconfig provides interface

*               dhcpcd provides dhcp

*     Configuring wireless network for ath0

*     Scanning for access points

*          Found "LIAMEGAN" at 00:0F:66:49:1C:93 (WEP required)

*          Connecting to "LIAMEGAN" (WEP enabled)

*     Couldn't associate with any access points on ath0

*     Failed to configure wireless for ath0

```

I know this doesn't diagnose the problem in and of itself, but I've been trying to debug this myself for a while now and am hitting a brick wall.

iwlist ath0 scan works and finds my network - after, of course, upping my ath0  :Embarassed:  .

my /etc/conf.d/wireless is as follows;

```

mode_ath0="Managed"

channal_ath0="11"

key_LIAMEGAN="A78D1A37B1"

preferred_aps=("LIAMEGAN")

```

I realise that I shouldn't need a couple of those options, but this is a greatly edited file at the moment.

Please let me know what I can do to provide you with more information. Do I need to set the bit rate of the card? Every time I run an iwlist scan I get a Quality value of 0/94.

Cheers,

.L

[quote="UberLord"] *mokiearny wrote:*   

>  *harlequin11 wrote:*   Thanks Uber'.
> 
> That returns;
> 
> ```
> ...

 

----------

## UberLord

@harlequin11, play around with the associate_test variable - documented in /etc/conf.d/wirless.example

----------

## harlequin11

 *UberLord wrote:*   

> @harlequin11, play around with the associate_test variable - documented in /etc/conf.d/wirless.example

 

Thanks uberLord, and now it works, hmm, strange.

I set associate_test to "MAC" and all of a sudden it all works nicely, but in the example file it says that if it isn't explicitly set it defaults to MAC.

Anyway, thanks so much for all of your help.

Cheers.

Liam.

----------

## codergeek42

Cools. Very nifty, UberLord. Good work  :Smile: 

----------

## UberLord

 *harlequin11 wrote:*   

> I set associate_test to "MAC" and all of a sudden it all works nicely, but in the example file it says that if it isn't explicitly set it defaults to MAC.

 

I can assure you that it does default to MAC - or my lappy wouldn't work.

----------

## Gentree

I have just emerged baselayout-1.1.4  and carefully vetted  the 38! changes called for by etc-udpate.

Mostly seems OK but whenever I open an aterm (my usual terminal prog) I get the following:

```
-bash: would: command not found
```

Is it serious Doctor?

Thx  :Cool: 

----------

## Gaspode

 *trad511 wrote:*   

> 
> 
> I spent many an hour trying to get my ath0 ifx to come up via the 
> 
> new wireless networking scripts, but to no avail.  Bringing things up 
> ...

 

Hm. I have the same problem; however I seem to have found out that the atheros device just needs a couple of seconds to initialize after bringing it up. I can reproduce this behavior manually:

```

[~] # ifconfig ath0 up

[~] # iwlist ath0 scanning

ath0      Failed to read scan data : Resource temporarily unavailable

[~] # iwlist ath0 scanning

ath0      Scan completed :

```

There seems to be no reason to set a mode via iwpriv; and I think all these workaround floating around actually don't do more than killing enough time for the card to initialize.

In baselayout-1.11.4, I modified /lib/rcscripts/net.modules.d/wireless as follows:

```

iwlist() {

         /sbin/ifconfig ath0 up

        sleep 5

        LC_ALL=C /usr/sbin/iwlist "$@"

}

```

Note the sleep -- any value less than 5 would not be sufficient on my machine. With this modification, the card started reliably. I think the call to ifconfig is useless, since the device should be up by this point -- but back then, I wasn't sure about that.

After upgrading to baselayout-1.11.5, I tried the same thing in net.modules.d/iwconfig, but interestingly, this does not seem to work during boot anymore (it _did_ with 1.11.4!)... but if I execute 'net.ath0 start' manually, it always works. I don't know why the script would not work during the boot process.

It also happened a couple of times that, when I called /etc/init.d/net.ath0 start manually, after that net.eth0 would be automatically started. Why? Doing the same thing again would not have that effect (and it shouldn't, since eth0 is inactive).

As a sidenote: I liked the output of the 1.11.4 version more than the more compact of the current version. I always get nervous if something works for 10 seconds and produces no output. In particular the list of found essids was pretty neat to have. Would it be possible to get that output back?

Thanks to the network guys for the great work, by the way. I've been looking for a good way to automatically configure for different essids for quite a while and was very positively surprised when this possibility suddenly showed up in baselayout!

----------

## UberLord

 *Gaspode wrote:*   

> 
> 
> In baselayout-1.11.4, I modified /lib/rcscripts/net.modules.d/wireless as follows:
> 
> ```
> ...

 

in /etc/conf.d/wireless

```

sleep_scan_eth0="5"

```

 *Quote:*   

> 
> 
> As a sidenote: I liked the output of the 1.11.4 version more than the more compact of the current version. I always get nervous if something works for 10 seconds and produces no output. In particular the list of found essids was pretty neat to have. Would it be possible to get that output back?

 

You can add the following to /etc/conf.d/rc

```

RC_VERBOSE="yes"
```

to see everything it's doing - and more!

After you've seen that output, you'll know why we put it in  :Wink: 

 *Quote:*   

> 
> 
> Thanks to the network guys for the great work, by the way. I've been looking for a good way to automatically configure for different essids for quite a while and was very positively surprised when this possibility suddenly showed up in baselayout!

 

And the good news is that you'll be able to keep your network per ESSID config settings even if you use a supplicant to control Access Point association and encryption  :Smile: 

----------

## UberLord

 *Gentree wrote:*   

> I have just emerged baselayout-1.1.4  and carefully vetted  the 38! changes called for by etc-udpate.
> 
> Mostly seems OK but whenever I open an aterm (my usual terminal prog) I get the following:
> 
> ```
> ...

 

Serious? Probably not.

Maybe it's a typo in your aterm config/profile. Do you get the same error with other terminals?

----------

## TooTallForPony

I've got a Thinkpad T42p with an Atheros AR5212 chipset.  After updating to the latest baselayout, I spent about 2 hours trying to get the wireless networking going.  It turns out that I only needed to change two lines in /etc/conf.d/wireless:

sleep_scan_ath0="5"

sleep_associate_ath0="30"

This chipset needs a LONG time to associate with the AP, it seems.  I don't know what the minimum value is, but 8 is not enough.

----------

## UberLord

 *TooTallForPony wrote:*   

> I've got a Thinkpad T42p with an Atheros AR5212 chipset.  After updating to the latest baselayout, I spent about 2 hours trying to get the wireless networking going.  It turns out that I only needed to change two lines in /etc/conf.d/wireless:
> 
> sleep_scan_ath0="5"
> 
> sleep_associate_ath0="30"
> ...

 

I really must get around to installing Gentoo on my AMD64 in 32bit mode so I can test athereos stuff again ....

The default sleep_scan setting is 0 seconds

The default sleep_assciate setting is 10 seconds

----------

## jonasmattsson

hello!

seems like a nice thing this netscript.

I'm wondering can netscript do this:

since i'm using a laptop with both an 10/100 ethernet car and an pcmcia wireless card, i want to be able to start the computer with or without network connection and with or without the pcmcia card connected, if i sudennly would connect with an network, wireless or ethernet, i just want it to start working (with dhcp). Same if i'm disconnecting and reconnect 5 hours later. i want there to be some kind of network monitor in the background that are looking for network connections to connect to.

i dont want to do 

```
sudo /etc/init.d/net.eth0 restart
```

 as soon as i need networking.

maybe this is the general idea with th script, but i dont really understand the guides.

i dont even under stand what to symlink from and to, example code wold be nice. i'm one of those who understand examples a thousand times better than long descriptions.

i'm sorry if there is redaundancy in this post, but if there is an general answere to this question i think it should be in the gentoo handbook.

----------

## UberLord

 *jonasmattsson wrote:*   

> i dont want to do 
> 
> ```
> sudo /etc/init.d/net.eth0 restart
> ```
> ...

 

Simple - for the wired interface then ifplugd is your man - and it's in portage  :Smile: 

For the wireless interface, you can use waproamd, wpa_supplicant or xsupplicant. For all of those three you will want to disable the wireless module as they will configure AP association and encryption. However, the per ESSID network settings will still work

```

modules=( "!wireless" ) # disable wireless module when using a supplicant

```

----------

## Gaspode

OK. I have put the sleep_scan_ath0=5 in my wireless, and when I start the device manually (/etc/init.d/net.ath0 start), everything works reliably. However, starting the device automatically at boot does _not_ work. It claims not to find wireless networks... so I have to log in to the console and restart the device by hand to make it work again.

I wonder what that could be? And just to remind you, using baselayout-1.11.4 with the sleep modification, the device would start without problems at boot. So something must have been changed between the two versions that causes autostart to break.

On a side note: Directly after boot, I log into the console and issue an /etc/init.d/net.ath0 start. The device starts up, but afterwards it tries to start net.eth0 (my wired IF) as well. Why would it do that? net.eth0 is not in any runlevels. And I don't need it either, since it is not even connected usually.

----------

## instauration

I have a HP zd7000 laptop with the internal Broadcom BCM4306 wireless controller. I use DriverLoader 2.09 to enable the card with Gentoo. After emerging baselayout-1.11.5  and setting up /etc/conf.d/wireless, all init scripts with a 'need net' dependancy fail to start on bootup. Additionally, while in the process of getting the wireless configuration set-up correctly, I rebooted a couple of times with non-working wireless settings and the init scripts (samba, nas, netmount, ntp-client, ntpd, postfix, sshd) had no problem starting. Why are the init scripts with 'need net' having errors if the wireless interface is set-up correctly and receiving an address? I didn't have this problem prior to baselayout-1.11.5. On a related note, VMWare also has issues in correctly performing a vmware-config.pl. Related? Also not an issue before the new baselayout.

----------

## instauration

I removed DriverLoader 2.09 and emerged ndiswrapper-0.11. Went through all configurations for ndiswrapper EXCEPT I forgot to `rc-update add net.wlan0 default`. Previously my wireless init was net.eth1 and I had done `rc-update del net.eth1 default` before finishing the config of ndiswrapper. Anyway, I rebooted before I remembered to do the `rc-update add net.wlan0 default` and everything came up fine (samba, nas, ntp-client, ntpd, etc...). I even had working wireless. So, I decide to try and do the "rc-update add" thing, then reboot. Well, this brought me back to those init services having errors again. So now I have net.wlan0 symlinked to net.lo but NOT booting at the default runlevel. I have added ndiswrapper to /etc/modules.autoload.d/kernel-2.6 and now when I reboot everything seems fine. Maybe if I had `rc-update del net.eth1 default` with the Linuxant DriverLoader this would also be the case, but I haven't reinstalled it to test.

----------

## hyperboloid

Hello.

I recently installed the new 1.11 baselayout and wireless works fine, but the wired network connection has stopped working.  My network interfaces are eth0 and eth1.  Before switching to the new baselayout both worked just fine, and eth0 pointed to the wired connection and eth1 pointed to the wireless.  Now when I start eth0 I get wireless (but eth0 used to point to the wired connection!) and when I try to start eth1 -- nothing.

I have looked at the scripts and it is not clear how it is determined whether the interface is for wire or wireless. In fact, there does not seem to be any information on how to configure one's wired networking with the new scripts. Anyone have any advice on this? 

This is on an IBM Thinkpad T41 with the 2.65 kernel. Both net.eth0 and net.eth1 are symlinked to net.lo and I'm using DHCP for both.  Here's the (verbose) output from trying to start eth1:

```
# /etc/init.d/net.eth1 start

 * Starting eth1

 *    Loading networking modules for eth1

 *       modules: iwconfig essidnet ifconfig dhcpcd

 *          iwconfig provides wireless

 *          ifconfig provides interface

 *          dhcpcd provides dhcp

 *    Wireless extensions not found for eth1

 *    Bringing up eth1

 *       eth1 dhcp

 *          Running dhcpcd ...                                            [ !! ]
```

and when I start eth0 here's what I get:

```
# /etc/init.d/net.eth0 start

 * Starting eth0

 *    Loading networking modules for eth0

 *       modules: iwconfig essidnet ifconfig dhcpcd

 *          iwconfig provides wireless

 *          ifconfig provides interface

 *          dhcpcd provides dhcp

 *    Configuring wireless network for eth0

 *    Scanning for access points

 *       Found "wlan" at 00:0C:41:B1:3E:A8 

 *       Found "linksys" at 00:04:5A:F1:62:58 

 *       Found "dl_wifi" at 00:0D:88:28:C8:28 

 *    "wlan" is not WEP enabled - ignoring setting

 *    Connecting to "wlan" (WEP Disabled) ...                             [ ok ]

 *       eth0 connected to "wlan" at 00:0C:41:B1:3E:A8

 *       in managed mode on channel 6 (WEP disabled)

 *    Configuring eth0 for "wlan" ...                                     [ ok ]

 *    Bringing up eth0

 *       eth0 dhcp

 *          Running dhcpcd ...                                            [ ok ]

 *          eth0 received address 192.168.1.120
```

Moreover, the output from ifconfig -a lists just eth0 and lo; eth1 is not listed.

Anyone have any ideas?  Sometimes I'd like to plug into a network when wireless AP's are unavailable.

Update: The module was not getting loaded. The scripts work fine.Last edited by hyperboloid on Tue Nov 16, 2004 5:34 pm; edited 3 times in total

----------

## instauration

Before I emerged baselayout-1.11.6-r1 today I had 1.11.5. As mentioned previously, to get my HP zd7000 broadcom wireless to work at boot-up and have init services with 'need net' as a dependancy also start I found that NOT adding net.wlan0 with rc-update was the way to go. Now that I've just emerged baselayout-1.11.6-r1 things are different. `rc-update add net.wlan0 default` is required to get things working smoothly. I'm using ndiswrapper-0.11 (which is loaded in /etc/modules.autoload.d/kernel-2.6) and gentoo-dev-sources-2.6.9-r3.

Still having problems with vmware-config.pl after emerging vmware-workstation-4.5.2-8848-r2. Sometimes sets up bridged networking to /dev/vmnet0 and NAT to /dev/vmnet8, sometimes not.

----------

## moonlight

Hi all,

This post is mainly intended for Uberlord himself, but anyone interested in issues with some Medion Laptops, please read further.

After using Gentoo Linux for a while on my old desktop pc, I bought in November 2003 (indeed about a year ago) a Medion Laptop MD 40100. Installing and using Gentoo was fine, after a while I decided to configure my wireless card on Gentoo Linux since working wireless was much more flexible for me (before I was working wireless on Windows XP). 

After following this thread, in order to learn more about wireless configurations, I have tried a few times to configure my wireless, but all those tries without success   :Crying or Very sad:  . Finally I contacted Uberlord himself, spending a whole evening on this subject, ... resulting in 'no wireless' on my laptop. This had nothing to do with Uberlords knowlegde (please read further).

Since about 3 months I swapped from Gentoo Linux towards Debian Linux (I am not starting a discussion which distro is preferable), however I am still following the Gentoo Forums too, since I prefer to have the best of both worlds. 

Again I tried a few times to get my wireless working, but the same story, ... still it didn't work.

However, yesterday I found on the web a nice explanation why it didn't work on my Medion 40100 laptop, ... even better, the solution is also described their, ... this solution is usefull for any distro using such kind of laptop.

So if people have problems with this type of laptops, please visit http://home.conceptsfa.nl/~revdmeer/md40100/index.html , the trick described their works   :Laughing:  . So after about a year, I am finally running wireless on Linux.

Uberlord, it's maybe worthwile to mention this in your readme file.

Cheers Moonlight

----------

## Bushmann

Hi, I'm using the wireless-script, and it's working really well for the locations I've been using. But now, I wanted to use the wireless network of the local university, the ESSID of which is "dukath-mv". The problem seems, bash isn't able to handle "-" as a part of varnames, so I always get errors trying to execute the wireless.sh script.

I'm no expert at bash, but is there a possible solution to this problem? Or are ESSIDs with "-" just not supported?

----------

## Chaosite

 *Bushmann wrote:*   

> Hi, I'm using the wireless-script, and it's working really well for the locations I've been using. But now, I wanted to use the wireless network of the local university, the ESSID of which is "dukath-mv". The problem seems, bash isn't able to handle "-" as a part of varnames, so I always get errors trying to execute the wireless.sh script.
> 
> I'm no expert at bash, but is there a possible solution to this problem? Or are ESSIDs with "-" just not supported?

 

How about escaping it...? Like \-?

----------

## UberLord

 *Bushmann wrote:*   

> Hi, I'm using the wireless-script, and it's working really well for the locations I've been using. But now, I wanted to use the wireless network of the local university, the ESSID of which is "dukath-mv". The problem seems, bash isn't able to handle "-" as a part of varnames, so I always get errors trying to execute the wireless.sh script.
> 
> I'm no expert at bash, but is there a possible solution to this problem? Or are ESSIDs with "-" just not supported?

 

If you read the wireless.example file it tells you to replace non alpha numeric characters (english) with _

So you would use dukath_mv in the var names

----------

## Bushmann

@chaosite  escaping doesn't work, since it's a bash varname and you can't use any '\' in a varname ^^

I'll try the method with '_' again but I'm not sure it'll work, but thanks for the tip.

Something else: When I'm activating the preferred_aps and then try to connect to an access point not included in this list, it just tries to force using the first ESSID of the list, although I didn't activate preferred_only...

Last but not least: Sometimes the script just fails to connect to the AP. When I tryit again it mostly works, but it's a bit annoying always having to log in as root or to remove and insert the pcmcia-card ^^ is there a way to make the script try again in case of failure?

thx

----------

## UberLord

 *Bushmann wrote:*   

> When I'm activating the preferred_aps and then try to connect to an access point not included in this list, it just tries to force using the first ESSID of the list, although I didn't activate preferred_only...
> 
> 

 

That variable has been removed and been replaced with "associate_order" - consult wireless.example for how to use it

 *Quote:*   

> Last but not least: Sometimes the script just fails to connect to the AP. When I tryit again it mostly works, but it's a bit annoying always having to log in as root or to remove and insert the pcmcia-card ^^ is there a way to make the script try again in case of failure?

 

/etc/init.d/net.eth1 restart

But you have to be root for that. Maybe sudo could help you

----------

## moby

First off thanks for all the hard work.  I've got this working on a newer laptop trying to get it to work on an older one.

Question:  The old laptop has a RangeLan-DS card (orinoco_cs driver).  The card lights up when put in, but I see nothing when I run iwconfig.  My guess is that "RangeLan-DS" isn't defined in the pcmcia config file.  It used to be wireless.opts or /etc/pcmcia/config.opts or something.  Does this file or an equivelant exist?

I've gotten this card to work in this laptop with other Linux distributions (Mandrake 10, Fedora Core 2 etc..).  I usually have to edit that config file to get the card recognized.  I'm finally getting around to moving it over to Gentoo.

Thanks for any advice

-moby

----------

## MrStaticVoid

To all the people using the dirty workaround for madwifi scanning:

http://sourceforge.net/mailarchive/forum.php?thread_id=5966999&forum_id=33958

A solution at last (a simple one at that).  Hopefully Jean Tourrilhes will have it in for the next wireless-tools release, but until then manually editing the code works and is easy.

This is a good day for me!  I finally got suspension and 3d acceleration with the binary ati-drivers working without freezing, and I get a clean solution to the scanning issue.

----------

## yangman

I'm uisng iwpriv_ath0="mode 3" and it seems to work with no problems at all connecting to both my .11g network at home and .11b network at school. The preup() workaround is not used.

----------

## UberLord

 *moby wrote:*   

> 
> 
> Question:  The old laptop has a RangeLan-DS card (orinoco_cs driver).  The card lights up when put in, but I see nothing when I run iwconfig.  My guess is that "RangeLan-DS" isn't defined in the pcmcia config file.  It used to be wireless.opts or /etc/pcmcia/config.opts or something.  Does this file or an equivelant exist?

 

I actually have no idea!

I do not use pcmcia-cs or pcmcia-cs-tools as hotplug takes care of everything pcmcia based for me  :Smile:  In fact, I think you only need pcmcia-cs (as in the package) for 16-bit cards. If you only have 32-bit cards (which you probably do) then you can get rid of that nasty package knows as pcmcia-cs  :Smile: 

Having removed that, hotplug may be able to load it for you now.

----------

## UberLord

 *Mr. Static Void wrote:*   

> To all the people using the dirty workaround for madwifi scanning:
> 
> http://sourceforge.net/mailarchive/forum.php?thread_id=5966999&forum_id=33958
> 
> A solution at last (a simple one at that).  Hopefully Jean Tourrilhes will have it in for the next wireless-tools release, but until then manually editing the code works and is easy.
> ...

 

I'm not sure that's a valid solution as I have scanning working fine with older madwifi drivers......

But if it works then the world is good again  :Smile: 

----------

## whschwartz

I'm having trouble getting my stuff setup right for wireless.

My goal is to setup 3 or 4 different ESSID's (home, work, friends, dad's) and set the preferred  set to home.

Currently I'm trying just 1 to get that right and when I have wep turned off and just 2 lines in my /etc/conf.d/wireless it works but I can't get WEP to work.

my wireless file looks like

```

key_theschwartz="open s:1111-1111-11"

preferred_aps=( "theschwartz" "linksys" )

associate_order_eth1="forcepreferredonly"

```

I"ve also tried using 

```
key_theschwartz="s:1111111111 enc open"
```

 as my key line.  I'd prefer 128bit WEP but I don't think the orinoco card in the one system supports that (other systems at home all do).

When I have WEP on and the key set to just 10 1's I get

```

gentoo init.d # ./net.eth1 start

 * Starting eth1

 *    Configuring wireless network for eth1

 *    Trying to force preferred in case they are hidden

 *       eth1 connected to "theschwartz" at 00:XX:XX:XX:XX:XX

 *       in managed mode on channel 11 (WEP enabled - )

 *    Bringing up eth1

 *       eth1 dhcp

 *          Running dhcpcd ...                                            [ !! ]gentoo init.d # 

```

and it hangs there.

If I disable WEP it connects fine and gets an IP.

Can anyone show me what a wireless file would look like with 3 ESSID's and WEP enabled?  Seems I'm missing something.  THis looked pretty straight forward.

----------

## UberLord

 *whschwartz wrote:*   

> When I have WEP on and the key set to just 10 1's I get

 

The problem is that a 64-bit WEP key is 13 characters and not 10. Are you getting confused with passkeys, which is not supported?

----------

## computerkammer

Hi!

I had downloaded the scripts from uberlord's website and just copied everything to the folders.

Maybe that's my problem now.....

I have two entries in etc/conf.d/net:

----------entries-----------------

ifconfig_eth1=("192.168.1.23 netmask 255.255.255.0")

routes_eth1=("default gw 192.168.1.1")

-----------------------------------------------

Then I'm starting manually: ./net.eth1 restart

I get no connection... but have entries in the "wireless" file

With the two commands:

------commands----

iwconf eth1 essid  blabla

iwconf eth1 key --mykey--

-------commands end-----

the card works fine.

What to do that it works on startup.

Or better howto make that he reads "wireless"???

 Just 2 days on gentoo

Thanks for help

----------

## UberLord

 *computerkammer wrote:*   

> Hi!
> 
> I had downloaded the scripts from uberlord's website and just copied everything to the folders.
> 
> Maybe that's my problem now.....

 

Yup - those scripts are slightly out of date

emerge sys-apps/baselayout-1.11.6-r1 or better  :Smile: 

----------

## computerkammer

Hi Uberlord!

Thankyou for all....

Runs on the first test....  :Very Happy: 

Just remove the scripts on your homepage...costs me 11 hours wasted time.

 :Very Happy: 

----------

## image

is it possible to make it so if i connect to a certain ESSID, i can specify a certain mac address to spoof?

i tried this in /etc/conf.d/wireless

mac_ESSID="00:11:22:33:44:55"

and it didn't work as i thought it would.

----------

## UberLord

 *image wrote:*   

> is it possible to make it so if i connect to a certain ESSID, i can specify a certain mac address to spoof?

 

Do you mean spooing your MAC address and not the AP's MAC address?

If so, look into macchanger - the config for it is now included in baselayout-1.11.6-r1 or newer

If not then I doubt it

----------

## whschwartz

I'd like to get my wirelesss file setup so I can connect to say 3 different networks depending on where I'm located.

home

work

linksys (lots of motels use this)

home and work use WEP, the linksys one doesn't

So far in my wireless file I have

```

key_home="open 1111111111"

preferred_aps=( "home"  )

```

And that works for the one.  What would the file have to look like to make all 3 work?

thanks.

Bill

----------

## UberLord

 *whschwartz wrote:*   

> I'd like to get my wirelesss file setup so I can connect to say 3 different networks depending on where I'm located.
> 
> home
> 
> work
> ...

 

```

key_home="open 1111111111"

key_work="open 2222222222222"

preferred_aps=( "home" "work" )

```

That would work. The default settings say "if we cannot find a preferred access point then we connect to the strongest access point broadcasting it's ESSID - if that fails, try the next one until we connect or fail"

----------

## Klavs

Hi,

I've just upgraded to baselayout-1.11.6-r1 - and I see the wireless-ebuild scripts still have one big problem AFAIK  :Smile: 

I have a USB-wireless device on my server (no more pci-slots- small server) - this wireless device can only do ad-hoc mode - which however works fine.

I need the script to default to my home wlan (ie. to adhoc mode) and be able to fallback to Managed mode if default fails. AFAIK it seems these:

# Set the mode of the interface (managed, ad-hoc or master). Managed is default

# If it's ad-hoc or master you also may need to specify the channel below

#mode_eth1="ad-hoc"

# If managed mode fails, drop to ad-hoc mode with the below ESSID?

#adhoc_essid_eth1="WLAN"

should have be reconstructed so one can also choose the fallback_mode.

----------

## tautology

Hello,

While I think that the goals strived for with the new "Gentoo way" of wireless configuration, I think that it is WRONG to break all the machines that use wlan-ng by not providing a simple setting to override the new spiffy automagic way.  Don't get me wrong, I have wanted something like this for some time and even thought about getting down to writing a solution, but making it impossible to turn off the new iwconfig tools only configuration is just asking for a large number of frustrated users.

Anyways if I have overlooked a method for using my wlan-ng way of doing things that for years has "just worked" please let me know and I will be happy to use that method.  For now, I do not have the time to play around with ndiswrapper or wait for wlan-ng to support iwconfig.  I will just have to be contented with downgrading baselayout, or manually running dhcpcd.

BTW:

 *Quote:*   

> Q.Are there any drivers that do not work with this?
> 
> A.The only one I know of is linux-wlan-ng. They have their own setup software which is vastly different from anyone elses. All other drivers use wireless-tools which is what my script uses. The developers of linux-wlan-ng are in the process of making their driver support wireless-tools - so eventually it should work. Bug them about this, not me. 

 

is pretty callous.  Perhapse, something like:

 *Quote:*   

> 
> 
> Q.Are there any drivers that do not work with this?
> 
> A.The only one I know of is linux-wlan-ng. They have their own setup software which is vastly different from anyone elses. All other drivers use wireless-tools which is what my script uses. The developers of linux-wlan-ng are in the process of making their driver support wireless-tools - so eventually it should work. In the mean time, you can continue to use the old method of configuring your wlan-ng setup by doing X
> ...

 

Thanks

----------

## UberLord

 *tautology wrote:*   

> Hello,
> 
> While I think that the goals strived for with the new "Gentoo way" of wireless configuration, I think that it is WRONG to break all the machines that use wlan-ng by not providing a simple setting to override the new spiffy automagic way.  Don't get me wrong, I have wanted something like this for some time and even thought about getting down to writing a solution, but making it impossible to turn off the new iwconfig tools only configuration is just asking for a large number of frustrated users.
> 
> 

 

OK - firstly supporting linux-wlan-ng would require an almost total rewrite. This is something that I cannot do as I don't have any hardware that is supported by linux-wlan-ng.

Secondly, linux-wlan-ng is making their stuff compliant with wireless-tools. Once this is complete, you can use this. This is important as only linux-wlan-ng uses linux-wlan-ng setup. Every other driver works using wireless-tools.

Thirdly, if you actually read /etc/conf.d/net.example you would find you can disable this entire script by doing the following

```

modules=( "!iwconfig" )

```

----------

## UberLord

 *Klavs wrote:*   

> Hi,
> 
> I've just upgraded to baselayout-1.11.6-r1 - and I see the wireless-ebuild scripts still have one big problem AFAIK 
> 
> I have a USB-wireless device on my server (no more pci-slots- small server) - this wireless device can only do ad-hoc mode - which however works fine.
> ...

 

The problem here is that Ad-Hoc configuration always works so this request would be pointless.

By always works, I mean that the configuration always works - ie no errors are reported back at the configuration stage. The only possible error to work off is DHCP failing and we don't (and probably never will) have any restart mechanism for this.

However, you can do this yourself - with a little code in /etc/conf.d/net in the preup function  :Smile: 

(This is very loosely typed - may have errors)

```
preup() {

# We only use this code for eth1

[[ ${IFACE} != eth1 ]] && return 0

# Configure ad-hoc for our server

iwconfig ${IFACE} mode ad-hoc

iwconfig ${IFACE} channel 3

iwconfig ${IFACE} essid ESSID

iwconfig ${IFACE} key s:foobar open

# If our server (at 192.168.0.1) is reachable, we will find it

# Otherwise we return gracefully

arping -q -c 2 -w 3 -D -f -I ${IFACE} 192.168.0.1 &>/dev/null && return 0

# We found our server in ad-hoc, so we replace our wireless config

mode_eth1="ad-hoc"

essid_eth1="ESSID"

channel_eth1="3"

key_eth1="s:foobar open"

#return gracefully

return 0

}
```

----------

## tautology

My Apologies,

I did read through /etc/conf.d/net.example but must have missed it.  I also searched through /etc/conf.d/net.example for wlan and iwconfig, but these words are not in /etc/conf.d/net.example  It says to use 

```

modules=("!wireless")

```

which works for me. 

Perhapse this should be added to the FAQ, under the wlan-ng.  

I recognise that the wlan-ng tools are a pain because they don't support iwconfig, it has been a problem for me on several occasions, but unfortunately that is what I had to do to get wireless support for my card.  Don't take my previous post as an attach on your work, I was just frustrated at spending hours and not comming up with the option to disable the wireless config.

Thanks for your prompt reply.

----------

## UberLord

[quote="tautology"]

Perhapse this should be added to the FAQ, under the wlan-ng.

It's done - however, the FAQ is now maintained over at http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

 *Quote:*   

> Don't take my previous post as an attach on your work, I was just frustrated at spending hours and not comming up with the option to disable the wireless config.

 

No problemo - at least you're working now  :Smile: 

----------

## jmack1010

I know this sounds retarded, however, in interactive mode during etc-update, I accidently replaced the new /etc/conf.d/net from baselayout 1.11 with the /etc/conf.d/net from 1.9.4.  I tried to reemerge baselayout 1.9.4, and then reemerge 1.11 again, hoping that /etc/conf.d/net would then be replaced, however, it was skipped.   How would I obtain the newer version of /etc/conf.d/net? Thank you for any help.

Joe

----------

## UberLord

The latest version of /etc/conf.d/net we ship is pretty much a blank file with a small header directing you to read /etc/conf.d/net.example for configuration instructions.

If, however, you really need it you can expand the newtest rcscripts.tar.bz2 you have in /usr/portage/distfiles - you can find it in there.

----------

## gurke

im having a small issue with my ipw2100 card. i load the module with coldplug and added the interface (net.eth1) to runlevel default. now when i boot, the module gets loaded, but it seems it immediatly sets the interface on status "started", so the net.eth1 script doenst associate and get dhcp. sometimes, the driver seems to find a network by himself and connects correctly. anyone experienced this before?

----------

## UberLord

 *gurke wrote:*   

> im having a small issue with my ipw2100 card. i load the module with coldplug and added the interface (net.eth1) to runlevel default. now when i boot, the module gets loaded, but it seems it immediatly sets the interface on status "started", so the net.eth1 script doenst associate and get dhcp. sometimes, the driver seems to find a network by himself and connects correctly. anyone experienced this before?

 

The problem is that you've added net.eth1 to the default runlevel.

This means that it gets started by coldplug AND rc scripts - which causes the problem.

Solution 1) stop coldplug from loading the module or running /etc/hotplug.d/net.agent (for example, remove that file)

Solution 2) remove net.eth1 from the default runlevel

I would go for Solution 2 myself  :Smile: 

----------

## gurke

 *UberLord wrote:*   

> 
> 
> The problem is that you've added net.eth1 to the default runlevel.
> 
> This means that it gets started by coldplug AND rc scripts - which causes the problem.
> ...

 

is there a way of stopping coldplug from starting the device? coldplug doesnt work very well with my wlan at home, while the runlevel script does very well, when i restart the device. i didnt find the file  /etc/hotplug.d/net.agent. i only got a /etc/hotplug.d/default/default.hotplug

thanks

----------

## UberLord

 *gurke wrote:*   

> is there a way of stopping coldplug from starting the device? coldplug doesnt work very well with my wlan at home, while the runlevel script does very well, when i restart the device. i didnt find the file  /etc/hotplug.d/net.agent. i only got a /etc/hotplug.d/default/default.hotplug

 

You can remove/rename the net.agent file in /etc/hotplug (sorry - I gave you the wrong directory before) 

Or you can remove coldplug from the default runlevel

----------

## gurke

it seems that net.agent starts the interface with the standard runlevel scripts. so my ipw2100 card behaves sloppy, lets see what i can do about it.

----------

## jsaints

Hi 

I have follow the instructions described here.. I am almost there!!! I can now scan for access points and see thier Mac Addresses. 

```
iwconfig ath0
```

 chooses my ap but i still cannot receive a dhcp lease.

Any ideas? most common problems for not getting a dhcp lease?

Thanks

----------

## UberLord

 *jsaints wrote:*   

> Any ideas? most common problems for not getting a dhcp lease?

 

Invalid WEP configuration or some security on the AP like MAC filtering.

Thats the most common problem for not getting a dhcp lease.

----------

## Clue-less

Uberlord:

I was really confused on the part where you state:

 *Quote:*   

> Ensure that version 1.11.0 or newer is going to get installed and go for it!
> 
> Otherwise, find out why it's not (hint: step 1 or 2 is wrong)
> 
> Ensure that etc-update updates /etc/conf.d/net and /etc/conf.d/net.lo - please do this

 

(From Wireless configuration and startup - The Gentoo way, after emerging baselayout.)

My confusion stemmed from  the fact that there is no /etc/conf.d/net.lo but there is /etc/init.d/net.lo.  Is that what you are referring to?

If not, then, am I to use the same script in /etc/init.d/net.lo for /etc/conf.d/net.lo?

The other suggestion I have is to mention CVS Script /etc/conf.d/net.example and CVS Script /etc/conf.d/wireless.example.   Both are not obvious to newbies like me -- until I stumbled upon it from Matt Clara's Madwifi page.

Do I still need to symlink eth0 to net.lo  if that's for the wired ethernet?

Finally, if I use the net.lo.example, would I be able to use any available wireless access point (providing no WEP/WPA) or do I have to configure each individual access point for it?

Sorry for so many questions, but configuring my wireless card has been a frustrating experience.

----------

## UberLord

Sorry, the FAQ is now maintained over at http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup, but use this forum for feedback.

/etc/init.d/net.lo is the mater script which controlls any ethernet device, both wired and wireless.

An interface (say eth1) should symlink to this script (net.eth1 -> net.lo)

The fact that eth1 is wireless or wired is irrelevant.

If you supply a preferred_aps list then we try and connect to those in order.

Then we will try and connect to the strongest un-encrypted access point.

----------

## Parasietje

I'm using a commercial access point here at home, in bridged mode to my local LAN. The access point is at one end of the house, the linux internet router is at the other end. I was wondering if I could make an access point out of the linux internet router, sharing the same SSID as the commercial router. That way, reception in every part of the house can be guaranteed. How do I do this? What is the correct term for what I want to do?

----------

## UberLord

You're better off asking in the networking forum as I don't know :/

----------

## tgurr

Hi there, I tried configuring my wireless usb stick (using ndiswrapper) with the new baselayout and stuff but when I execute

```

server ~ # /etc/init.d/net.wlan0 start

 * Starting wlan0

 *    Loading networking modules for wlan0

 *       modules: apipa iwconfig essidnet iptunnel ifconfig

 *          iwconfig provides wireless

 *          ifconfig provides interface

 *    Configuring wireless network for wlan0

 *       wlan0 connected as "xxx"

 *       in  mode (WEP disabled)

 *    Configuring wlan0 for "xxx" ...                                [ ok ]

 *    Bringing up wlan0

 *       192.168.10.50                                                    [ !! ]

```

that error occures.

It states that WEP is disabled which is not, i entered my WEP key in /etc/conf.d/wireless and it says "in mode" which should be "in Ad-Hoc mode" i suppose but the device is set up in managed mode after /etc/init.d/net.wlan0 start.

If i do it manually it works, this is the way i configure it manually:

iwconfig wlan0 essid xxx

ifconfig wlan0 up

ifconfig wlan0 192.168.10.50

iwconfig wlan0 mode Ad-Hoc

iwconfig wlan0 key s:xxx

But i'd like to have it done "the gentoo way", any idea what went wrong ?

I set up RC_VERBOSE="yes" but it won't display where the error exactly is, so I need your help with this  :Crying or Very sad: 

Thanks in advance!

MfG. Psy

----------

## yeags_1001

Hi I'm having an issue with my wireless config that used to work with my ndiswrapper setup/wlan0.  My wireless config in /etc/conf.d/wireless now using a prism54/eth0 now looks like ...

```
essid_eth0=""

ifconfig_panera=( "dhcp" )

key_YeagerLAN="X00X-00X0-00 enc open"

ifconfig_YeagerLAN=( "192.168.7.55 netmask 255.255.255.0" )

routes_YeagerLAN=( "default gw YeagerLAN" )

preferred_aps=( "YeagerLAN" "panera" )
```

My result from my /etc/init.d/net.eth0 start ...

```
 * Starting eth0

 *    Running preup function

 *         Configuring wireless network for eth0

 *         Scanning for access points

 *           Found "linksys" at 00:0C:41:F4:26:D9

 *           Found "default" at 00:80:C8:AB:C2:32

 *           Found 00:0C:41:8A:39:DA (WEP required)

 *           Found "NETGEAR" at 00:09:5B:CF:65:86

 *           Found "SpongeBob" at 00:0F:66:38:B5:6F (WEP required)

 *           Found 00:0F:66:2D:16:97 (WEP required)

 *         Trying to force preferred incase they are hidden

/lib/rcscripts/net.modules.d/iwconfig: line 340: iwconfig_get_essid_var: command not found

 *        does not support setting keys

 *       or the parameter "mac_key_" or "key_" is incorrect

 *        does not support setting ESSID to "panera"

lo        no wireless extensions.

 *           connected to "SpongeBob" at 00:0F:66:38:B5:6F

 *          in managed mode on channel 3 (WEP disabled)

 *    Configuring wireless network for eth0

 *       eth0 connected to "default" at 00:80:C8:AB:C2:32

 *       in managed mode on channel 6 (WEP disabled)

 *    Cannot default to dhcp as there is no dhcp module loaded

 *    No configuration for eth0                                                                          [ !! ]
```

dmsg | grep prism

```
Loaded prism54 driver, version 1.2

eth0: prism54_set_txpower() auto power will be implemented later.

```

However, I can get it to work manually with the following sequence of commands ...

```
ifconfig eth0 up

iwconfig eth0 essid "YeagerLAN"

iwconfig eth0 key "X00X-00X0-00"

ifconfig eth0 "192.168.7.55 netmask 255.255.255.0"

route add default gw YeagerLAN
```

Thanks in advance for any help ...

----------

## Parasietje

Looks to me that "YeagerLAN" isn't mentioned in the list of access points net.eth0 finds.

Maybe you could look in that direction?

----------

## fatboyjim

 *yeags_1001 wrote:*   

>  
> 
> ```
> *    Cannot default to dhcp as there is no dhcp module loaded 
> ```
> ...

 

Guess you could fix that bit with

```
emerge dhcpcd
```

----------

## UberLord

ad-hoc/master mode not setting wep key

https://bugs.gentoo.org/show_bug.cgi?id=74802

unknown function errors/command not found erros

https://bugs.gentoo.org/show_bug.cgi?id=74723

----------

## EnigmaedgE

Hey.... I've read a couple of replies from this post as well as Part I of this (even those its rather dated).

I still seem to have a bit of trouble with my built-in wireless.  As a small note, the gentoo 2004.3 LiveCD detects it and works wonderfully.  In fact, I completed my install wirelessly.  After the initial reboot and kernel tweaking, I cant seem to get it to work!

Please see my post:

https://forums.gentoo.org/viewtopic.php?t=273066

Thanks guys!

----------

## fatboyjim

Could try using genkernel? Apparently the kernel is similar to that of the livecd?

Jim

----------

## Radiator

Hi, 

I think something is going wrong here with wireless-autoconfig.

It runs fine when i use iwconfig to setup it manually, but it doesnt really work with newest baselayouts as the howto says - 

I did step by step what http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup says, but it doesnt seem to do any wireless configuration (/etc/init.d/net.eth1 says Bringing eth1 up - nothing more - but it should as i can see here) (eth1 is ipw2200)

How is the configuration in /etc/conf.d/wireless handled by the scripts? I don't see that file parsed by any script. I don't have a directory like /etc/net.modules.d - where can i get that stuff, because i think this is the missing part, eh

what's wrong?

----------

## Clue-less

Upon startup, I receive an error that states that net.lo has a syntax error and will not initiate (I'm using this net.lo since I did not have one when I booted before this.)

When I try to log into Gnome, it freezes at the gnome startup screen.  I assume that's due to net.lo.

I've symlinked eth0 and ath0 to net.lo ...

Help!  :Sad: 

(If this all fails, how do I un-symlink eth0 and ath0?)

----------

## UberLord

 *Clue-less wrote:*   

> I'm using this net.lo since I did not have one when I booted before this.
> 
> 

 

You need the entire rc-scripts section to get that version to work as it has some very experimental stuff such as backgrounding support for dhcp and wireless.

I would recommend using the generic stuff in baselayout-1.11.8 for the time being

----------

## UberLord

 *Radiator wrote:*   

> Hi, 
> 
> I think something is going wrong here with wireless-autoconfig.
> 
> It runs fine when i use iwconfig to setup it manually, but it doesnt really work with newest baselayouts as the howto says - 
> ...

 

That normally means that iwconfig is not reporting eth1 as wireless.

Your kernel may not have wireless support configured - or you're suffering from an ipw firmware problem - https://bugs.gentoo.org/show_bug.cgi?id=74786

 *Quote:*   

> How is the configuration in /etc/conf.d/wireless handled by the scripts? I don't see that file parsed by any script. I don't have a directory like /etc/net.modules.d - where can i get that stuff, because i think this is the missing part, eh

 

The modules were moved to /lib/rcscripts/net.modules.d - iwconfig module loads /etc/conf.d/wireless

----------

## isreal

After i configured my wlan usb Adaptor i get an error when i start the wlan script:

```

/etc/init.d/wlan start

FATAL: Module wlan0 not found.

/sbin/prism2dl not found, aborting firmware download.

```

lsmod says the modules prism2_usb and p80211 are loaded correctly.

Does anyone know where i get the right firmware for my MA111 Netgear USB Adaptor?

Thanks...

----------

## Jerem

Too complicated and obscure way of configuring the wifi, I would say.

Easiest way if writing a init script which ALSO permits selecting multiple acess points with multiple settings.

----------

## UberLord

Erm, the script allows multiple access points (preferred_aps=( ESSID1 ESSID2 )) and mutplite settings (config_ESSID1=( dhcp) config_ESSID2=( 192.168.0.2/24 ))

As for being complication and obscure I say FOO

Without any settings we automatically connect to the strongest Access Point or Ad-Hoc node (well, automatic to ad-hoc doesn't work in baselayout-1.11.8, but it works in CVS)

So most people will just need to configure a preferred_aps list and any WEP keys needed. That's not hard or obscure imo.

----------

## Mythos

Hi there, after download some stuf or after a long period of time  my wireless card seem to disconect and reconect again, and seems that after a while do the same ?

anyone know what is wrong with my conf or card ???

lspci |grep network

```
0000:02:00.0 Network controller: 3Com Corporation 3com 3CRWE154G72 [Office Connect Wireless LAN Adapter] (rev 01)

```

dmesg

```

eth2: islpci_close ()

eth2: resetting device...

eth2: uploading firmware...

CLASS: registering class device: ID = '0000:02:00.0'

class_hotplug - name = 0000:02:00.0

class_hotplug - hotplug() returned -19

class_hotplug - name = 0000:02:00.0

CLASS: Unregistering class device. ID = '0000:02:00.0'

class_hotplug - name = 0000:02:00.0

device class '0000:02:00.0': release.

eth2: firmware version: 1.0.4.3

eth2: firmware upload complete

eth2: interface reset complete

eth2: no IPv6 routers present

```

at the moment i had no time to configure with wireless.conf so i made this:

```
#/etc/init.d/nowire

#!/sbin/runscript

opts="start stop"

start() {

        ebegin "Wireless start"

        ifconfig eth2 up

        iwconfig eth2 essid mythos

        iwconfig eth2 key xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx

        dhcpcd eth2

}

stop() {

        ebegin "Stopping Radiation"

        ifconfig eth2 down

        rm /var/run/dhcpcd-eth2.pid

        einfo "No radiation left"

}

```

I can browse nicely in internet, etc, etc. But sometimes it's a litle bit anoyng my card reconect.

Thanks

----------

## UberLord

May not be your card - I have similar issues with our AP at work - it needs a hard reset once a week or so.

I have a similar AP at home, which requires a hard reset once a month or so.

Check to see if there's updated firmware you can use.

----------

## Mythos

Ok, Thank you  :Smile:  it is not a major problem but sometimes it's a litle bit anoying ...

----------

## kblack

Ok I got everything working after I ran ( rc-update add net.wlan0 default ) it only shows the output in init if it fails. When it comes up and gets a dhcp address it has no output not even ( * Starting wlan0 )

Any ideas?

----------

## FXRS

Hello,

Just installed Gentoo and I am having trouble with my wireless. I have had it setup several other times with mandrake/fedora/ubuntu/slack, but Gentoo or my lack of knowledge of Gentoo is giving me fits.

I have tried to download the latest wireless conf "baselayout" but everytime I do I get this....bash-2.05b# emerge -av sys-apps/baselayout

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] sys-apps/baselayout-1.9.4-r6  -bootstrap* -build -debug -livecd (-selinux) -static (-uclibc) 197 kB

Total size of downloads: 197 kB

Do you want me to merge these packages? [Yes/No] no

I followed the instructions in the thread that is now locked. I was wondering if someone could maybe give me easy step by step instructions.

Yes I have emerged the madwifi drivers and the wireless tools.

Thanks ahead of time.

----------

## fatboyjim

Edit your /etc/portage/package.keywords file

You may need to create it

Add to it the following lines

```

app-shells/bash ~x86

sys-apps/sysvinit ~x86

sys-libs/readline ~x86

sys-apps/baselayout ~x86

net-wireless/madwifi-driver ~x86

```

You should now be able to emerge the latest baselayout and madwifi-drivers

Jim

----------

## FXRS

Fatboyjim,

I added those lines, (already had the madwifi stuff) and I still get the same response from emerge.

----------

## UberLord

If you're using AMD64 then you need to replace ~x86 with ~amd64

Same applies for other arches

----------

## Psiuyo

I've been trying to set up a laptop for both fixed and mobile work.  As a test I have 2 APs set up, one hidden and one broadcasting; the non-broadcasting is my preferred.

I want my machine to connect to my non-broadcasting AP if possible, then fallback to ANY if it can't connect.

If I choose "forcepreferred"  it will connect to my AP fine.  When I turn off the preferred AP it doesn't connect to anything (expected).

If I choose "forceany" it will always connect to anything open first instead of the non-visible preferred AP.  Guess it really is quite literal  :Smile: 

Is there any way to enable some sort of "forcepreferredthenany" mode? Some way to force (non-broadcasting) preferred first, then search for others on failure?

----------

## UberLord

 *Psiuyo wrote:*   

> Is there any way to enable some sort of "forcepreferredthenany" mode? Some way to force (non-broadcasting) preferred first, then search for others on failure?

 

Not at present.

However, it's not an unreasonable request so I'll add it to my todo list  :Smile: 

----------

## tharasix

I'm running baselayout-1.11.7-r2 and gentoo-dev-sources-2.6.10-r4.  I have wireless working correctly, but the scripts in /etc/init.d/ don't seem to think that my wireless connection provides a network.  For instance, when I have net.eth0 (built-in 100BaseT adapter) stopped and net.eth1 (Orinoco wireless) started, starting cupsd will bring up net.eth0 again.  If both eth0 and eth1 are running, then all network traffic goes to an unplugged eth0, and nothing works.  The behavior isn't terribly consistent either, since the first time I bring down eth0 nothing else stops, but if I bring it up and back down again, BOINC and Postfix will stop.  Currently, I have net.eth0 in the default runlevel and net.eth1 in no runlevels, and I'd like to keep it that way.

Is there any way to fix this behavior?  I'd really like for my computer to realize that my wireless card provides network access.

----------

## UberLord

That problem is fixed in sys-apps/baselayout-1.11.8 which was put into portage a while back

----------

## fatboyjim

Using gentoo-dev-sources-2.6.9-r13 my wireless card worked perfectly

After upgrading this morning to 2.6.10-r4 it no longer works  :Razz: 

The card does have lights on it (after re-enabling the PCMCIA stuff in menuconfig)  but a scan for access points says there are" no access points found for ath0"

Any ideas what I need to enable/reinstall?

Thanks

Jim

----------

## UberLord

No idea - madwifi works fine on my AMD64 box with that kernel version  :Sad: 

Maybe you could try reemerging wireless-tools or madwifi-driver ?

----------

## fatboyjim

Should have mentioned I've already re-emerged madwifi-driver

I'll re-emerge wireless-tools now then, thanks for the tip

Jim

----------

## certocivitas

I just finished doing a reinstall of Gentoo on a new hd and desided to use the directions on the wiki to setup wifi. So I updated the baselayout, installed madwifi/wireless-tools, added modules to auto load list, made /etc/conf.d/wireless as suggested and rebooted into the new install. 

The problem is that when I try "iwlist ath0 ap" no accesspoints show up. Also strange, when I try "iwlist ath0 scanning" I get an error saying the interface does not support this feature, or something to that effect.

I'm using the same madwifi-driver and wireless-tools versions on my old setup and my accesspoint shows up. The two major changes with my new install are the baselayout and I'm using udev only now. Any ideas?

----------

## fatboyjim

Problem for me with new kernel turned out to be "Module Unloading" was enabled in the kernel.

Turned this off and all was well again

Cheers

Jim

----------

## certocivitas

I got things working... just not with the net.lo that comes with baselayout-1.11.8   :Sad:  . I copied my old net.ath0 (a copy, not a symbolic link, of net.lo from baselayout-1.9.4-r6) and everything works fine again.

I'm not sure how to figure out what went wrong with the new version of net.lo. UberLord if there is anything I can do to figure it out let me know. Until then I guess I'll just use the old one   :Rolling Eyes:  .

Oh and I removed module unloading from the kernel, never a problem before with it, but that had no effect.

----------

## tharasix

 *UberLord wrote:*   

> That problem is fixed in sys-apps/baselayout-1.11.8 which was put into portage a while back

 

I beg to differ.  I just upgraded to baselayout-1.11.8, let etc-update overwrite net.lo and a bunch of other files, and the behavior is pretty much exactly the same.  What were you suggesting would be fixed, BTW?  I assumed that CUPS, for instance, wouldn't start net.eth0, which is still does.

----------

## tharasix

 *tharasix wrote:*   

> I beg to differ.  I just upgraded to baselayout-1.11.8, let etc-update overwrite net.lo and a bunch of other files, and the behavior is pretty much exactly the same.  What were you suggesting would be fixed, BTW?  I assumed that CUPS, for instance, wouldn't start net.eth0, which is still does.

 

I just added net.eth1 to the default runlevel and removed net.eth0 from it and everything now works as expected.  This is pretty inconvenient, considering that I'll always have my built-in net card to contend with, but only occasionally my PCMCIA wireless card.  Is the fact that the net.* connection in the default runlevel is the only one that is recognized as providing a network a bug or feature?    :Wink: 

----------

## Mythos

Guess i know another reason for reset sometimes ...

```
iwlist eth2 scan

eth2      Scan completed :

          Cell 01 - Address: 00:XXXXXXX

                    ESSID:"mythos"

                    Mode:Master

                    Encryption key:on

                    Frequency=2.462 GHz (Channel 11)

                    Quality:65/0  Signal level:-51 dBm  Noise level:-116 dBm

          Cell 02 - Address: 00:XXXXXXXXX

                    ESSID:"mythos"

                    Mode:Master

                    Encryption key:on

                    Frequency=2.462 GHz (Channel 11)

                    Quality:41/0  Signal level:-75 dBm  Noise level:-116 dB
```

m

How can i choose only cell 01 ? I guess sometimes my signal floats and then my card jump and reset to other cell ...

----------

## UberLord

 *tharasix wrote:*   

>  *UberLord wrote:*   That problem is fixed in sys-apps/baselayout-1.11.8 which was put into portage a while back 
> 
> I beg to differ.  I just upgraded to baselayout-1.11.8, let etc-update overwrite net.lo and a bunch of other files, and the behavior is pretty much exactly the same.  What were you suggesting would be fixed, BTW?  I assumed that CUPS, for instance, wouldn't start net.eth0, which is still does.

 

Sorry, I thought you were talking about the old gateway var not being read.

You could set RC_STRICT_NET_CHECKING (/etc/conf.d/rc) to "lo" which should solve it for you.

----------

## UberLord

 *Mythos wrote:*   

> How can i choose only cell 01 ? I guess sometimes my signal floats and then my card jump and reset to other cell ...

 

You cannot do this using my code - and I'm not keen on adding it either as not many drivers support this.

You could go your own way though

```
iwconfig eth2 ap 00:11:22:33:44:55
```

----------

## okapi

There is a bug in  /lib/rcscripts/net.modules.d/wpa_supplicant when using with 802.1X

Details are in this thread:

https://forums.gentoo.org/viewtopic.php?t=279713

----------

## archer75

tag

----------

## okapi

Hello Uberloard,

I did try the patch in this bug:

https://bugs.gentoo.org/show_bug.cgi?id=74637

But it still doesn't cover my case since the error is in the array assignement. 

The value of key_mgmt is "IEEE 802.1X (no WPA)" witch is not valid with this kind of array association. The association tries to split on space and choke on the "(" character.

```

cpdc0w flash # patch -p0 < /home/marc.bourget/wpa_supplicant.patch

patching file /lib/rcscripts/net.modules.d/wpa_supplicant

cpdc0w flash # less /lib/rcscripts/net.modules.d/wpa_supplicant

cpdc0w flash #

cpdc0w flash # /etc/init.d/net.ath0 restart

 * Stopping ath0

 *    Bringing down ath0

 *       Stopping dhcpcd on ath0 ...                                      [ ok ]

 *       Shutting down ath0 ...                                           [ ok ]

 *       Stopping wpa_supplicant on ath0 ...                              [ ok ]

 * Starting ath0

 *    Starting wpa_supplicant on ath0 ...

/lib/rcscripts/net.modules.d/wpa_supplicant: array assign: line 85: syntax error near unexpected token `('

/lib/rcscripts/net.modules.d/wpa_supplicant: array assign: line 85: `IEEE 802.1X (no WPA)'

```

EDITED:

The patch on bug 78637 fixed the problem.

https://bugs.gentoo.org/show_bug.cgi?id=78367

----------

## mope

Well, on my main box, which has had wireless running since the beginning of this howto is still going.

But both my laptop and wife's computer are not working.

I have the latest build of everything necessary. I copied the config files from my main box to the others, but as soon as I updated from gentoo-dev-sources r5 to r6, I can't get the computer to recognize ath0.

They reply this:

 *Quote:*   

> 
> 
> venezuela net # /etc/init.d/net.ath0 start
> 
>  * Starting ath0
> ...

 

----------

## UberLord

 *mope wrote:*   

> but as soon as I updated from gentoo-dev-sources r5 to r6, I can't get the computer to recognize ath0.

 

Sounds like you need to re-emerge the madwifi-driver, or you've disabled wireless in the kernel.

----------

## mope

 *UberLord wrote:*   

>  *mope wrote:*   but as soon as I updated from gentoo-dev-sources r5 to r6, I can't get the computer to recognize ath0. 
> 
> Sounds like you need to re-emerge the madwifi-driver, or you've disabled wireless in the kernel.

 

Thank you for the reply.

I re-emerged madwifi-driver and I built wireless networking right into the kernel.

I don't know what is going on. With the laptop, I am able to use it if I go back to my old kernel. The settings are identical between the new and old kernel, from what I can see.

My wife's situation is similar, except that I don't have the old kernel to go back on! oops.

----------

## TealVeal

Is there a post which explains how to install madwifi from scratch?  I've emerged madwifi-driver and madwifi-tools but the two lines that portage prints after madwifi-driver finishes don't really help me much.  How do I create  /etc/init.d/net.ath0?  Do I put in dhcpcd_ath0="-DH" in /etc/conf.d/net as well as iface_ath0="dhcp"?  I've tried scanning the thread but there's so much info in this thread...  Edit: I have a Netgear wc311v1

Thanks

----------

## mope

 *TealVeal wrote:*   

> Is there a post which explains how to install madwifi from scratch?  I've emerged madwifi-driver and madwifi-tools but the two lines that portage prints after madwifi-driver finishes don't really help me much.  How do I create  /etc/init.d/net.ath0?  Do I put in dhcpcd_ath0="-DH" in /etc/conf.d/net as well as iface_ath0="dhcp"?  I've tried scanning the thread but there's so much info in this thread...  Edit: I have a Netgear wc311v1
> 
> Thanks

 

I wish a new thread would be created, too. This thing was so packed with information when I first did it, I was looking everywhere.

That's why I'm not sure I haven't missed some important config step somewhere.

Now, to answer your questions: I made a soft link from net.lo to net.ath0

 *Quote:*   

> 
> 
> ln -s net.lo net.ath0
> 
> 

 

and I only put iface_ath0="dhcp" in /etc/conf.d/net

that's for a d-link system. remember, my main box works. only my lappy and wife's system don't (all same components--so don't know what's up there).

----------

## TealVeal

 *mope wrote:*   

> 
> 
> Now, to answer your questions: I made a soft link from net.lo to net.ath0
> 
>  *Quote:*   
> ...

 

Thanks!  I did that and now I can bring ath0 up by typing /etc/init.d/net.ath0 start, but an ifconfig shows only the loopback device.  Is this the same problem you are having?

----------

## mope

 *TealVeal wrote:*   

>  *mope wrote:*   
> 
> Now, to answer your questions: I made a soft link from net.lo to net.ath0
> 
>  *Quote:*   
> ...

 

I don't think it's the same error as I am getting.

A few posts above this one, I posted the errror I get when I try:

 *Quote:*   

> 
> 
> /etc/init.d/net.ath0 start
> 
> 

 

You sound like you're getting farther than I am.

I would try:

 *Quote:*   

> 
> 
> ifconfig ath0 up
> 
> 

 

and: 

 *Quote:*   

> 
> 
> ifconfig dhcpcd ath0
> 
> 

 

That last one may not be correct. You may need to switch the ath0 with dhcpcd.

----------

## TealVeal

 *mope wrote:*   

> 
> 
> I don't think it's the same error as I am getting.
> 
> A few posts above this one, I posted the errror I get when I try:
> ...

 

Hm, that's way beyond my tiny knowledge, =\

 *Quote:*   

> 
> 
> I would try:
> 
>  *Quote:*   
> ...

 

It doesn't see ath0 as a valid device so those aren't working.

----------

## mope

[quote="TealVeal"] *mope wrote:*   

> 
> 
> It doesn't see ath0 as a valid device so those aren't working.

 

ok, so you seem to be having the same issue as me.

Do you get this error:

 *Quote:*   

> 
> 
> # /etc/init.d/net.ath0 start 
> 
> 

 

 *Quote:*   

> 
> 
> * Starting ath0 
> 
> * Bringing up ath0 
> ...

 

Well, now I don't know where to go. So hopefully someone else will come and help us.

----------

## TealVeal

Hi mope  I think you are more successful than I, but neither of us have tasted sweet success...

I type

```
zathras root # /etc/init.d/net.ath0 start
```

and get

```
 * Bringing ath0 up... 
```

but 

```
 zathras root # iwconfig
```

gives

```
zathras root # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

```

I have two nics on my mobo so that's ok.

typing 

```
zathras root # ifconfig
```

gives

```
zathras root # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:11:2F:D5:DA:CD

          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:224 errors:0 dropped:0 overruns:0 frame:0

          TX packets:256 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:25212 (24.6 Kb)  TX bytes:24466 (23.8 Kb)

          Interrupt:22 Base address:0xc000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

so I can run the ath0 script, but I have no ath0.  I symbolically linked net.ath0 to net.lo at one point.

----------

## TealVeal

Hm, when I connected to my box through putty I was able to see more than the last 24 lines of emerge's output,

have you tried this?

```

zathras root # echo "ath_hal" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "ath_rate_onoe" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "wlan" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "wlan_acl" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "wlan_ccmp" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "wlan_tkip" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "wlan_wep" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "wlan_xauth" >> /etc/modules.autoload.d/kernel-2.6

zathras root # echo "ath_pci" >> /etc/modules.autoload.d/kernel-2.6

```

----------

## TealVeal

I believe those lines got it working for me.  I hadn't loaded the modules.

----------

## UberLord

You only need to load the modules you need. For example, these are the modules I load with my atheros card

```
ath_pci # Loads the interface

wlan_wep # Enables WEP

wlan_tkip # Enables TKIP (WPA)

```

The other modules get loaded automatically (ath_hal, ath_rate_onoe, wlan)

You may need to load the others if you need them. For example for 802.1X security you'll need wlan_xauth

HTH

----------

## yangman

Are there ways to get around the problem of not being able to automatically connect to both WPA and unprotected networks without having to modify /etc/conf.d/net everytime the switch is made?

Although I currently only have to do this twice a day, once I get to school and another when I get home, I'd perfer not to have to manually disable wpa_supplicant at all.

----------

## UberLord

Can you not configure wpa_supplicant to connect to an unprotected network?

----------

## Bigbang

[SOLVED] My card is connected through a PCMCIA slot.

Hi, Ive got a problem I cant solve with my wireless card. I use gentoo on a toshiba a20 laptop and I managed to get wireless working with my old kernel 2.6.8.1. But now, I upgraded to 2.6.10 and it doesnt work anymore.

iwconfig returns no wireless interface and when I try to start eth1 (or ath0 or wlan0) it says that it doesnt exist.

Also, I dont know who is the producer of the wireless card because Toshiba has the worst information for that. I think its made by Agere.

With knoppix, I typed: dmesg | grep eth0 (it detected eth0 as the wireless interface)

and it returned:

eth0: Firmware determined as Lucent/Agere 8.10

eth0: Ad-hoc demo mode supported

eth0: IEEE standard IBSS ad-hoc mode supported

I tried the How-To on wiki gentoo and it didn<t work, I also reconfigured my kernel like 10 times and it still doesn<t detect my card.

~any help will be greatly appreciatedLast edited by Bigbang on Fri Feb 04, 2005 7:18 pm; edited 1 time in total

----------

## yangman

 *UberLord wrote:*   

> Can you not configure wpa_supplicant to connect to an unprotected network?

 

No wpa_supplicant documentations mention anything about connecting to unprocted networks, and all of my google searches on the matter has only turned out unanswered questions.

----------

## UberLord

 *yangman wrote:*   

>  *UberLord wrote:*   Can you not configure wpa_supplicant to connect to an unprotected network? 
> 
> No wpa_supplicant documentations mention anything about connecting to unprocted networks, and all of my google searches on the matter has only turned out unanswered questions.

 

In that case no - you can only define how you want to connect and I don't have any plans to change this.

----------

## moonlite

 *UberLord wrote:*   

>  *yangman wrote:*    *UberLord wrote:*   Can you not configure wpa_supplicant to connect to an unprotected network? 
> 
> No wpa_supplicant documentations mention anything about connecting to unprocted networks, and all of my google searches on the matter has only turned out unanswered questions. 
> 
> In that case no - you can only define how you want to connect and I don't have any plans to change this.

 

Too bad. I'd also like to be able to connect automatically when i boot up my system.

This is a PITA since i most oftne only boot my machine twice a day. Once at school and once at home (meaning su'ing and changing /etc/conf.d/net on every login)

Anyway, since i have no clue about what goes on under the hood this may be very hard to impement, so i don't mean to be too demanding. 

Thx for all work you put in to this.

And on another note. I have a small curl-script that lets me log on to the wireless network at school. I'd like that to be run when essid=at_school.

Also i'd like to be able to mount some nfs-dirs automatically when essid=at_home.

I could pretty easily put this in local.start but that's not very clean and nice.

It should be started together with netmount and net.ath0 instead.

Anyway, are this already possible or maybe at least planned?

/moonlite

----------

## UberLord

 *moonlite wrote:*   

> 
> 
> Too bad. I'd also like to be able to connect automatically when i boot up my system.
> 
> This is a PITA since i most oftne only boot my machine twice a day. Once at school and once at home (meaning su'ing and changing /etc/conf.d/net on every login)
> ...

 

Go pester the wpa_supplicant developers to add this then  :Wink: 

 *Quote:*   

> 
> 
> And on another note. I have a small curl-script that lets me log on to the wireless network at school. I'd like that to be run when essid=at_school.
> 
> Also i'd like to be able to mount some nfs-dirs automatically when essid=at_home.
> ...

 

This is already possible - some code for /etc/conf.d/net

```

postup() {

   case ${ESSID} in

      school) # do some stuff

           ;;

      home) # do some other stuff

           ;;

    esac

    return 0

}
```

----------

## moonlite

 *yangman wrote:*   

>  *UberLord wrote:*   Can you not configure wpa_supplicant to connect to an unprotected network? 
> 
> No wpa_supplicant documentations mention anything about connecting to unprocted networks, and all of my google searches on the matter has only turned out unanswered questions.

 

Actually, this is wat i found in wpa_supplicant.conf.

```

# key_mgmt: list of accepted authenticated key management protocols

# WPA-PSK = WPA pre-shared key (this requires 'psk' field)

# WPA-EAP = WPA using EAP authentication (this can use an external

#       program, e.g., Xsupplicant, for IEEE 802.1X EAP Authentication

# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically

#       generated WEP keys

# NONE = WPA is not used; plaintext or static WEP could be used

```

So i added this:

```

network={

        ssid="NOMAD"

        key_mgmt=NONE

}

network={

        ssid="UNICRON"

        key_mgmt=NONE

}

```

To my wpa_client.conf but without success net.ath0 timed out on restart so it doesn't seem to work.

----------

## moonlite

 *UberLord wrote:*   

>  *moonlite wrote:*   
> 
> Too bad. I'd also like to be able to connect automatically when i boot up my system.
> 
> This is a PITA since i most oftne only boot my machine twice a day. Once at school and once at home (meaning su'ing and changing /etc/conf.d/net on every login)
> ...

 

Heh :)

 *Quote:*   

> 
> 
>  *Quote:*   
> 
> And on another note. I have a small curl-script that lets me log on to the wireless network at school. I'd like that to be run when essid=at_school.
> ...

 

Oh. Neat!

And i guess there is also a postdown() thing where i can umount the nfs-dirs for example?

Thanks man.

----------

## UberLord

 *moonlite wrote:*   

> Oh. Neat!
> 
> And i guess there is also a postdown() thing where i can umount the nfs-dirs for example?
> 
> Thanks man.

 

Bingo  :Smile: 

----------

## bbarrera

Successfully upgraded to new baselayout and other packages:

```

>=sys-apps/baselayout-1.11.9-r1 ~x86

>=sys-apps/sysvinit-2.86 ~x86

>=app-shells/bash-3.0-r7 ~x86

>=sys-libs/readline-5.0-r1 ~x86

>=net-wireless/madwifi-driver-0.1_pre20050107 ~x86

>=net-wireless/madwifi-tools-0.1_pre20050106 ~x86

>=net-wireless/wpa_supplicant-0.3.6 ~x86

```

Configured /etc/conf.d/net and /etc/conf.d/wireless for 128 WEP. Works great.

Then wanted to get WPA-PSK working. Configured /etc/conf.d/net and /etc/wpa_supplicant.conf and tried but failed to connect. The AP doesn't have good logs so I enabled debugging (RC_VERBOSE and "-Dmadwifi -K -dd").

Here is output of wpa_cli after running /etc/init.d/net.ath0 start:

```

Connection to wpa_supplicant re-established

<2>Authentication with 00:00:00:00:00:00 timed out.

<2>Trying to associate with SSID 'bcs'

<2>Trying to associate with 00:0f:66:b2:b0:fd (SSID='bcs' freq=2462 MHz)

<2>Associated with 00:0f:66:b2:b0:fd

<2>Disconnect event - remove keys

<2>Trying to associate with SSID 'bcs'

<2>Authentication with 00:00:00:00:00:00 timed out.

<2>Trying to associate with SSID 'bcs'

<2>Trying to associate with 00:0f:66:b2:b0:fd (SSID='bcs' freq=2462 MHz)

<2>Associated with 00:0f:66:b2:b0:fd

<2>Disconnect event - remove keys

```

This repeats over and over. What does "Disconnect event - remove keys" message tell us? A quick google searched had a lot of hits but no clear answer.

The (abridged) output of "/etc/init.d/net.ath0 start" command line: 

```

 * Starting ath0

 *    Loading networking modules for ath0

 *       modules: wpa_supplicant essidnet iptunnel ifconfig dhcpcd apipa

 *          wpa_supplicant provides wireless

 *          ifconfig provides interface

 *          dhcpcd provides dhcp

 *    Starting wpa_supplicant on ath0 ...

...

...

...

Setting scan request: 0 sec 100000 usec

Daemonize..

 *       Waiting for association                                                                                    [ ok ]

 *       timed out                                                                                                  [ !! ]

```

Anything obvious? I haven't applied any patches. Tried both EAPOL version 1 and 2 (although EAPOL isn't used on LAN with WPA-PSK).Last edited by bbarrera on Sat Feb 05, 2005 7:10 pm; edited 1 time in total

----------

## Pulseammo

Hi Im having a few more problems with this script. Im using the new version (the one that comes with baselayout as I did a recent format).

I recently did a "emerge -uD world" which of course updated everything (made sure it didnt update any of the new baselayout or its dependancies). During this it grabbed two things: a new kernel which I installed (I think thats fixed a slow clock time bug for me) and the new version of wireless tools (27 I think is the latest stable for x86?)

 *Quote:*   

> 
> 
> 27 	x86 ~amd64 ppc hppa ~alpha
> 
> 

 

Compiled my new kernel with the same options as the last. Recompiled my driver for my wireless usb card and I thought Id be up and running again but no. . .

Unfortunately now when I boot the wireless script tells me that it cannot find "wlan0". Ive deleted net.wlan0 from init.d and re-created it by cloning net.lo. Also removed and re-added it to rc-update. Checked that wlan0 was still there through "iwconfig" (which it was). So Im stumped as to why it cannot find the NIC.

Any help is greatly appreciated.

----------

## bbarrera

Fixed the problem. Tested and verified that madwifi-driver-0.1-pre20050107 driver in Portage was causing problems with my a/b/g Atheros miniPCI card (5004 chipset). Simply put, the 2005-01-07 driver version in Portage simply would not work with WPA-PSK and the new networking stuff supported in new baselayout. 

Here are the fixes I implemented to make it work with WPA-PSK:

1. Uninstall net-wireless/madwifi-driver-0.1_pre20050107 and downloaded latest madwifi driver from CVS. Compiled and installed. There were several bugs in the 20050107 version of the driver on my a/b/g 5004 Atheros card. The most serious bugs were related to scanning using default "iwpriv ath0 mode 0" setting.

I created a net-wireless/madwifi-driver-0.1_pre20050205.ebuild and then created a wpa_supplicant-0.3.6-r01.ebuild. The madwifi ebuild works by just copying and creating a digest. The wpa_supplicant ebuild was edited to replace 2005-01-07 string at top with 2005-02-05. Originally I just updated the madwifi driver but then I started seeing high CPU load from wpa_supplicant and recompiling that against new madwifi driver fixed the problem. Note that wpa_supplicant ebuild downloads a private version of madwifi driver, therefore a new edited ebuild was required.

2. Restored default "ap_scan=1" parameter in /etc/wpa_supplicant.conf (I had changed it to 2).Last edited by bbarrera on Sun Feb 06, 2005 5:58 pm; edited 1 time in total

----------

## bbarrera

Using WPA-PSK with random pre-shared key and wpa_supplicant doesn't work? The current scripts have limitations when entering ASCII passphrase "psk=" in /etc/wpa_supplicant.conf -- so generate your own passphrase using wpa_passphrase program and paste output into /etc/wpa_supplicant.conf.

For example:

SSID = my_ssid

Pre-shared key = $&"($&"(

All the ASCII pre-shared key characters in my PSK have special meaning to the shell which causes problems with the new baselayout networking scripts -- therefore you can't use psk="$&"($&"(" in /etc/wpa_supplicant.conf. I hope this gets fixed someday. But that's okay, you can manually generate the 64 hex digit PSK and use that in /etc/wpa_supplicant.conf instead:

```

bbarrera@tesla ~ $ wpa_passphrase my_ssid \$\&\"\(\$\&\"\(

network={

        ssid="my_ssid"

        #psk="$&"($&"("

        psk=e6feef1fb12d6a0ed4bfd695d8fa4619ccd99c911e486351cdf729cdbbc56bf8

}

bbarrera@tesla ~ $

```

Now copy and paste the hex psk into your network block in /etc/wpa_supplicant.conf.

UberLord, it would be great if ASCII passphrase supported all ASCII characters in the future.

----------

## Pulseammo

 *Pulseammo wrote:*   

> Hi Im having a few more problems with this script. Im using the new version (the one that comes with baselayout as I did a recent format).
> 
> I recently did a "emerge -uD world" which of course updated everything (made sure it didnt update any of the new baselayout or its dependancies). During this it grabbed two things: a new kernel which I installed (I think thats fixed a slow clock time bug for me) and the new version of wireless tools (27 I think is the latest stable for x86?)
> 
>  *Quote:*   
> ...

 

Something interesting: I did some more tinkering and when i type iwconfig the card is displayed fine after boot (though with no settings or anything like that). By typing:

```

/etc/init.d/net.wlan0 stop

/etc/init.d/net.wlan0 start

```

wlan0 seems to come up, the script is executed, settings applied and all is jolly. Only problem is the box doesnt have a monitor and keyboard to do this every time I boot. 

Any advice?

----------

## johan11hp72

hello, 

Today i installed gentoo (kernel-2.6.9-r1) on my laptop. installation went fine and gentoo is running perfect. In my laptop is a intel pro 2200bg wireless card. i followed the how to guid and the information found on this forum to install this card under gentoo.

recompiled the kernel for wireless extensions

emerged ipw2200, baselayout, wirelestools & readline bash

iwconfig tells me that eth1 is my wireless card (eth0 is normal ethernet)

in /etc/conf.d/wireless specified the essid and key en in /etc/conf.d/net specified the ip and subnetmask for both interfaces (static ip) and the gateway. running "/etc/init.d/net.eth1 restart" wil retart the interface and connect it to my AP (it returns no errors) but i can not ping to any device in the network. when i turn my AP off en run "/etc/init.d/net.eth1 restart" it wil return an error that it can not connect to the essid "wireless" (when turning on the AP it can connect again. Because of this i think it is realy connecting to the AP. ( i even disabled the wep encription, but no change still can't ping to anything (exept it's own interfaces)

any ideas about what is wrong?? (or something i'm forgetting)

thanks,

johan

----------

## UberLord

Post the code that configures eth1 in /etc/conf.d/net

----------

## ccutler

hello,

I have a Linksys WPC54G and am using ndiswrapper. I followed the guide in the wiki, and was unable to get wireless working. After mucking around for awhile, I finally got it to work, but I cant get it to remember the settings.

I put my proper settings in /etc/conf.d/wireless. but everytime I reboot I have to use iwconfig to set my wep key, and ifconfig wlan0 up to get networking started. Does anyone know how I can get my settings to be applied after a reboot and have wlan0 come up automatically?

Thanks in advance.

----------

## UberLord

 *ccutler wrote:*   

> I put my proper settings in /etc/conf.d/wireless. but everytime I reboot I have to use iwconfig to set my wep key, and ifconfig wlan0 up to get networking started.

 

That indicates that you don't have your proper settings in there  :Rolling Eyes: 

Or there's something else wrong - although that's a lot less likely.

Why don't you post your config (mask your key if you like) and the script output after setting RC_VERBOSE=yes in /etc/conf.d/rc

----------

## ccutler

uh.. I didn't run etc-update   :Embarassed: 

let me play with this for a bit and try again

----------

## mikecore

now I have some question?

1) yes i have read this thread Iaso have gone to the Gentoo-Portage Wiki

I seem to be missing some things.  Is there a clear and understandable

page that explains the startup of wireless network cards.

I mean i am able to manually bring up my wlan0 card and connect to my AP

and I know howto bring down my eth0 card.

But now that Ubrlords script is in baselayout how does it work?

does it bring up both eth0 and wlan0 dhcp or what. 

I will gladly read up on this but I can't find any good docs regarding whats going on. I don't have time to go through 900 posts tring to figure out

at what point this script is patched unpatched or what.

----------

## ccutler

ok, I got everything up and running, but now I can only ping my internal network (I dont think dns is getting resolved)

What did I miss?? I have my nameservers set in /etc/resolv.conf    :Confused: 

[edit]

ok, I dont think its dns - I cant ping anything not in my hosts file. not even IP addresses. any ideas?

[edit]

Ok - I got it, I had to set my gateway (new script confused me)Last edited by ccutler on Thu Feb 10, 2005 3:12 pm; edited 1 time in total

----------

## johan11hp72

got wireless running now!

removed the hostname en dnsdomainname files in /etc/ en started using the ones in /etc/conf.d/ (as sugested to me at startup) removed the net.eth0 (that is mij normal ethernet card) en created a new net.eth0 (symlink to net.lo) restarted net.eth1 and everything worked  :Smile: 

----------

## robfantini

Hello

this needs to be changed:

```
echo "=sys-apps/baselayout-1.11.9-r1 ~x86" >> /etc/portage/package.keywords

echo "=sys-apps/sysvinit-2.86 ~x86" >> /etc/portage/package.keywords

echo "=app-shells/bash-3.0-r8 ~x86" >> /etc/portage/package.keywords

echo "=sys-libs/readline-5.0-r1 ~x86" >> /etc/portage/package.keywords
```

to

```
echo "sys-apps/baselayout ~x86" >> /etc/portage/package.keywords

echo "sys-apps/sysvinit ~x86" >> /etc/portage/package.keywords

echo "app-shells/bash ~x86" >> /etc/portage/package.keywords

echo "sys-libs/readline ~x86" >> /etc/portage/package.keywords
```

 see these threads:

https://forums.gentoo.org/viewtopic-t-293527-highlight-baselayout+blocks.html

https://forums.gentoo.org/viewtopic-t-292590-highlight-baselayout+blocks.html

Also,

 THanks for you work on wireless setup!  It is great to be able to use my laptop anywhwere at home !

----------

## Code

Would anyone be able to confirm the success of using an Intel 2200 BG wrapped with NDISWRAPPER, using 64-bit gentoo?

I noticed after a recent emerge --sync that the ndiswrapper is no longer masked for me.....

----------

## sl70

(I hope I'm doing the right thing by posting here, rather than starting a new thread for this.)

I'm having trouble connecting to an AP that doesn't broadcast its SSID. It's pretty weird: it looks like I'm authenticating, but I can't associate. I have these lines in /etc/conf.d/wireless:

```

key_picardy="462059xxxx"

mac_essid_000d728fxxxx="picardy"

```

but when I try to connect these messages appear in the log:

```
Feb 15 16:39:51 nasubi eth0: CHAN=11 BSSID=00:0d:72:8f:xx:xx SSID=  RSSI=33 num=34/2 score=-167

Feb 15 16:39:51 nasubi eth0: new BSSID 00:0d:72:8f:xx:xx

Feb 15 16:39:51 nasubi eth0: authenticate with AP 00:0d:72:8f:xx:xx CHAN=11

Feb 15 16:39:51 nasubi eth0: TX authentication (alg=1 transaction=1 status=0 Success)

Feb 15 16:39:51 nasubi eth0: RX authentication (alg=1 transaction=2 status=0 Success)

Feb 15 16:39:51 nasubi eth0: TX authentication (alg=1 transaction=3 status=0 Success)

Feb 15 16:39:51 nasubi eth0: RX authentication (alg=1 transaction=4 status=0 Success)

Feb 15 16:39:51 nasubi eth0: authenticated

Feb 15 16:39:51 nasubi eth0: associate with AP 00:0d:72:8f:xx:xx

Feb 15 16:39:51 nasubi eth0: TX AssocReq (capab=0x51)

Feb 15 16:39:51 nasubi eth0: RX AssocResp (capab=0x51 aid=5 status=12 Association denied)

Feb 15 16:39:51 nasubi eth0: AP denied association

```

It connects fine when I have them turn on the SSID broadcast.  The messages on the terminal window say dhcpc fails.

I'm running baselayout 1.11.7-r2 and kernel 2.6.9-r9 with an SMC 2635W card in a Thinkpad 570. 

Any ideas, oh wise ones?

----------

## UberLord

 *sl70 wrote:*   

> I'm running baselayout 1.11.7-r2

 

The version your using isn't even in portage anymore.

Latest is currently 1.11.9-r1

If upgrading fails to work, set RC_VERBOSE=yes in /etc/conf.d/rc and post the script output.

----------

## sl70

I upgraded overnight. I'll try this when I go to the place with that AP on Tuesday.

Thanks.

----------

## Vies

Hi everyone

greate thread, helped me a lot, but still having few little problems.

I have 3Com OfficeConnect PCMCIA card (3CRWE62092B) and using atmel drivers. I got the card working, Wep working and all, but there is some problems with starting the card on startup. something like 4 times out of 5 it cant be configured on boot. But when X has loaded, no problem.

Somehow it seems it tries to connect to a AP and decides to cut the process to quickly. I'm using static IP addresses, 128-bit Wep, and hidden SSID.

I have only two lines on my /etc/conf.d/wireless. Do I need something else?

```

essid_atml0="AP_2324242"

key_AP_2324242="restricted 0145-EB454-9435-3567-E078-7888-C2"
```

And here's also my /etc/conf.d/net

```
 iface_atml0="10.0.0.7 broadcast 10.0.0.255 netmask 255.255.255.0"

gateway="atml0/10.0.0.2"
```

----------

## vtx

 *Bigbang wrote:*   

> [SOLVED] My card is connected through a PCMCIA slot.
> 
> Hi, Ive got a problem I cant solve with my wireless card. I use gentoo on a toshiba a20 laptop and I managed to get wireless working with my old kernel 2.6.8.1. But now, I upgraded to 2.6.10 and it doesnt work anymore.
> 
> iwconfig returns no wireless interface and when I try to start eth1 (or ath0 or wlan0) it says that it doesnt exist.
> ...

 

What did you do to solve this?

I have the exact same problem!

----------

## UberLord

 *Vies wrote:*   

> And here's also my /etc/conf.d/net
> 
> ```
>  iface_atml0="10.0.0.7 broadcast 10.0.0.255 netmask 255.255.255.0"
> 
> ...

 

Could you retest with this and let me know if it works?

```
config_atml0=( "10.0.0.7 broadcast 10.0.0.255 netmask 255.255.255.0" )

routes_atml0=( "default gw 10.0.0.2" )

```

Thanks!

----------

## Vies

 *Quote:*   

> Could you retest with this and let me know if it works?
> 
> Code:
> 
> config_atml0=( "10.0.0.7 broadcast 10.0.0.255 netmask 255.255.255.0" )
> ...

 

Sorry for a delayd answer, I was away for a while.

But, no help. As I said earlier it seems like it tries to associated to AP for something like 5 seconds and the just states that no can do. Is there a way to make it try little longer.

Only way I can get it working certainly is to start atmels config program (winter in X) and it associates it with no problem. Its not a big deal, but I would like to get it working straight from the boot, so that netmounts, ntp-update etc. would work.

----------

## UberLord

```

sleep_associate_atml0=60

```

Will make it try and associate for 60 seconds

```

sleep_scan_atml0=20
```

Will make it wait 20 seconds before scanning to give the driver a chance to load or do anything it might need to

----------

## Vies

Still no luck. Those waiting times aren't helping eather.

So currently my  /etc/conf.d/wireless is following:

```
essid_atml0="AP-2324242"

key_AP_2324242="restricted 3B5D-3C7D-207E-37DC-EEED-D301-E3"

channel_atml0="4"

sleep_scan_atml0=10

sleep_associate_atml0=20

config_atml0=( "10.0.0.7 broadcast 10.0.0.255 netmask 255.255.255.0" )

routes_atml0=( "default gw 10.0.0.2" )

```

And when I plug the card in, my log looks like this:

```
Feb 23 12:00:33 [cardmgr] watching 2 sockets

Feb 23 12:00:33 [kernel] cs: IO port probe 0x0c00-0x0cff: clean.

Feb 23 12:00:33 [cardmgr] starting, version is 3.2.5

Feb 23 12:00:33 [kernel] cs: IO port probe 0x0800-0x08ff: clean.

Feb 23 12:00:33 [cardmgr] socket 1: 3Com 3CRWE62092B 11Mbps WLAN PC Card

Feb 23 12:00:33 [cardmgr] executing: 'modprobe pcmf502r3'

Feb 23 12:00:33 [kernel] pcmf502r3: ATMEL 11Mbps Wireless PCMCIA LAN driver version 2.0.1.0

Feb 23 12:00:33 [kernel] -> vnet_attach()

Feb 23 12:00:33 [kernel] -> vnet_event(registration complete, 0, 0xc8bbba24)

Feb 23 12:00:34 [kernel] pcmf502r3: Registered netdevice atml0

Feb 23 12:00:34 [cardmgr] executing: './network start atml0'

Feb 23 12:00:34 [kernel] ### SSID size changed (or NULL SSID) ### (0-0)

Feb 23 12:00:34 [kernel] Changing SSID...

Feb 23 12:00:34 [kernel] WE ARE INSIDE Scan...

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 3 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 3

Feb 23 12:00:34 [kernel] ### SSID size changed (or NULL SSID) ### (0-0)

Feb 23 12:00:34 [kernel] Changing SSID...

Feb 23 12:00:34 [kernel] WE ARE INSIDE Scan...

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 4 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 3

Feb 23 12:00:34 [kernel] Pairwise Key ONLY available (0)

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 5 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 1

Feb 23 12:00:34 [kernel] KeyRSC must be reset

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 6 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 1

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 7 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 1

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 8 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 2

Feb 23 12:00:34 [kernel] BSSID to Join = FF-00-00-00-00-00 in Channel 4

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 9 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 4

Feb 23 12:00:34 [kernel] ### SSID size changed (or NULL SSID) ### (0-10)

Feb 23 12:00:34 [kernel] Changing SSID...

Feb 23 12:00:34 [kernel] WE ARE INSIDE Scan...

Feb 23 12:00:34 [kernel] *** Command Pending (Entries: 10 - Async: 0***

Feb 23 12:00:34 [kernel] Enqueue Command ID 3

Feb 23 12:00:35 [cardmgr] +  * Starting atml0

Feb 23 12:00:36 [cardmgr] +  *    Configuring wireless network for atml0

Feb 23 12:00:36 [kernel] <- vnet_open(atml0)

Feb 23 12:00:36 [kernel] Changing RTS/CTS Threshold from 2347 to 65535

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 11 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] Changing FragmentationThreshold from 2346 to 65535

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 12 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] Setting tx power level -1

Feb 23 12:00:36 [kernel] Tx Power Level: 20

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 13 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] ENCRYPTION STATUS DISABLED

Feb 23 12:00:36 [kernel] Configuring WEP (Disabled-Mandatory-Open System)

Feb 23 12:00:36 [kernel] WEP Key to use: 0 -0

Feb 23 12:00:36 [kernel] NO WEP

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 14 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 15 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 16 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 17 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 18 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] BSSID to Join = FF-00-00-00-00-00 in Channel 4

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 19 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 4

Feb 23 12:00:36 [kernel] ### SSID size changed (or NULL SSID) ### (10-0)

Feb 23 12:00:36 [kernel] Changing SSID...

Feb 23 12:00:36 [kernel] WE ARE INSIDE Scan...

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 20 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 3

Feb 23 12:00:36 [kernel] Pairwise Key ONLY available (0)

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 21 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] KeyRSC must be reset

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 22 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 23 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 1

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 24 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 2

Feb 23 12:00:36 [kernel] BSSID to Join = FF-00-00-00-00-00 in Channel 4

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 25 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 4

Feb 23 12:00:36 [kernel] ### SSID size changed (or NULL SSID) ### (0-10)

Feb 23 12:00:36 [kernel] Changing SSID...

Feb 23 12:00:36 [kernel] WE ARE INSIDE Scan...

Feb 23 12:00:36 [kernel] *** Command Pending (Entries: 26 - Async: 0***

Feb 23 12:00:36 [kernel] Enqueue Command ID 3

Feb 23 12:00:38 [cardmgr] +  *    Failed to configure wireless for atml0

Feb 23 12:00:38 [rc-scripts] Failed to configure wireless for atml0

Feb 23 12:00:38 [kernel] Changing FragmentationThreshold from 65534 to 65535

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 27 - Async: 0***

Feb 23 12:00:38 [kernel] Enqueue Command ID 1

Feb 23 12:00:38 [kernel] Setting tx power level -1

Feb 23 12:00:38 [kernel] Tx Power Level: 20

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 28 - Async: 0***

Feb 23 12:00:38 [kernel] Enqueue Command ID 1

Feb 23 12:00:38 [kernel] ENCRYPTION STATUS DISABLED

Feb 23 12:00:38 [kernel] Configuring WEP (Disabled-Mandatory-Open System)

Feb 23 12:00:38 [kernel] WEP Key to use: 0 -0

Feb 23 12:00:38 [kernel] NO WEP

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 29 - Async: 0***

Feb 23 12:00:38 [kernel] Enqueue Command ID 1

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 30 - Async: 0***

Feb 23 12:00:38 [kernel] Enqueue Command ID 1

Feb 23 12:00:38 [kernel] ERROR: CmdQ is FULL (Command ID 1 rejected)

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 0 - Async: 1***

Feb 23 12:00:38 [kernel] Enqueue Command ID 1

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 1 - Async: 1***

Feb 23 12:00:38 [kernel] Enqueue Command ID 1

Feb 23 12:00:38 [kernel] BSSID to Join = FF-00-00-00-00-00 in Channel 4

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 2 - Async: 1***

Feb 23 12:00:38 [kernel] Enqueue Command ID 4

Feb 23 12:00:38 [kernel] ### SSID size changed (or NULL SSID) ### (10-0)

Feb 23 12:00:38 [kernel] Changing SSID...

Feb 23 12:00:38 [kernel] WE ARE INSIDE Scan...

Feb 23 12:00:38 [kernel] *** Command Pending (Entries: 3 - Async: 1***

Feb 23 12:00:38 [kernel] Enqueue Command ID 3

Feb 23 12:00:38 [kernel] <- vnet_close(atml0)

Feb 23 12:00:38 [cardmgr] +                                                                           [ !! ]

                - Last output repeated twice -

Feb 23 12:00:38 [cardmgr] start cmd exited with status 1
```

So if anyone could make some sence out of this....

----------

## UberLord

Any reason why you're using cardmgr from pcmcia-cs?

Hotplug takes care of 32-bit pcmcia cards - you only need pcmcia-cs for 16 bit cards.

Try it without pcmcia-cs

----------

## Vies

ok, now I need some advice, how do I do that.

I just installed gentoo according the handbook. Still learning.

----------

## UberLord

```
rc-update del pcmcia-cs default

rc
```

Should do the trick -although the pcmcia-cs may not be exactly correct. Check for anything pcmcia in /etc/init.d/ and rc-update del it

----------

## Vies

ok, but now theres nothing that initializes my card then.

----------

## UberLord

Actually there is  :Smile: 

If you compiled your module into the kernel directly compile it as an external module instead and voila - it should start working:)

hotplug will initialise your card for you without any interaction - you don't need hotplug in any runlevels

----------

## vuud

After upgrqading to the new baselayout (and 105 dependencies) and much tinkering I finally got the whole thing working.  

It sure is wierd though... it does unpredicable things, and other things like ignoring the blacklist on occassion.

I did waste about 3 hours trying to work through the dhcp problem, and finally realized I programmed the WAP with my old wireless card.  Something for future gentooers reading to double check  :Smile: 

Anyway, thanks for the scripts.

This is hope for anyone with an Orinoco Classic Gold - that it can work (emerge the orinoco drivers from portage)

Later all

PS. I also had a problem with my net.eth0 being connected also (although I unplugged the cable)...  it gave me some strange issues with the connection dropping.

Ah welll

----------

## gaim

Need help to fix annoying problem which I can't get my head around

Situtation:

I've got wireless going with wpa_supplicant and ndiswrapper however it's not configured quite right. To start it I have to run

```
# /etc/init.d/net.wlan0 start

* Starting wlan0

*    Starting wpa_supplicant on wlan0 ...

*    /etc/wpa_supplicant.conf must set

*      ctrl_interface=/var/run/wpa_supplicant                            [ !! ]

# /etc/init.d/wpa_supplicant start

* Starting wpa_supplicant ...

*   wlan0 ...                                                            [ ok ]

# dhcpcd wlan0
```

Just starting wpa_supplicant and then doing a dhcpcd doesn't work... so net.wlan0 is doing something that is required. no idea what though.

Question:

So what am I missing? because I have that line in my config file and wpa_supplicant starts fine when run manually:

```
# cat /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=0

eapol_version=1

ap_scan=1

network={

  ssid="myapessid"

  proto=WPA

  key_mgmt=WPA-PSK

  pairwise=CCMP TKIP

  group=CCMP TKIP WEP104 WEP40

  psk="myextraspecialpresharedkey"

  priority=2

}
```

```
# cat /etc/conf.d/net

modules=( "!wireless" "wpa_supplicant" )

wpa_timeout_wlan0=60

preferred_aps=( "myAPessid" )

config_myAPessid=( "dhcp" )

dhcpcd_myAPessid="-t 5"
```

No doubt it's something simple and I will be disgusted with myself when I find out the answer  :Rolling Eyes:  but any help appreciated

----------

## vuud

 *vuud wrote:*   

> After upgrqading to the new baselayout (and 105 dependencies) and much tinkering I finally got the whole thing working.  
> 
> It sure is wierd though... it does unpredicable things, and other things like ignoring the blacklist on occassion.
> 
> I did waste about 3 hours trying to work through the dhcp problem, and finally realized I programmed the WAP with my old wireless card.  Something for future gentooers reading to double check 
> ...

 

As a followup... upgrading to the new baselayout has a few issues of its own though.  In my case, it had 105 dependencies that needed to be upgraded, and then I blissfully accepted all the new config files.  

Also it really wanted to have xorg install (I have Xfree) so I had to get around that also.

Otherwise, everything went well

----------

## Coume

Hello,

I had this working before, and I just came back from a 4 months trip and now I have trouble.

I now use the 2004.3 which is the only modification that happened. but in checking lsmod I have this error, that I was not having before:

 *Quote:*   

> ath_hal: version magic '2.6.8-gentoo-r3 SMP preempt K7 4KSTACKS gcc-3.4' should be '2.6.8-gentoo-r3 preempt K7 4KSTACKS gcc-3.4'
> 
> wlan: version magic '2.6.8-gentoo-r3 SMP preempt K7 4KSTACKS gcc-3.4' should be '2.6.8-gentoo-r3 preempt K7 4KSTACKS gcc-3.4'
> 
> ath_pci: version magic '2.6.8-gentoo-r3 SMP preempt K7 4KSTACKS gcc-3.4' should be '2.6.8-gentoo-r3 preempt K7 4KSTACKS gcc-3.4'

 

Any idea??

thxs in advance

Ludo

----------

## UberLord

 *MythTVtalk.com wrote:*   

> 
> 
>  *Quote:*   ath_hal: version magic '2.6.8-gentoo-r3 SMP preempt K7 4KSTACKS gcc-3.4' should be '2.6.8-gentoo-r3 preempt K7 4KSTACKS gcc-3.4'
> 
> wlan: version magic '2.6.8-gentoo-r3 SMP preempt K7 4KSTACKS gcc-3.4' should be '2.6.8-gentoo-r3 preempt K7 4KSTACKS gcc-3.4'
> ...

 

Looks like you rebuilt your kernel with SMP support but didn't re-emerge madwifi-driver ....

----------

## Coume

hiya,

I did not rebuild the kernel. At least I can't record doing that... but it was 6 months ago the last contact with laptop so...  :Smile: 

anyway, if I understand correctly what you said, I have to reemerge mad-wifi right?

thxs

----------

## gaim

Anyone got any ideas about my problem??

 *Quote:*   

> Need help to fix annoying problem which I can't get my head around
> 
> Situtation:
> 
> I've got wireless going with wpa_supplicant and ndiswrapper however it's not configured quite right. To start it I have to run
> ...

 

----------

## UberLord

@gaim - Please email me your wpa_supplicant.conf file as an attachment to uberlord@gentoo.org

It looks like your config is OK so it's likely a bug -  but I do need the exact file without modification.

Thanks

----------

## fatboyjim

Hi,

Had wireless working on my WG511T for a few months now, with madwifi-driver. A problem I've noticed though is that if I'm in a low signal area (not _that_ low, maybe just below half of the max signal) the connection drops and restarts whenever I try to transfer data through it. The lights go back into search/connecting sequence

This doesn't happen on Windows, where it never drops. Is there a setting somewhere to change the required quality of the signal or something, to a bit lower?

Cheers

Jim

----------

## UberLord

@fatboyjim - that sounds like a madwifi driver problem which is out of my hands

You could try asking on their mailing lists

http://sourceforge.net/mail/?group_id=82936

----------

## fatboyjim

OK will do, thanks

----------

## wildcart

I figured out another way to solve the madwifi scanning problem. To be able to scan using the madwifi driver (V. 0.1pre20050224) I need to up the interface using `ifconfig ath0 up` as stated in the madwifi README. After that scanning works just fine on the command line (at least with 802.11g APs. Didn't try any a/b APs so). The /etc/init.d/net.lo[ath0] file still aborts with an error saying ath0 does not support scanning. So I digged into the config scripts a little (well a lot). What I figured out is if I add 

```

if [[ -z $scan ]]; then

  ewarn "${iface} scanning failed. Maybe ${iface} needs to be up for scanning"

  ifconfig $IFACE up

  local scan=$( iwlist ${iface} scanning 2>/dev/null )

fi 

```

to the iwconfig_scan function (file: /lib/rcscripts/net.modules.d/iwconfig), right after the first attempt to scan, everything seems to work.

I'm not sure if it is a good thing to do but at least it works  :Sad:  If it is a 'good' solution to the problem maybe an option in /etc/init.d/wireless would be good. Something like IFACE_ifup=0|1.

my config:

IBM Thinkpad x40

atheros AR5212 802.11abg

kernel 2.6.10

baselayout 1.11.9

wireless-tools 27

madwifi-driver-0.1_pre20050224

- /etc/conf.d/wirelss is empty -

- keywords="x86", where needed I set "~x86" on a per package base in /etc/portage - 

BTW:

I stumbled across this thread https://forums.gentoo.org/viewtopic-t-218199.html which solves the problem by  setting scan_mode_IFACE. This is working for me, too, if I set the channel to 5, but I would have to change the channel ever time I want to login to an AP using a different channel, hence edditing the config file. So it's a no go solution (at least for me)...

If there is a better/official solution to the problem, please let me know

regards Chriss

----------

## Mythos

Hi here i have this card:

0000:02:00.0 Network controller: 3Com Corporation 3com 3CRWE154G72 [Office Connect Wireless LAN Adapter] (rev 01)

  GNU nano 1.3.4                                    File: /etc/conf.d/wireless

this is my wireless conf that don't work:

```
iface_eth2="dhcp"

##############################################################################

#                             Wireless settings                              #

##############################################################################

# Hard code an ESSID to an interface

# This needs to be done when the driver doesn't support scanning

# Set to "any" to connect to any ESSID

# This may work for drivers that don't support scanning but you need automatic AP association

wireless_essid_eth2="any"

# Set the mode of the interface. Managed is default

wireles_mode_eth2="Managed"

#unique_ap="yes"

#unique_ap_eth0="yes"

#wireless_priv_eth2="mode 3"

wireless_scan_mode_eth2="Ad-Hoc"

#We define various timeouts here

wireless_sleep_scan_eth2="0"

wireless_sleep_associate_eth2="0"

#wireless_preferred="mythos"

#mac_key_000EA67XXXXX="XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX enc open"

wireless_key_ESSID="shared XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX"

##############################################################################

#                            End Wireless Settings                           #

##############################################################################

```

so i made this runscript to run my card:

```
#!/sbin/runscript

opts="start stop save reload"

start() {

        ebegin "Wireless start"

        ifconfig eth2 up

        #iwconfig eth2 mode master

        # iwconfig eth2 ap 00:30:XXXXX...

        #iwconfig eth2 retry 0

        #iwconfig eth2 rts 2346 frag 2346

        iwconfig eth2 essid mythos

        iwconfig eth2 key XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX enc open

        dhcpcd eth2

}

stop() {

        ebegin "Stopping Radiation"

        ifconfig eth2 down

        rm /var/run/dhcpcd-eth2.pid

        einfo "No radiation left"

}
```

it seems that it work al ok, until for example starting playing Enemy  Territory online. My 3com card resets very often when playing enemy or sometimes in a none special ocasion ...

is there any problem with my configuration or prism54 firmware is unstable ?? 

```
ls -l /usr/lib/hotplug/firmware/

total 92

-rw-r--r--  1 root root 93996 Mar  4 23:55 isl3890
```

by 

```
net-wireless/prism54-firmware

      Latest version available: 1.0.4.3

      Latest version installed: 1.0.4.3

      Size of downloaded files: 91 kB

      Homepage:    http://prism54.org/

      Description: Firmware for Intersil Prism GT / Prism Duette wireless chipsets

      License:     as-is

```

```
CLASS: registering class device: ID = 'eth2'

class_hotplug - name = eth2

eth2: resetting device...

eth2: uploading firmware...

eth2: firmware version: 1.0.4.3

eth2: firmware upload complete

eth2: interface reset complete

eth2: prism54_set_txpower() auto power will be implemented later.

eth2: errant PIMFOR application frame

eth2: timeout waiting for mgmt response 1000, triggering device

eth2: timeout waiting for mgmt response 900, triggering device

eth2: timeout waiting for mgmt response 800, triggering device

eth2: timeout waiting for mgmt response 700, triggering device

eth2: timeout waiting for mgmt response 600, triggering device

eth2: timeout waiting for mgmt response 500, triggering device

eth2: timeout waiting for mgmt response 400, triggering device

eth2: timeout waiting for mgmt response 300, triggering device

eth2: timeout waiting for mgmt response 200, triggering device

eth2: timeout waiting for mgmt response 100, triggering device

eth2: timeout waiting for mgmt response

eth2: islpci_close ()

eth2: resetting device...

eth2: uploading firmware...

eth2: firmware version: 1.0.4.3

eth2: firmware upload complete

eth2: interface reset complete

eth2: no IPv6 routers present

eth2: islpci_close ()

eth2: resetting device...

eth2: uploading firmware...

eth2: firmware version: 1.0.4.3

eth2: firmware upload complete

eth2: interface reset complete

eth2: prism54_set_txpower() auto power will be implemented later.

eth2: no IPv6 routers present

eth2: islpci_close ()

eth2: resetting device...

eth2: uploading firmware...

eth2: firmware version: 1.0.4.3

eth2: firmware upload complete

eth2: interface reset complete

eth2: prism54_set_txpower() auto power will be implemented later.

eth2: islpci_close ()

eth2: resetting device...

eth2: uploading firmware...

eth2: firmware version: 1.0.4.3

eth2: firmware upload complete

eth2: interface reset complete

eth2: prism54_set_txpower() auto power will be implemented later.

eth2: islpci_close ()

eth2: resetting device...

eth2: uploading firmware...

eth2: firmware version: 1.0.4.3

eth2: firmware upload complete

eth2: interface reset complete

eth2: no IPv6 routers present

```

```
Portage 2.0.51-r15 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.11-gentoo-r1 x86_64)

=================================================================

System uname: 2.6.11-gentoo-r1 x86_64 Mobile AMD Athlon(tm) 64 Processor 3000+

Gentoo Base System version 1.6.9

Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 20 2005, 17:18:31)]

ccache version 2.3 [enabled]

dev-lang/python:     2.3.4-r1

sys-devel/autoconf:  2.59-r6, 2.13

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4

sys-devel/binutils:  2.15.92.0.2-r1

sys-devel/libtool:   1.5.10-r4

virtual/os-headers:  2.6.8.1-r3

ACCEPT_KEYWORDS="amd64"

AUTOCLEAN="yes"

CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -frename-registers"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"

CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -frename-registers"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"

GENTOO_MIRRORS="ftp://ftp.rnl.ist.utl.pt/pub/gentoo ftp://ftp.gentoo-pt.org/pub/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X aalib acpi alsa amd64 arts berkdb bitmap-fonts bonobo cdr crypt cups curl esd f77 fam flac font-server fortran gdbm gif gnome gpm gstreamer gtk gtkhtml guile imagemagick imlib ipv6 java jp2 jpeg junit kde libwww lzw lzw-tiff mad mikmod motif mozilla multilib mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt readline samba screensaver sdl slang snmp sqlite ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts usb userlocales wifi xml xml2 xmms xpm xrandr xv zlib linguas_pt_PT"

Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
```

Is any problem with my conf's ? how can i make this system more efficient and with less restarts ?

Thank you

----------

## JohnerH

Hi guys,

Bit of a wierd one here....Recently I've had to transfer files about from one computer to the other.

Wireless is working everything is fine, I have a 100% link (computers at the mo are right next to the router) and a 54Mb/s reading from my wireless gkrellm2.

When I'm transfering stuff between the both of them it's transfering at a rate of about 1.4mb/s.

If I hook up the cable to both of them (throught the router) then the transfer rate goes off the roof (wich is expected).

Any ideias on why this is hapenning?

Model: Belkin FD7000 UK.  (On both).

Lspci.:

```

0000:00:0d.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 02)

```

Cheers...

J

----------

## UberLord

 *wildcart wrote:*   

> I figured out another way to solve the madwifi scanning problem. To be able to scan using the madwifi driver (V. 0.1pre20050224) I need to up the interface using `ifconfig ath0 up` as stated in the madwifi README. After that scanning works just fine on the command line (at least with 802.11g APs. Didn't try any a/b APs so). The /etc/init.d/net.lo[ath0] file still aborts with an error saying ath0 does not support scanning. So I digged into the config scripts a little (well a lot). What I figured out is if I add 
> 
> ```
> 
> if [[ -z $scan ]]; then
> ...

 

I have a madwifi card myself and I do not see this problem.

I suspect something is bringing your card up before you want it to ,,,,

https://bugs.gentoo.org/show_bug.cgi?id=78495

Let me know if that works for you or not  :Smile: 

----------

## UberLord

 *Mythos wrote:*   

> it seems that it work al ok, until for example starting playing Enemy  Territory online. My 3com card resets very often when playing enemy or sometimes in a none special ocasion ...
> 
> is there any problem with my configuration or prism54 firmware is unstable ?? 
> 
> 

 

I would guess something is wrong - but it's probably out of your hands.

I can only recommend trying different firmware really

http://prism54.org/~mcgrof/firmware/

FWIW I have a prism54 card in my laptop and it exhibits similar problems when @ work doing heavy transfers

But when @ home doing heavy transfers it works fine - so it maybe something else like the AP it's talking too as well.

----------

## wildcart

 *UberLord wrote:*   

> 
> 
> I have a madwifi card myself and I do not see this problem.
> 
> I suspect something is bringing your card up before you want it to ,,,,
> ...

 

I don't think this will help, because I am not using hotplug or anything like that. Maybe I should have mentioned that the laptop got the card build in (mini-pci).

Steps I am doing in order to be able to scan:

1. boot the system (does not load ath_pci)

2. login

3. open a root shell

4. `modprobe ath_pci`

4a. `ifconfig`

```

lo        Link encap:Local Loopback

```

5. `iwconfig`

```

lo        no wireless extensions.

ath0    IEEE 802.11  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00

...

```

6. `iwlist ath0 scan`

```

ath0    Interface doesn't support scanning : Invalid argument

```

7. `/etc/init.d/net.ath0 start`

```

* Starting ath0

*      Configuring wireless network for ath0

*      ath0 does not support scanning

...

```

8. `ifconfig ath0 up`

9. `iwlist ath0 scan`

```

ath0    Scan complete:

          Cell 01....

```

10. `/etc/init.d/net.ath0 start`

```

* Starting ath0

*      Configuring wireless network for ath0

*      ath0 does not support scanning

...

```

11. `/etc/init.d/net.ath0 start` - with the patch

```

* Starting ath0

*     Configuring wireless network for ath0

*           ath0 connected to...

```

now its up and running! Also, this is the behavior I expect when reading doc/madwifi-0.1pre20050224/README.gz. 

BUT:

I solved the problem another way (without patching the file). Sometimes I had the problem that `iwlist ath0 scan` returned 'ath0: Failed to read scan data : Resource temporarily unavailable' (this was because the card scanned for/connected to an AP running the command `ifconfig ath0 up`). Searching for this problem on the internet suggested to upgrade to wireless-tools 28pre_3. Doing this solved the 'Resource temporarily unavailable' problem. The net.ath0 scipt is working now, too. I am not sure why and how it is working now, because in order to use the command `iwlist ath0 scan` I still need to run `ifconfig ath0 up` first...

Chriss

----------

## UberLord

 *wildcart wrote:*   

> I don't think this will help, because I am not using hotplug or anything like that. Maybe I should have mentioned that the laptop got the card build in (mini-pci). 

 

Maybe I should have mentioned that you will get that bug if you have hotplug or coldplug installed.

Just because you are not using it is irrelevant - if it's installed (/sbin/hotplug) then you suffer from the bug.

 *Quote:*   

> The net.ath0 scipt is working now, too. I am not sure why and how it is working now, because in order to use the command `iwlist ath0 scan` I still need to run `ifconfig ath0 up` first...
> 
> 

 

Oh that's an easy one - the interface is up before a scan is made

You can check this yourself by doing ifconfig ${iface} right before the scan line. If the word UP appears in the output then the interface is actually UP.

----------

## wildcart

 *UberLord wrote:*   

> 
> 
> Maybe I should have mentioned that you will get that bug if you have hotplug or coldplug installed.
> 
> Just because you are not using it is irrelevant - if it's installed (/sbin/hotplug) then you suffer from the bug.
> ...

 

I don't have hotplug installed.

 *UberLord wrote:*   

> 
> 
> Oh that's an easy one - the interface is up before a scan is made
> 
> You can check this yourself by doing ifconfig ${iface} right before the scan line. If the word UP appears in the output then the interface is actually UP.

 

Ok, that's obvious. But do you have any idea why the interface is up with wireless-tools 28_preX and not with wireless-tools 27?

Chriss

[update]

P.S. thnx for the help

----------

## UberLord

 *wildcart wrote:*   

> Ok, that's obvious. But do you have any idea why the interface is up with wireless-tools 28_preX and not with wireless-tools 27?

 

A bug in wireless-tools at a rough guess?

At least you're working now though  :Smile: 

----------

## Mythos

 *UberLord wrote:*   

>  *Mythos wrote:*   it seems that it work al ok, until for example starting playing Enemy  Territory online. My 3com card resets very often when playing enemy or sometimes in a none special ocasion ...
> 
> is there any problem with my configuration or prism54 firmware is unstable ?? 
> 
>  
> ...

 

Hi there Uberlord, i will format my gentoo and re-install from the begin.

For a amd64 and a prism54 card, and ati card what is the best kernel ?

mm-sources ? ck-sources ? or gentoo-dev-sources ?

----------

## UberLord

 *Mythos wrote:*   

> Hi there Uberlord, i will format my gentoo and re-install from the begin.
> 
> For a amd64 and a prism54 card, and ati card what is the best kernel ?
> 
> mm-sources ? ck-sources ? or gentoo-dev-sources ?

 

Why a re-install? It probably won't help your wireless issue.

As to the best kernel - I tend to use gentoo-dev-sources for my amd64 box as it's the only kernel supported by Gentoo on amd64

----------

## Mythos

well i had few problems with dispatch-conf long time ago, and i have some replicate files in /etc. i will re-install just to clean up this mess i have made .

----------

## viperlin

sorry but i cant seem to see anywhere in /etc/conf.d/net.example that says how to set it to be an adhoc network

i tried 

```
wireles_mode_wlan0="Ad-Hoc"

```

 like in the old scripts but it didnt work i still get 

```
# /etc/init.d/net.wlan0 start

 * Starting wlan0

 *    Configuring wireless network for wlan0

 *    Couldn't associate with any access points on wlan0

 *    Failed to configure wireless for wlan0                              [ !! ]
```

care to point me in the correct direction?

my /etc/conf.d/net was blank (bar header comment) after using etc-update, i was expecting a template anyway heres what i'm trying:

```

iface_eth0="192.168.1.30 broadcast 192.168.1.255 netmask 255.255.255.0"

gateway="eth0/192.168.1.1"

dns="eth0/194.168.4.100"

config_ESSID=( "shibby" )

config_wlan0=( "192.168.0.2/24" )

wireles_mode_wlan0="Ad-Hoc"

```

----------

## UberLord

 *viperlin wrote:*   

> sorry but i cant seem to see anywhere in /etc/conf.d/net.example that says how to set it to be an adhoc network

 

It's in /etc/conf.d/wireless.example  :Wink: 

I've done new config for you  :Smile: 

```

config_eth0=( "192.168.1.30/24 brd 192.168.1.255" )

routes_eth0=( "default via 192.168.1.1" )

essid_wlan0="shibby"

mode_wlan0="ad-hoc"

config_shibby=( "192.168.0.2/24" )

```

----------

## viperlin

oooh thanks! lol

/me slaps forehead

----------

## tjfriese

When is the baselayout used here going to be unmasked? Madwifi?

Will this all happen in 2005.0?

Thanks,

Tim

----------

## UberLord

 *tjfriese wrote:*   

> When is the baselayout used here going to be unmasked?

 

Soon (tm)

 *Quote:*   

> 
> 
> Will this all happen in 2005.0?
> 
> 

 

In 2005 yes, but probably 2005.1

----------

## jerrybme

I'm getting the following error when trying to set my key 

```
eth0 doesn't support setting keys or "key_Taxi" is incorrect
```

In my wireless config file in /etc/con.d/ I have my ESSD is "Taxi" so my key statement is"

```
key_Taxi="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx enc open"
```

also 

```
mode_eth0="managed"
```

I have net.eth0 linked to net.lo

What am I missing?

----------

## UberLord

Does it work when you set the key manually?

----------

## jerrybme

 *UberLord wrote:*   

> Does it work when you set the key manually?

 

Yes, I've double & triple checked the key for typos. I can set the key with the iwconfig eth0 enc command.

Does this error mean that the key is not being accepted by the AP or is it that it is malformed some way and can't be set on my wireless card?

I'll try using scite to copy and paste the key from the script I've been using to connect to my AP into /etc/con.d/wireless, to make sure I've got the key right.

Thanks

----------

## UberLord

Try removing the enc open bit.

If that fails, mail or pm me your exact config and I'll see if I can reproduce

----------

## jerrybme

 *jerrybme wrote:*   

>  *UberLord wrote:*   Does it work when you set the key manually? 
> 
> Yes, I've double & triple checked the key for typos. I can set the key with the iwconfig eth0 enc command.
> 
> Does this error mean that the key is not being accepted by the AP or is it that it is malformed some way and can't be set on my wireless card?
> ...

 

Well, dispite my visually checking several times, pasting in the WEP key from my script I had been using to connect did the trick. I also removed the "enc open" after the key.

User error strikes again! :Embarassed: 

Thanks

----------

## plafuro

Hi all !!

I just "ndiswrapped" the driver for my wireless card and started the configuration... I wrote the configurationn file, following several how-tos and dont manage to get this up... if run iwconfig i get

```
wlan0     IEEE 802.11g  ESSID:off/any

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:00:00:00:00:00

          Bit Rate:1 Mb/s   Tx-Power:-2147483648 dBm

          RTS thr:2347 B   Fragment thr:2346 B

          Encryption key:off

          Power Management:off

          Link Quality:100/100  Signal level:56/154  Noise level:0/154

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

even though i **think** that i wrote the wireless configuration file properly...

the card is working somehow, because i get to see my accesspoint if i run iwlist wlan0 scan

```
 Cell 01 - Address: 00:04:0E:80:37:1E

                    ESSID:"Pandemonium"

                    Protocol:IEEE 802.11g

                    Mode:Managed

                    Frequency:2.427 GHz (Channel 4)

                    Quality:0/100  Signal level:-58 dBm  Noise level:-256 dBm

                    Encryption key:on

                    Bit Rate:1 Mb/s

                    Bit Rate:2 Mb/s

                    Bit Rate:5.5 Mb/s

                    Bit Rate:11 Mb/s

                    Bit Rate:22 Mb/s

                    Bit Rate:6 Mb/s

                    Bit Rate:9 Mb/s

                    Bit Rate:12 Mb/s

                    Bit Rate:18 Mb/s

                    Bit Rate:24 Mb/s

                    Bit Rate:36 Mb/s

                    Bit Rate:48 Mb/s

                    Bit Rate:54 Mb/s

                    Extra:bcn_int=100

                    Extra:atim=0

                    Extra:wpa_ie=dd160050f20101000050f20201000050f20201000050f202
```

But somehow its not working... any ideas?

Thanks in advance

[EDIT] By the way, if i try to run  "iwconfig wlan0 channel 4" to change the channel, i get this:

```

Error for wireless request "Set Frequency" (8B04) :

    SET failed on device wlan0 ; Invalid argument.

```

Is that somehow "normal"?

thanks again

----------

## epohs

Hello,

Been having trouble with my D-Link DWL G520.

I followed the tutorial here, and tried to configure /etc/conf.d/wireless, but seem to be having some trouble.

I'm quite unknowledgeable about this, so i'm not sure if i'm providing enough information or not, so well, here's what i'm seeing:

/etc/init.d/net.ath0 restart

```
 * Starting ath0

 *    Configuring wireless network for ath0

 *       ath0 connected to "jason-home" at FF:FF:FF:FF:FF:FF

 *       in ad-hoc mode (WEP disabled)

 *    Bringing up ath0

 *       Configuration not set for ath0 - assuming dhcp

 *       dhcp

 *          Running dhcpcd ...                                            [ !! ]
```

iwconfig

```
ath0      IEEE 802.11  ESSID:"jason-home"  Nickname:"jason-home"

          Mode:Ad-Hoc  Frequency:2.437 GHz  Cell: FF:FF:FF:FF:FF:FF

          Bit Rate:0 kb/s   Tx-Power:50 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

iwlist scan

```
ath0      Failed to read scan data : Resource temporarily unavailable
```

my /etc/conf.d/wireless:

```
essid_ath0="any"

mode_ath0="Managed"

adhoc_essid_ath0="jason-home"

channel_ath0="6"
```

/etc/init.d/net.ath0 has been symlinked to net.lo, and i have version 0.1_pre20050224 of the madwifi-drivers installed.

any help, or advice you can give me would be great!

thanks.

----------

## UberLord

Madwifi drivers do not support ad-hoc mode, so remove that setting.

Also, remove the essid_ath0="any" line - only people who's card/driver does not support scanning need it.

Infact, you don't need any of your wireless config lines. At most you would want to define a key for AP's and possibly a preferred order, but that's it.

----------

## epohs

Thanks for the response, UberLord.

Commenting all lines in /etc/conf.d/wireless, and leaving only this line in /etc/conf.d/net:

```
modules=( "!iwconfig" )
```

yeilds similar results:

```
 * Starting ath0

 *    Bringing up ath0

 *       Configuration not set for ath0 - assuming dhcp

 *       dhcp

 *          Running dhcpcd ...                                            [ !! ]

```

Is there any way I can force  more verbose error messages?

----------

## viperlin

 *epohs wrote:*   

> Thanks for the response, UberLord.
> 
> Commenting all lines in /etc/conf.d/wireless, and leaving only this line in /etc/conf.d/net:
> 
> ```
> ...

 

check /var/log/messages and if it is erroring running dhcpd try runnning "dhcpd" from commandline

----------

## epohs

I don't see anything that stands out in /var/log/

```
bash: dhcpd: command not found
```

hmm..

----------

## viperlin

did you try running that as root?, sorry should have mentioned that

----------

## epohs

yeah, i'm logged in as root.

----------

## UberLord

 *epohs wrote:*   

> Thanks for the response, UberLord.
> 
> Commenting all lines in /etc/conf.d/wireless, and leaving only this line in /etc/conf.d/net:
> 
> ```
> ...

 

LOL

That modules line says "don't use iwconfig". The only other mech we support for wireless is wpa_supplicant - which doesn't look like it's installed.

Try removing that line

 *Quote:*   

> 
> 
> Is there any way I can force  more verbose error messages?

 

RC_VERBOSE="yes" in /etc/conf.d/rc

----------

## nyne

I am using wpa_supplicant with ndiswrapper to connect to my wireless lan at home (802.11g linksys/cisco AP using WPA/PKI)... if i boot up my machine from home it logs right on to the wireless lan, however if i go anywhere else I have to wait for wpa_supplicant to time out and manually run dhcpcd wlan0 in order to gain network connectivity.. is there a way to automate this or a fix i am oblivious to?

here is my wpa_supplicant.conf 

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

network={

        ssid="nyneX"

        psk=bunchofreallycoolencryptedstuffgoeshere

}

```

and here is my /etc/conf.d/net

```

iface_eth0="dhcp"

#wlan0

modules=("!iwconfig")

modules=("wpa_supplicant")

wpa_supplicant_wlan0="-Dndiswrapper"

wpa_timeout_wlan0=30

```

any help would be greatly appreciated!

----------

## UberLord

afaik the problem is that you need a "default AP with no encryption" which wpa_supplicant doesn't support.

However, the iwconfig does allow this - but you can only use no encryption or WEP - nothing else.

----------

## nyne

hmmm

so my best bet would be start editing init scripts to attempt to grab an ip address via dhcpcd if wpa_supplicant fails? or create a different runlevel that only uses iwconfig and pass some sort of grub parameter?

----------

## UberLord

That I don't know - you're talking about different network profiles.

quickswitch supports this and it's in portage - but I've never tried it.

----------

## kevlinsky

First, I'd like to thank UberLord for the HOWTO article. Unfortunately, I  have a problem:

I do not have the wireless.example file. I remerged wireless-tools, figuring maybe it got deleted, but still nothing. I'd rather use iwconfig to manipulate my wireless than using wpa-supplicant.

----------

## UberLord

 *kevlinsky wrote:*   

> First, I'd like to thank UberLord for the HOWTO article. Unfortunately, I  have a problem:
> 
> I do not have the wireless.example file

 

It's included in baselayout

```
emerge -pv baselayout
```

You need baselayout-1.11.10-r4 or better

----------

## epohs

 *UberLord wrote:*   

> LOL
> 
> That modules line says "don't use iwconfig". The only other mech we support for wireless is wpa_supplicant - which doesn't look like it's installed.
> 
> Try removing that line
> ...

 

DOH!  I should've definately noticed that.

Anyhow, I commented that line out, and added RC_VERBOSE="yes" to /etc/conf.d/rc. and it didn't seem to make much of a difference

```
 * Starting ath0

 *    Loading networking modules for ath0

 *       modules: iptunnel ifconfig dhcpcd apipa

 *          ifconfig provides interface

 *          dhcpcd provides dhcp

 *    Bringing up ath0

 *       Configuration not set for ath0 - assuming dhcp

 *       dhcp

 *          Running dhcpcd ...                                            [ !! ]
```

..however, I did notice this in dmesg:

```
ath_hal: module license 'Proprietary' taints kernel.

ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413)

wlan: 0.8.4.5 (EXPERIMENTAL)

wlan: mac acl policy registered

ath_rate_amrr: 0.1

ath_rate_onoe: 1.0

ath_pci: 0.9.4.12 (EXPERIMENTAL)

ACPI: PCI interrupt 0000:00:09.0[A] -> GSI 10 (level, low) -> IRQ 10

ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

ath0: mac 7.9 phy 4.5 radio 5.6

ath0: 802.11 address: 00:11:95:90:ee:b4

ath0: Use hw queue 0 for WME_AC_BE traffic

ath0: Use hw queue 1 for WME_AC_BK traffic

ath0: Use hw queue 2 for WME_AC_VI traffic

ath0: Use hw queue 3 for WME_AC_VO traffic

ath0: Atheros 5212: mem=0xdb000000, irq=10

ath0: ath_chan_set: unable to reset channel 2 (2417Mhz): 'Hardware didn't respond as expected' (HAL status 3)

ath0: ath_chan_set: unable to reset channel 2 (2417Mhz): 'Hardware didn't respond as expected' (HAL status 3)

ath0: ath_chan_set: unable to reset channel 2 (2417Mhz): 'Hardware didn't respond as expected' (HAL status 3)

ath0: ath_chan_set: unable to reset channel 2 (2417Mhz): 'Hardware didn't respond as expected' (HAL status 3)

ath0: ath_chan_set: unable to reset channel 4 (2427Mhz): 'Hardware didn't respond as expected' (HAL status 3)
```

could this be a sign that MadWifi isn't installed correctly?  or maybe that my kernel isn't cofigured properly?

i used genkernel to compile my kernel.

----------

## viperlin

i beleve the problem is that you havnt installed dhcpd.............................................................................  :Shocked: 

i thought i covered that allready

----------

## frozenJim

Listen all, I don't want to be flamed here, nor am I trying to flame our hard-working Gentoo developers - But SOMEBODY really ought to post an "OFFICIAL GENTOO WIRELESS HOW-TO".  

After reading through hundreds - if not more - posts on this topic, I STILL haven't decided if there is a right way to install my wireless card.

Just when I think I have it, the next post says "but that is now discontinued..."  or "this is now included in the xxxx package".

It's great that we can all emerge and then unmerge and then monkey around and then pray... but I like to use Gentoo and still have a stable environment (which is largely why I left Micro$oft in the first place).  As someone just jumping into the Gentoo-wireless fray, I have to say it appears extremely frightening.  100 different ways to do it, THIS thread calls itself the "OFFICIAL GENTOO" thread, but it isn't really - a point strongly pointed out by uberlord to the LAST guy who asked this question.

WHERE do I go to find the STANDARD WIRELESS INSTALL FOR GENTOO?

I know it's wordy, but I have read a few others get flamed for posing this same question - a VALID question - a question that really deserves a straight answer.

If I knew HOW to install my wireless card on Gentoo, I would offer to write the HOW-TO.  But since I have absolutely NO IDEA where to begin due to the conflicting threads and 100% lack of documentation on the Gentoo.org site, I cannot.

Surely wireless networking isn't THAT cutting edge?

OK, my asbestos suit is on... I await a reply (but I'm still using my cat-5 to do it!)  :Twisted Evil: 

----------

## BaXi

I've just setup baselayout 1.11.xx without any troubles at all. My cable network is setup and ready to go but my wireless doesn't seem to find any AP's but iwlist eth1 scanning spits out quite a few. I've tried the "any any any" method in /etc/conf.d/wireless but this is my current setup.

/etc/conf.d/wireless

```
essid_eth0="RU-wireless"

mode_eth0="master"

key_ESSID="xxxx-xxxx-xx enc open"

config_ESSID=( "dhcp" )

dhcpcd_ESSID="-D"

preferred_aps=( "RU-wireless")

associate_order="any"
```

This is what my iwlist eth1 scanning spits out

```
iwlist eth1 scanning

eth1      Scan completed :

          Cell 01 - Address: 00:02:2D:82:47:BD

                    ESSID:"RU-wireless"

                    Mode:Master

                    Frequency:2.447 GHz (Channel 8)

                    Signal level:-70 dBm  Noise level:-92 dBm

                    Encryption key:on

          Cell 02 - Address: 00:02:2D:B1:AA:BB

                    ESSID:"RU-wireless"

                    Mode:Master

                    Frequency:2.422 GHz (Channel 3)

                    Signal level:-75 dBm  Noise level:-88 dBm

                    Encryption key:on

          Cell 03 - Address: 00:20:A6:4F:08:97

                    ESSID:"RU-wireless"

                    Mode:Master

                    Frequency:2.457 GHz (Channel 10)

                    Signal level:-83 dBm  Noise level:-95 dBm

                    Encryption key:on

          Cell 04 - Address: 00:20:A6:4F:08:97

                    ESSID:"RU-wireless"

                    Mode:Master

                    Frequency:2.457 GHz (Channel 10)

                    Signal level:-84 dBm  Noise level:-95 dBm

                    Encryption key:on

          Cell 05 - Address: 00:02:2D:B1:AA:D6

                    ESSID:"RU-wireless"

                    Mode:Master

                    Frequency:2.437 GHz (Channel 6)

                    Signal level:-87 dBm  Noise level:-90 dBm

                    Encryption key:on
```

and finally what my net.eth1 init script spits out

```
mars init.d # /etc/init.d/net.eth1 start

 * Starting eth1

 *    Configuring wireless network for eth1

 *    Couldn't associate with any access points on eth1

 *    Failed to configure wireless for eth1
```

My wireless card is a orinoco gold pcmcia card with drivers installed and working. Use to setup my wireless under <=baselayout-1.11.xx with these 3 commands:

```
iwconfig ESSID RU-wireless

iwconfig key xxxxxxxxxx

dhcpcd eth1
```

 I know there is a great chance this problem has been solved somwhere in the +70 pages these 2 wireless topics are becoming and i don't have the time nor the patience to go through it all:wink:

Thx

 Andri Mar Jónsson

----------

## epohs

 *viperlin wrote:*   

> i beleve the problem is that you havnt installed dhcpd............................................................................. 
> 
> i thought i covered that allready

 

I'm quite sure that I have ran the dhcpd command on this install in the past.  in fact, i'm positive i have.  but, that was when i was unsuccessfully trying to get a LinkSys card to work with ndiswrapper.

I suppose in the process of unmerging ndiswrapper I could've broken dhcpd too?

According to portage, I have version 1.3.22_p4-r5 of net-misc/dhcpcd installed.

----------

## viperlin

 *epohs wrote:*   

> I don't see anything that stands out in /var/log/
> 
> ```
> bash: dhcpd: command not found
> ```
> ...

 

that i beleive means dhcpd is broken if you ran it as root i think dhcpd is supposed to be in your path so it should have ran from a root command prompt

try a 

```
locate dhcpd
```

 or a 

```
whereis dhcpd
```

if nothing shows up thats the binary maybe try re-emerging it

----------

## UberLord

 *epohs wrote:*   

> 
> 
> Anyhow, I commented that line out, and added RC_VERBOSE="yes" to /etc/conf.d/rc. and it didn't seem to make much of a difference
> 
> ```
> ...

 

You need to emerge wireless-tools

 *Quote:*   

> 
> 
> ..however, I did notice this in dmesg:
> 
> ```
> ...

 

That's not good.

I would use the madwifi email lists for help with that.

----------

## UberLord

 *frozenJim wrote:*   

> Listen all, I don't want to be flamed here, nor am I trying to flame our hard-working Gentoo developers - But SOMEBODY really ought to post an "OFFICIAL GENTOO WIRELESS HOW-TO".

 

http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

 *Quote:*   

> 
> 
> After reading through hundreds - if not more - posts on this topic, I STILL haven't decided if there is a right way to install my wireless card.

 

Technically, there is no "right way". For example I can setup my wireless at home using either WEP or WPA security - both require different configurations.

 *Quote:*   

> Just when I think I have it, the next post says "but that is now discontinued..."  or "this is now included in the xxxx package".

 

Yeah. My fault really. Guess I should not have gotten my work included in Gentoo  :Rolling Eyes: 

 *Quote:*   

> WHERE do I go to find the STANDARD WIRELESS INSTALL FOR GENTOO?

 

At present there isn't any official documentation - bar what's in the install guide.

However, I'll let you have a sneek peak at semi-official documentation I'm working on

http://dev.gentoo.org/~uberlord/net-book/

Please note, that it's not wireless specific, but just a nice guide about configuring networks under Gentoo

 *Quote:*   

> 
> 
> If I knew HOW to install my wireless card on Gentoo, I would offer to write the HOW-TO.  But since I have absolutely NO IDEA where to begin due to the conflicting threads and 100% lack of documentation on the Gentoo.org site, I cannot.

 

Tell you what, follow my guide and then email me (uberlord@gentoo.org) about any recommendations you would make to it!Last edited by UberLord on Mon Apr 04, 2005 1:01 pm; edited 1 time in total

----------

## UberLord

 *BaXi wrote:*   

> I've just setup baselayout 1.11.xx without any troubles at all. My cable network is setup and ready to go but my wireless doesn't seem to find any AP's but iwlist eth1 scanning spits out quite a few. I've tried the "any any any" method in /etc/conf.d/wireless but this is my current setup.

 

Try removing the mode="master" line, set RC_VERBOSE=yes in /etc/conf.d/rc and try again

----------

## frozenJim

Uber- you are the UBEREST!

I was just getting back to EDIT my post - I found your wiki entry (easy once I realized that 'readline' wasn't emerging so I searched google for 'readline AND baselayout' - bingo - your wiki page!).

Thanks for the perfectly painless reply, and for exactly the answer that I - and many, many others - needed.

If we can just get a link to your wiki page listed in www.gentoo.org/docs/en then I suspect that a whole PILE of frustrated folk with no network connectivity will love you.

Anywho, thx.  My emerge is plodding along now just fine.

----------

## mope

Things that aren't covered in that howto that I desperately need are trouble-shooting FAQ.

For example, I've been trying to handle a problem with either /etc/init.d/net.ath0 start coming back as no ath0 found or no response at all. Neither case is wireless working, though.

On my main box, I have the same kernel, same .config, and afaik, same packages emerged but no wireless on two and wireless on the main one. I can't figure this out and it's really pissing me off since I've been wasting my time for over 6 months now.

I used to have wireless-tools setup, but now I just changed over to wpa_supplicant.

On one computer this worked fine and the same two that have always given me problems, I have no idea. On one, it's a laptop with a card and one is a desktop.

Both are using d-link cards: dwl-g650 on the lappy and dwl-g520 on the two desktops.

All of them are the newest revision and use madwifi-drivers.

I don't even know where to begin because there are so many instructions floating around. But when I first started trying (and eventually got my main desktop to work) I used this thread.

----------

## groover

Hi there, 

I did not really read this whole thread, but it seemed to me that this question was not asked, so it was not answered.

I have an ipw2100 driven wireless interface eth1. 

I used to fire my network interface up using a python script of my own. 

There are 5 wireless networks I frequently use, and as I decided to let Gentoo control my wireless connections, there was some problem after configuring /etc/conf.d/wireless.

eth1 itself works, wireless connection to my wrt54gs (Linksys router/ap) works fine, I use WEP encryption and don't broadbast my ESSID.

/etc/init.d/net.eth1 (symlinked to net.lo) works fine, in case I use essid_eth1="Streik", but not anymore if I set up essid_eth1="any". This is really annoying!

Perhaps some problems with my configuration files (don't think so), 

my /etc/conf.d/net: // this works fine within my little network

```
config_eth0=("dhcp")

dhcpcd_eth0="-t 5 -D"

```

my /etc/conf.d/wireless:

```
essid_eth1="any"

mode_eth1="auto"

#sleep_scan_eth1="0"

sleep_associate_eth1="5"

key_Streik="<my WEP key>" // no other options set

config_Streik=("dhcp")

dhcpcd_Streik="-d -t 5 -B -D"

fallback_Streik=("10.10.10.4/24 brd 10.10.10.255") 

fallback_route_Streik=("default via 10.10.10.23") // <- is this possible? 

<some other network configurations>

```

my output not using RC_VERBOSE just said * Failed to configure wireless for eth1 [ !! ], with RC_VERBOSE it looks like this:

```
bomile.root( /etc/conf.d ): /etc/init.d/net.eth1 start                                                                                     18:01:45

 * Caching service dependencies ...                                                                                                                       [ ok ]

 * Starting eth1

 *    Loading networking modules for eth1

 *       modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa

 *          iwconfig provides wireless

 *          ifconfig provides interface

 *          dhcpcd provides dhcp

 *    Configuring wireless network for eth1

 *    Connecting to "any" (WEP Disabled) ...                                                                                                          [ !! ]

 *    Failed to configure wireless for eth1                                                                                                                [ !! ]

```

If I use essid_eth1="Streik" everything works fine. 

I wonder why the script prints out WEP would be disabled?

In general, would be nice to see any suggestions and tips about wireless configuration using the Gentoo-way and about exactly this problem. 

Are there any experiences about this using the ipw2100 drivers, is it possible with them to use essid_$iface="any"?

Oh, ah, some words to my currently installed software 

(emerge eix !):

```
bomile.root( /etc/conf.d ): eix -s -I ipw -c                                                                                                      18:38:40

[ I] net-wireless/ipw2100 (1.1.0): Driver for the Intel PRO/Wireless 2100 3B miniPCI adapter

[ I] net-wireless/ipw2100-firmware (1.3): Firmware for the Intel PRO/Wireless 2100 3B miniPCI adapter

bomile.root( /etc/conf.d ): eix -s -I wireless -c                                                                                              18:38:43

[ I] net-wireless/wireless-tools (28_pre6): A collection of tools to configure wireless LAN cards

bomile.root( /etc/conf.d ): eix -s -I baselayout -c                                                                                        18:39:27

[ I] sys-apps/baselayout (1.11.10-r6): Base layout for Gentoo Linux (incl. initscripts and sysvinit)

```

I think this should be everything, thanks in advance, 

kraM

----------

## UberLord

 *groover wrote:*   

> 
> 
> I did not really read this whole thread, but it seemed to me that this question was not asked, so it was not answered.
> 
> 

 

Actually, this question has been asked in many forms many times.

essid_eth1 is used for setting the ESSID name. That is it. If you set it, it will not scan. Therefore it will only try to connect to one AP.

The except is the ESSID "any". That's a special ESSID which tells the driver to pick any ESSID it can. That is not scanning - you have no control over the AP the driver selects.

This is thoroughly described in wireless.example - there's even line in the essid_eth0 description stating "I would only set this as a last resort - use the preferred_aps setting". How can I be any clearer?

What you need is as follows

```

preferred_aps=( "Streik" )

associate_order="forcepreferred" # This tells us that we want to try to connect to AP's that are not broadcasting ESSID

key_Streik="<my WEP key>"

config_Streik=("dhcp")

dhcpcd_Streik="-d -t 5 -B -D"

fallback_Streik=("10.10.10.4/24 brd 10.10.10.255") 

fallback_route_Streik=("default via 10.10.10.23") # yes, this is possible

```

----------

## groover

Um, okay, as I said, and as I said sorry, again, but...

 *Quote:*   

> This is thoroughly described in wireless.example - there's even line in the essid_eth0 description stating "I would only set this as a last resort - use the preferred_aps setting". How can I be any clearer?

 

Yes, how can it be, you're right. My question was if there is any possibility that I do not have to set my last resort!

Your suggestion for firering my wireless interface up is exactly what I do not want! It would be much easier to use my script instead of opening and editing /etc/conf.d/wireless, if I'd like to connect to another AP than this I've written above.

But I'd like to have it "fully automated", and after your reply I think that this is currently not possible with my wireless interface? Remember, there are 5 networks configured in my /etc/conf.d/wireless that I quite often use.

 *Quote:*   

> # "forceany" does the same as forcepreferred + connects to any other available AP

 

I thaught, this could be exactly what I want: First, try all configured APs, and if none of them was found try almost any other AP found by scanning. 

But again, thanks for your reply, 

kraM

----------

## UberLord

 *groover wrote:*   

> Um, okay, as I said, and as I said sorry, again, but...
> 
>  *Quote:*   This is thoroughly described in wireless.example - there's even line in the essid_eth0 description stating "I would only set this as a last resort - use the preferred_aps setting". How can I be any clearer? 
> 
> Yes, how can it be, you're right. My question was if there is any possibility that I do not have to set my last resort!
> ...

 

OK - let me put it another way.

essid_eth0="FOO" will only try to connect to FOO - which is not what you want.

I've also explained that "any" won't work either for you.

You then go onto say that you doubt that your config files don't have any problems and yet it's a clear problem?

I give up!

 *Quote:*   

> 
> 
> Your suggestion for firering my wireless interface up is exactly what I do not want! It would be much easier to use my script instead of opening and editing /etc/conf.d/wireless, if I'd like to connect to another AP than this I've written above.
> 
> But I'd like to have it "fully automated", and after your reply I think that this is currently not possible with my wireless interface? Remember, there are 5 networks configured in my /etc/conf.d/wireless that I quite often use.

 

```

preferred_aps=( "ESSID1" "ESSID2" "ESSID3" "ESSID4" "ESSID5")

associate_order="forcepreferred"

key_ESSID1="s:foo"

key_ESSID2="s:foo"

key_ESSID3="s:foo"

key_ESSID4="s:foo"

key_ESSID5="s:foo"

```

There you go - that works (or should) for your stated requirement.

With that config - and nothing else - it will try ESSID1, then 2, through 5. The AP's don't have to broadcast their ESSID either.

----------

## groover

Alright, now I got it, 

thanks a lot.

I think my failure was, that I only tried to comment out essid_eth1="any" (or an ESSID name) once, and this was as there were'nt configured any preferred_aps. 

Sorry for my stupidity, or so, 

and again thanks a lot, 

kraM

----------

## jhboricua

I followed the Wireless wiki how to and after some monkeying around got my wireless card to come up.  But I'm running into a problem.  First, here's my configs:

/etc/conf.d/net

```

# Prefer iproute2 over ifconfig

modules=( "iproute2" )

# You can also specify other modules for an interface

# In this case we prefer udhcpc over dhcpcd

#modules_eth0=( "udhcpc" )

# You can also specify which modules not to use - for example you may be

# using a supplicant or linux-wlan-ng to control wireless configuration but

# you still want to configure network settings per ESSID associated with.

modules=( "!iwconfig" )

#-----------------------------------------------------------------------------

# WIRELESS (802.11 support)

modules=( "wpa_supplicant" )

wpa_supplicant_eth0="-Dipw"

wpa_timeout_eth0=60

# config_eth0=( "dhcp" )

# dhcpcd_eth0="-t 15"

```

/etcwpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

# EAP-PEAP/MSCHAPv2 configuration for RADIUS servers that use the new peaplabel

# (e.g., Radiator)

network={

   ssid="Zerochill"

   key_mgmt=WPA-EAP

   eap=PEAP

   identity="myuser"

   password="mypassword"

   ca_cert="/etc/cert/zerochill.pem"

   phase1="peaplabel=0"

   phase2="auth=MSCHAPV2"

   priority=10

}

```

Now, when I do 

```
/etc/init.d/net.eth0 start
```

 from console I get the following output:

```
* Starting eth0

 *    Starting wpa_supplicant on eth0 ...                                                                                 [ ok ]

 *       eth0 connected to "Zerochill" at 00:30:BD:9A:11:E3

 *    Bringing up eth0

 *       dhcp

 *          Running dhcpcd ...                                                                                            [ ok ]

 *          eth0 received address 192.168.4.246

```

So far so good.  I add the net.eth0 to the default runlevel, and reboot my machine, and this is what happens:

```
* Starting eth0

 *    Stopping wpa_supplicant on eth0 ...                                                                                 [ ok ]

 *    Starting wpa_supplicant on eth0 ...                                                                                 [ ok ]

 *       eth0 connected to "Zerochill" at 00:30:BD:9A:11:E3

 *    Bringing up eth0

 *       dhcp

 *          Running dhcpcd ...

 *          dhcpcd is already running on eth0                                                                             [ ok ]

 * Mounting network filesystems ...      

```

So the first thing that bugs me is that it says "Stopping wpa...."  FIRST!!!  Why?? Then it starts it again, 'connects' and runs dhcpcd, which complains it is already running on eth0.  To make matters worse, it doesn't pull an IP so I end up with no connectivity.  However, if I log as root and do 

```
/etc/init.d/net.eth0 restart
```

 I get the first output I posted above which shows the interface pulling an IP and NONE of the complaints about DHCP already running.  Can someone shed some light on this?  Why is the interface able to startup fine when I run the script from console but not when the PC reboots and goes thru the startup scripts???  Its my understanding that it is using the same init.d script to bring the interface up, right?

----------

## golgo13

I'm thuroughly confused. Am I supposed to be using /etc/conf.d/net or /etc/conf.d/wireless with ndiswrapper? Looking back in this thread it looks as though I am supposed to use /etc/conf.d/wireless however Uberlord's networking-in-progress handbook http://dev.gentoo.org/~uberlord/net-book/hb_part1_chap4.html only uses /etc/conf.d/net . Right now in /etc/conf.d/net I have:

```

modules=( "iwconfig" )

iwconfig_wlan0="dhcp"

iwconfig_wlan0="power period 3"

dhcpcd_wlan0="-HD"

dhcpcd_wlan0="-N"

```

and in /etc/conf.d/wireless I have:

```

iwconfig_wlan0="dhcp"

iwconfig_wlan0="power period 3"

dhcpcd_wlan0="-HD"

dhcpcd_wlan0="-N"

associate_order_wlan0=( "coachbuilder" "linksys" "ball" "dlink" "rccd" "any" )

mac_essid_000C853E2200="rccd"

```

Any help as to which file I'm supposed to use and where things go would be appreciated.

Another question:

When I start my computer neither file seems to help with anything. When I /etc/init.d/net.wlan0 restart I get the output:

```

* WARNING:  you are stopping a boot service.

 * Stopping wlan0

 *    Loading networking modules for wlan0

 *       modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa

 *    Bringing down wlan0

 *       Shutting down wlan0 ...                                                                [ ok ]

 * Starting wlan0

 *    Loading networking modules for wlan0

 *       modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa

 *          iwconfig provides wireless

 *          ifconfig provides interface

 *          dhcpcd provides dhcp

 *    Configuring wireless network for wlan0

 *    Scanning for access points

 *       Found "Hough" at 00:0D:3A:26:CB:4D (WEP required)

 *       Found "coachbuilder" at 00:06:25:C5:29:5B

 *    Couldn't associate with any access points on wlan0

 *    Failed to configure wireless for wlan0
```

Next, if I 

```
ifconfig wlan0 up
```

 and 

```
dhcpcd -n wlan0
```

 Everything works. What is going on!!

----------

## UberLord

 *jhboricua wrote:*   

> So the first thing that bugs me is that it says "Stopping wpa...."  FIRST!!!  Why?? Then it starts it again, 'connects' and runs dhcpcd, which complains it is already running on eth0.  To make matters worse, it doesn't pull an IP so I end up with no connectivity.  However, if I log as root and do 
> 
> ```
> /etc/init.d/net.eth0 restart
> ```
> ...

 

https://bugs.gentoo.org/show_bug.cgi?id=78495

----------

## UberLord

 *golgo13 wrote:*   

> I'm thuroughly confused. Am I supposed to be using /etc/conf.d/net or /etc/conf.d/wireless with ndiswrapper? Looking back in this thread it looks as though I am supposed to use /etc/conf.d/wireless however Uberlord's networking-in-progress handbook http://dev.gentoo.org/~uberlord/net-book/hb_part1_chap4.html only uses /etc/conf.d/net.

 

The reasons are twofold - when baselayout first introduced wireless, the maintainer (and maybe still is - lol) about the ammount of wireless config variables, so we decided to have two seperate files.

However, as the documentation is now on-line - and you don't really need that many variables it makes more sense to just add to the conf.d/net file.

HTF did you get that form the documentation?

Here is a working one

/etc/conf.d/net

```

modules=( "iwconfig" )

config_wlan0=( "dhcp" )

iwconfig_wlan0="power period 3"

dhcpcd_wlan0="-HDN"

```

/etc/conf.d/wireless - or simply add it to /etc/conf.d/net

```

preferred_aps=( "coachbuilder" "linksys" "ball" "dlink" "rccd" "any" )

mac_essid_000C853E2200="rccd"

```

Last edited by UberLord on Thu Apr 07, 2005 9:51 am; edited 1 time in total

----------

## nichocouk

Hi Uberlord,

I've looked at your online documentation and again, as explained e.g. in this post https://forums.gentoo.org/viewtopic.php?p=2272056#2272056 I cannot get wpa_supplicant to connect to my AP when I ask for WPA-PSK. I tried several possibilities as detailed in your doc or in the wpa_supplicant.conf.example. Only WEP works. This ennoys me as I chose wpa_supplicant to be able to use WPA-PSK encryption. What could be the reason? Is there some specific module or kernel configuration I should look at for WPA-PSK encryption to work?

Thanks!

----------

## UberLord

wpa_supplicant can be hard to debug - but it is possible. Add "-d" to the wpa_supplicant options to enter debug mode.

Then you'll get a whole load of stuff that's going on, but it should tell you what is is not doing correctly.

----------

## nichocouk

Thanks,

I'll have a look tonight when I'm back home.

Cheers,

----------

## golgo13

UberLord, thanks for the quick reply. Thanks to you, it seems, that everything is working as it should.

----------

## jhboricua

 *UberLord wrote:*   

>  *jhboricua wrote:*   So the first thing that bugs me is that it says "Stopping wpa...."  FIRST!!!  Why?? Then it starts it again, 'connects' and runs dhcpcd, which complains it is already running on eth0.  To make matters worse, it doesn't pull an IP so I end up with no connectivity.  However, if I log as root and do 
> 
> ```
> /etc/init.d/net.eth0 restart
> ```
> ...

 But, I'm not using hotplug, which is what that bugzila page talks about.  Nevertheless, I'm looking to see if the file that the patch is for exist anyway.

----------

## jhboricua

Well I'll be damned.  I patched the /etc/hotplug/net.agent file with the patch on that bugzilla page and upon rebooting the interface came up right.   I don't understand it since I don't have hotplug in any runlevel but I'll take it.   :Smile: 

Thanx Uber.

----------

## UberLord

 *jhboricua wrote:*   

> Well I'll be damned.  I patched the /etc/hotplug/net.agent file with the patch on that bugzilla page and upon rebooting the interface came up right.   I don't understand it since I don't have hotplug in any runlevel but I'll take it.  
> 
> Thanx Uber.

 

If you read the comments on the bug, hotplug just needs to be installed - if it's in a runlevel or not is irrelevant

----------

## nichocouk

Hello there,

I finally managed to add the debug option to wpa_supplicant and do some tests (I could not do it before as I needed a continuously running connection).

If I choose a simple configuration like this one:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

network={

        ssid="my_ssid"

       psk="my ascii pass"

}

```

I get this :

```

# /etc/init.d/net.ath0 start

  * Starting ath0

  *    Starting wpa_supplicant on ath0 ...

  Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'

  Reading configuration file '/etc/wpa_supplicant.conf'

  ctrl_interface='/var/run/wpa_supplicant'

  ctrl_interface_group=0

  eapol_version=1

  ap_scan=1

  Priority group 0

     id=0 ssid='my_ssid'

     EAPOL: SUPP_PAE entering state DISCONNECTED

     EAPOL: KEY_RX entering state NO_KEY_RECEIVE

     EAPOL: SUPP_BE entering state INITIALIZE

     EAP: EAP entering state DISABLED

     EAPOL: External notification - portEnabled=0

     EAPOL: External notification - portValid=0

     wpa_driver_madwifi_set_wpa: enabled=1

     wpa_driver_madwifi_del_key: keyidx=0

     wpa_driver_madwifi_del_key: keyidx=1

     wpa_driver_madwifi_del_key: keyidx=2

     wpa_driver_madwifi_del_key: keyidx=3

     wpa_driver_madwifi_set_countermeasures: enabled=0

     wpa_driver_madwifi_set_drop_unencrypted: enabled=1

     Setting scan request: 0 sec 100000 usec

     Daemonize..            [ ok ]

      *       timed out            [ !! ]

```

Just fyi here is the output of lsmod:

```

# lsmod

Module                  Size  Used by

wlan_wep                7040  1

lp                      9604  0

uhci_hcd               31248  0

parport_pc             23748  1

parport                22208  2 lp,parport_pc

ath_pci                55200  0

ath_rate_onoe           8200  1 ath_pci

ath_hal               148048  2 ath_pci

usb_storage            30464  0

sis900                 19332  0

ehci_hcd               30344  0

usbcore               108152  4 uhci_hcd,usb_storage,ehci_hcd

wlan_tkip              12032  0

wlan                  110556  5 wlan_wep,ath_pci,ath_rate_onoe,wlan_tkip

nvidia               3917564  14

```

I've added wlan_tkip in /etc/modules.autoload.d/kernel-2.6 to make sure it is loaded at boot, but I'm not sure it has any effect...

Any idea?

Thanks,

----------

## UberLord

Try running wpa_supplicant manually - baselayout puts wpa_supplicant into Daemon mode which you can't really debug under.

----------

## nichocouk

Hi everyone, Hi Uberlord,

sorry to be so long to reply, I couldn't make it sooner.

Here is the output of running wpa_supplicant manually:

```
# wpa_supplicant -Dmadwifi -d -c /etc/wpa_supplicant.conf -i ath0

Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'madwifi'

Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant.conf'

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group=0

eapol_version=1

ap_scan=1

Priority group 0

   id=0 ssid='my_ssid'

Initializing interface (2) 'ath0'

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Own MAC address: 00:02:8a:b8:15:1e

wpa_driver_madwifi_set_wpa: enabled=1

wpa_driver_madwifi_del_key: keyidx=0

wpa_driver_madwifi_del_key: keyidx=1

wpa_driver_madwifi_del_key: keyidx=2

wpa_driver_madwifi_del_key: keyidx=3

wpa_driver_madwifi_set_countermeasures: enabled=0

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

Setting scan request: 0 sec 100000 usec

Wireless event: cmd=0x8b06 len=8

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

Starting AP scan (broadcast SSID)

Wireless event: cmd=0x8b1a len=12

Wireless event: cmd=0x8b19 len=12

Received 459 bytes of scan results (2 BSSes)

Scan results: 2

Selecting BSS from priority group 0

0: 00:05:b4:07:e9:91 ssid='my_ssid' wpa_ie_len=26 rsn_ie_len=0

   selected

Trying to associate with 00:05:b4:07:e9:91 (SSID='my_ssid' freq=2437 MHz)

Cancelling scan request

Automatic auth_alg selection: 0x1

WPA: using IEEE 802.11i/D3.0

WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2

WPA: using GTK TKIP

WPA: using PTK TKIP

WPA: using KEY_MGMT WPA-PSK

WPA: Own WPA IE - hexdump(len=24): obscured

No keys have been configured - skip key clearing

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

wpa_driver_madwifi_associate

Setting authentication timeout: 5 sec 0 usec

EAPOL: External notification - EAP success=0

EAPOL: External notification - EAP fail=0

EAPOL: External notification - portControl=Auto

Wireless event: cmd=0x8b1a len=23

Wireless event: cmd=0x8b15 len=20

Wireless event: new AP: 00:05:b4:07:e9:91

Association event - clear replay counter

Associated to a new BSS: BSSID=00:05:b4:07:e9:91

No keys have been configured - skip key clearing

Associated with 00:05:b4:07:e9:91

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

EAPOL: External notification - EAP success=0

EAPOL: External notification - portEnabled=1

EAPOL: SUPP_PAE entering state CONNECTING

EAPOL: txStart

WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)

EAPOL: SUPP_BE entering state IDLE

EAP: EAP entering state INITIALIZE

EAP: EAP entering state IDLE

Setting authentication timeout: 10 sec 0 usec

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

RX EAPOL from 00:05:b4:07:e9:8e

Setting authentication timeout: 10 sec 0 usec

EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines

IEEE 802.1X RX: version=1 type=3 length=95

  EAPOL-Key type=254

WPA: RX message 1 of 4-Way Handshake from 00:05:b4:07:e9:8e (ver=1)

WPA: WPA IE for msg 2/4 - hexdump(len=24): obscured

WPA: Renewed SNonce - hexdump(len=32): obscured

WPA: PMK - hexdump(len=32): [REMOVED]

WPA: PTK - hexdump(len=64): [REMOVED]

WPA: EAPOL-Key MIC - hexdump(len=16): obscured

WPA: Sending EAPOL-Key 2/4

RX EAPOL from 00:05:b4:07:e9:8e

EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines

IEEE 802.1X RX: version=1 type=3 length=95

  EAPOL-Key type=254

WPA: RX message 1 of 4-Way Handshake from 00:05:b4:07:e9:8e (ver=1)

WPA: WPA IE for msg 2/4 - hexdump(len=24): obscured

WPA: PMK - hexdump(len=32): [REMOVED]

WPA: PTK - hexdump(len=64): [REMOVED]

WPA: EAPOL-Key MIC - hexdump(len=16): obscured

WPA: Sending EAPOL-Key 2/4

RX EAPOL from 00:05:b4:07:e9:8e

EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines

IEEE 802.1X RX: version=1 type=3 length=95

  EAPOL-Key type=254

WPA: RX message 1 of 4-Way Handshake from 00:05:b4:07:e9:8e (ver=1)

WPA: WPA IE for msg 2/4 - hexdump(len=24): obscured

WPA: PMK - hexdump(len=32): [REMOVED]

WPA: PTK - hexdump(len=64): [REMOVED]

WPA: EAPOL-Key MIC - hexdump(len=16): obscured

WPA: Sending EAPOL-Key 2/4

Signal 2 received - terminating [i hit ^C]

wpa_driver_madwifi_deauthenticate

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: External notification - portValid=0

wpa_driver_madwifi_set_wpa: enabled=0

wpa_driver_madwifi_set_drop_unencrypted: enabled=0

wpa_driver_madwifi_set_countermeasures: enabled=0

```

Just to refresh memories, my conf file is:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

network={

        ssid="my_ssid"

       psk="my ascii pass"

}

```

Thanks for your help!

----------

## _loki_

I'm running a Prism2 based card, so I have the choice of 3 diffrent drivers to use: hostap-driver, orinoco (the new version as a module, not the old in kernel) and linux-wlan-ng. I successfully tested all of them, but I'm not sure about their major differences. Is one of them supperior about the others?

Thanks for your opinion!

----------

## UberLord

orinoco (in portage) should be the most reliable

hostap-driver offers more features, but it's not as extensively used

linux-wlan-ng is the worst simply because it insists on using it's icky configuration and setup

But that's my opinion  :Wink: 

----------

## _loki_

regarding wlan-ng that's exactly what messed it up for after all, as I wanted to use the new wireless implementation in baselayout.. Trieing it the last time I still had diffisulties with wireless scan using the orinoco driver (from portage), the wireless-script kept complaining that the driver does not support scanning.. I'm runnig the hostap-driver right now, seems to be stable..

----------

## zigver

So what's the current status of wpa_supplicant being able to connect to non-encrypted APs?

The wiki page says "The bonus in configuring your wireless setup using wpa_supplicant is that it supports all types of encryption currently used: WEP, WPA, and even non-encrypted." while the wireless networking documentation on gentoo.org says "wpa_suppliant is the best choice, but it does not support all cards/drivers and currently cannot connect to un-encypted Access Points."

Last time I tried connecting to a non-encrypted AP with wpa_supplicant, I couldn't.  But then again, I might not have had my configs right.

----------

## UberLord

 *_loki_ wrote:*   

>  Trieing it the last time I still had diffisulties with wireless scan using the orinoco driver (from portage), the wireless-script kept complaining that the driver does not support scanning..

 

My script does not lie there - some itterations of the orionoco driver in portage don't support scanning, but they all support monitor (guess the maintainer is a war driver)

 *Quote:*   

>  I'm runnig the hostap-driver right now, seems to be stable..

 

Excellent  :Smile: 

----------

## _loki_

pretty much though! hostap scanning mode allows me to use the full capacibilitys of you script (thaks a lot by the way). At home I can use my private network and being in University the driver connects automaticly to thier network after setting it up in the prfered list..

Anyway I had some minor problems to get hostap to work and posted my (suboptimal) solutions in this post:

https://forums.gentoo.org/viewtopic-t-330402-highlight-.html

If there is someone who likes to take  a look on it I'll appreciate!

----------

## JerMe

The only way I could get wpa_supplicant to work was to issue it by commandline.  For some reason, net.eth0 isn't available anymore, so I can't use rc-update add net.eth0 default to bring eth0 up at boottime... 

```
wpa_supplicant -Dipw -ieth0 -c/etc/wpa_supplicant.conf -B

dhcpcd eth0
```

The only lines in my /etc/conf.d/net:

```
modules=("wpa_supplicant")

config_eth0="dhcp"

wpa_supplicant_eth0="-Dipw"
```

... but it seems like the code is being ignored at boot.  At least I know wpa_supplicant works in my system, right?  :Smile:  Could you help me to get wpa_supplicant to work on boot?

----------

## UberLord

Create a smbolic link from net.lo to net.eth0

```
cd /etc/init.d

ln -s net.lo net.eth0
```

Then you can rc-update it and see it working!

----------

## JerMe

Man I'm such a newb.  :Smile:  Thanks UberLord, it works!

What's really weird, though, was that when I did what you said and rebooted, it would bring eth0 up, start wpa_supplicant, connect to the router, run DHCP to get an IP from the router... and right after it got the IP, it would bring eth0 down.  :Crying or Very sad: 

I thought maybe it was because I was downstairs and too far from the router.  So I shut off the lappy, went upstairs close to where the router was, plugged in, turned the lappy on and watched to see if it would the same thing.  This time no problem - it connected just fine (after a period of time trying to connect to the router.)

Maybe it was the shutdown, maybe it's because I'm closer to the router now, 'Im not sure.  I'll try to replicate it again.  Thank you for the help!  :Smile: 

----------

## yesi

hi

i have my wireless network is fine untill here: my config worked and works fine.

But since i'd like to change my kernel gentoo-sources-2.6.11-gentoo-r5 to -r6 (or to come back 2.6.10-gentoo-r6 ), it seems that my /etc/conf.d/wireless config doesn't seem to work.

i have :

```
/etc/init.d/net.wlan0 -> net.lo
```

in my /etc/conf.d/net

```
auto_interface="yes"

config_wlan0=( "dhcp" )

modules=( "iwconfig" )

dhcpcd_wlan0="-t 10"

dhcpcd_wlan0="-HD"

dhcpcd_wlan0="-N"
```

in my /etc/conf.d/wireless

```
essid_wlan0="toto"

mode_wlan0="Managed"

channel_wlan0="4"

iwconfig_wlan0="rate 11M"

key_toto="XXXXXX enc open"

mac_key_XXX="XXXXX"
```

and

```
sys-apps/baselayout-1.12.0_alpha2-r1
```

when i switch to a different kernel, after the boot i did 

```
iwconfig wlan0
```

 and i got something différent from the config of my /etc/con.d/wireless.

i don't know what to do to at the boot, my network run my /etc/con.d/wireless...

so i'm still with gentoo-sources-2.6.11-gentoo-before that works fine but for the next gentoo-sources, what's should i do...?  :Sad: 

thanks in advanceLast edited by yesi on Mon May 02, 2005 10:29 pm; edited 1 time in total

----------

## xline

hello I hope you ppl can help me its going in 3 days since I have tried for the fist time install the rt2500 in gentoo... I had this wireless pcmcia working in a nother linux disto. but in gentoo it does not work i have compiled and instmod. of the driver but the utility stil tells me that theirs no driver... 

i have tried to use the Rat2500 whith i have in windows full working... in the make process tels tha my linux sistem does not suport this driver...

the opensource ones.. rt2500-cvs-2.... they cmpile no erro's fund... but iwconfig. ra0 no device found iwconfig wlan0 no device found and so on....

I have loaded the module my self and some times it does finds and tells no wirelles extentions... but silt in that case the driver is not found by the utility..

i cant connect by eth0 because my university only suports wlan.. and i don't have internet at the un residential....

can any one help me....

thanks

----------

## UberLord

 *yesi wrote:*   

>  -> net.lo[/code]
> 
> in my /etc/conf.d/net
> 
> ```
> ...

 

This makes no sense - the last dhcpcd_wlan0 overwrites the others.

```
dhcpcd_wlan0="-t 10 -H -D -N"
```

 *Quote:*   

> 
> 
> in my /etc/conf.d/wireless
> 
> ```
> ...

 

Right. You're using an alpha version. Maybe try the latest 1.11.x of baselayout?

BTW, in Managed mode there is no point in specifying the channel.

 *Quote:*   

> 
> 
> when i switch to a different kernel, after the boot i did 
> 
> ```
> ...

 

Did you emerge your wireless driver after changing kernel?

----------

## UberLord

 *xline wrote:*   

> hello I hope you ppl can help me its going in 3 days since I have tried for the fist time install the rt2500 in gentoo... I had this wireless pcmcia working in a nother linux disto. but in gentoo it does not work i have compiled and instmod. of the driver but the utility stil tells me that theirs no driver... 
> 
> i have tried to use the Rat2500 whith i have in windows full working... in the make process tels tha my linux sistem does not suport this driver...
> 
> the opensource ones.. rt2500-cvs-2.... they cmpile no erro's fund... but iwconfig. ra0 no device found iwconfig wlan0 no device found and so on....
> ...

 

I don't do driver support, but check that you have wireless support enabled in your kernel.

If that fails, or you already have it enabled, try starting a new thread.

----------

## xline

yes I have enabled the wireless suport on the kernel what do you mean by starting a new thread. ?!

----------

## yesi

to UberLord

ok  i've changed what youhave suggested and now i run  with 

```
sys-apps/baselayout-1.11.11-r3
```

i switch to -2.6.11-gentoo-r6

i use acx100 like the driver for my wireless and i re-emerge my wireless driver after changing kernel

but it doen't work.

the samething error: my /ect/conf.d/wireless is not accepted

```
essid_wlan0="toto"

mode_wlan0="Managed"

iwconfig_wlan0="rate 11M"

key_toto="XXXXXX enc open"

mac_key_XXX="XXXXX"
```

in my /ect/conf.d/net

```
auto_interface="yes"

config_wlan0=( "dhcp" )

modules=( "iwconfig" )

dhcpcd_wlan0="-t 10 -H -D -N"
```

so i've returned with my gentoo-source-before

it's stange!

----------

## yesi

i got this error in my dmesg:

```
Updating transmit power: 18 dBm

changing radio power level to 18 dBm (23)

get_mask 0x00000000, set_mask 0x00001000 - after update

get_mask 0x00000000, set_mask 0x00041000

important setting has been changed --> need to update packet templates, too

Updating WEP key settings

Setting WEP key: 0 with size: 13

Setting WEP key 0 as default.

Starting radio scan

acx_set_status: Setting status = 1 (SCANNING)

<acx_set_timer> Elapse = 2500000

get_mask 0x00000000, set_mask 0x00001000 - after update

get_mask 0x00000000, set_mask 0x00011000

important setting has been changed --> need to update packet templates, too

Starting radio scan

acx_issue_cmd FAILED: Scan in progress [4786600 uSec] Cmd: 8h, Result: Fh

acx_set_status: Setting status = 1 (SCANNING)

<acx_set_timer> Elapse = 2500000

get_mask 0x00000000, set_mask 0x00001000 - after update

FIXME: most likely needs refinement, first implementation version only...

acx_set_status: Setting status = 0 (STOPPED)

module count --

```

and it doesn't work yet...

----------

## UberLord

I suggest you ask on any acx100 mailing lists, forums or start a new thread here and I don't do driver support - unless you want to buy me some hardware that is  :Wink: 

----------

## snorri_dj

This wireless thread is really confusing. Just starting out with gentoo and finished my second install on a laptop just the other day. It has an ethernet card that doesn't have a supported driver yet. Wireless however, worked out of the box once I'd run net-setup eth0 on the live cd. So I happily emerged away, ran /etc/init.d/net.eth0 and crunched through Bob's stage 1/3 install. Just for some info - the wireless network at university that I'm connected to is open, so there was very little configuration.

Upon finishing the install I made sure I had the ipw2200 (my wireless card) module built by the kernel and rebooted - everything went smoothly. net.eth0 in the default configuration so it connected no problem. Now several boots later, I have curious behaviour. In /etc/conf.d/net I have 

iface_eth0="dhcp"

dhcpcd_eth0="-HD -N -t 10"

and that's it. 

Questions:

1) I've not actually edited anything that tells the card what the name of the network it connects to is called (does it just hook into the first one it finds when none are specified??). 

2) It still brings up the same IP address for the card everytime it connects - over a period of several days. Is this likely or is it remembering something it shouldn't?

3) The curious behaviour. The init script (/etc/init.d/net.eth0) brings up the interface and gives it the IP address and I can ping out to other computers on the same network (xxx.xxx.xxx.1 for example). But when I try and ping anything else I get

connect: Network is unreachable

4) Why does the interface get brought down on bootup just before all the other scripts are started?

Been reading for hours now, and completely baffled. Can't find any logic in how it's working...or not working! I will try upgrading to the later version of baselayout as you recommend in uberlord's HOWTO tomorrow, but seems pointless when it was pretty much working (and works without a hitch on the liveCD).

Just tried upgrading baselayout, but couldn't unmask it with either the package.unmask or the package.keywords options. Is this still do-able?

Cheers,

Daniel.

----------

## UberLord

 *snorri_dj wrote:*   

> This wireless thread is really confusing.

 

Yes it is. I'll try and get a mod to close it.

 *Quote:*   

> 
> 
> 1) I've not actually edited anything that tells the card what the name of the network it connects to is called (does it just hook into the first one it finds when none are specified??).

 

Depends on the driver. All mine don't

 *Quote:*   

> 
> 
> 2) It still brings up the same IP address for the card everytime it connects - over a period of several days. Is this likely or is it remembering something it shouldn't?
> 
> 

 

Yes, most dhcp clients remember their old address and request it again

 *Quote:*   

> 
> 
> 3) The curious behaviour. The init script (/etc/init.d/net.eth0) brings up the interface and gives it the IP address and I can ping out to other computers on the same network (xxx.xxx.xxx.1 for example). But when I try and ping anything else I get
> 
> connect: Network is unreachable
> ...

 

That suggests that you do not have a default gateway set, or it's blocking you.

You can check to see if you have a default gateway by doing

```

route -n
```

----------

## snorri_dj

Thanks for the reply Uberlord,

 *Quote:*   

> 
> 
> Yes, most dhcp clients remember their old address and request it again
> 
> That suggests that you do not have a default gateway set, or it's blocking you.
> ...

 

I expected something of the like with dhcpcd. But seems to be the gateway that's the problem, so I won't worry about that. I just dropped back to the livecd and found an upgrade for ipw2200 and that seems to have reinitialised things, so wireless is working again for the moment. I'll be able to check things more thoroughly later.

I went and checked a few things with dhcpcd. The man page for it seems a bit out of date, referring to files and directories in etc that aren't there. One thing I might be able to do is to set the gateway permanently (it looks like it's always sitting at xxx.xxx.xxx.1) by adjusting the call to the dhcpcd with -G in /etc/conf.d/net. 

Still no idea why it's losing that though.

Certainly seems to be dhcpcd issues I'm grappling with though rather than wireless issues, which is good to know.

Thanks for the pointer,

Daniel.

PS. By the way, does the system store the gateway address when it receives one like it does for the nameserver address?

----------

## pjp

 *UberLord wrote:*   

>  *snorri_dj wrote:*   This wireless thread is really confusing. 
> 
> Yes it is. I'll try and get a mod to close it.

 

----------

