# ipw2200 iwconfig always fails

## nightfrost

I've been trying and trying so much, but I've never succeeded. I will be forever greatful to anyone who takes away my only reason to boot in to winxp constantly. I've seen all the wireless net connection threads, and I've been reading them through, and I can imagine everyone's tired of yet another one. But I haven't managed to get any connection yet, so...

OK so I'm trying to connect to an open access point. I have baselayout (+ dependencies) in ~x86, I have added modules = ("iwconfig") to /etc/conf.d/net and I'm trying to connect with:

```
iwconfig eth1 mode managed ap any

dhcpcd eth1
```

but the ip-retrieval fails. Sometimes even the connection dissappears (I keep monitoring that in kwifimanager). I know it's supposed to work, cause when I boot into winxp everything's alright. Actually, I'm posting this using that very connection. Any help will immensely appreciated!

----------

## nightfrost

quick update:

I tried booting with Kanotix and my ipw2200 was configured nicely. Only difference was that it was assigned to eth0 instead of eth1.

One thing I should mention is that when I boot (i.e. to my normal gentoo install), iwconfig gives me something like this:

```
eth1      IEEE 802.11g  ESSID:"Amani"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:11:50:4D:D1:04

          Bit Rate=5.5 Mb/s   Tx-Power=20 dBm

          RTS thr:off   Fragment thr:off

          Power Management:off

          Link Quality=21/100  Signal level=-79 dBm  Noise level=-88 dBm

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

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

After only a few seconds the same command gives no Access Point address, but shows instead 00:00:00:00:00:00.

I just need a pointer here. Why can kanotix (and windows) keep in touch with the access point, but now gentoo?

----------

## nightfrost

A *bump* in desperation, and some new info. What basically happens after a couple of minutes is that the ap address reverts to 00:00:00:00:00:00

iwconfig:

```
eth1      unassociated  ESSID:"Amani"  Nickname:"Amani"

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

  -------snip-------
```

ESSID remains, I have as of yet not managed to retrieve an ip address the few seconds there is an ap assigned...

----------

## Sloden

I have the same wireless card, and it works like a charm. I'll give you a short summary of what I did.  :Smile: 

* Emerged ipw2200 - got the modules (lsmod):

  ieee80211_crypt_wep 

  ipw2200                

  ieee80211            

  ieee80211_crypt

*Added the following modules to my /etc/modules.autoload.d/kernel-2.6

  ipw2200

  ieee80211_crypt_wep

* Added the following to my /etc/conf.d/net

  iface_eth1="dhcp"

Run with "/etc/init.d/net.eth1 start" or add it to your runlevel of choice. You can specify your ap using its mac address. Is your ap set to broadcast? I wasn't aware of the modules="iwconfig" in "/etc/conf.d/net" option. What does it do? This is about it. It's been a while since my last install, so I could have missed something.

Good luck!

----------

## nightfrost

Thanks alot for the reply. I've been trying  your suggestions now (and a bunch of other things as well), but nothing so far has helped. I've installed archlinux on another partition and am as of now exploring that distro. My ipw2200 seems to work just fine there, so this is definitely a gentoo thing. I can't understand what it is..

It feels like there's something resetting the wlan configs. But what?

----------

## Sloden

Checking my kernel config... Just in case.. You have the following enabled in your kernel?:

* "device drivers=>networking support=>wireless LAN (non-hamradio)=> Wireless LAN drivers (non-hamradio) & Wireless Extensions and TUN/TAP"

and 

* "device drivers=>networking support=> Universal TUN/TAP device driver support"

And you've emerged wireless-tools, (obvously from your iwconfig reference)  :Smile: 

----------

## Sloden

You'd might want to log your dhcp-events. Pass dhcpcd -d, and make sure your syslogger picks up either all '*' or more specified 'local0.*'. This can perhaps give a clue to what's wrong.

As I said - I have the exact same card, and it should work.

----------

## nightfrost

I have all those things compiled in the kernel (in fact I'm using the same kernel .config for arch, which manages to the wireless just fine). I'm gonna try dhcp with debugging turned on. But I think the the problem arises somewhat earlier. It's that darned AP-address, it resets to 00:00:00:00...

I'll post back after the dhcp debugging. Thanks again, mate  :Smile: 

----------

## nightfrost

I feel so lost here. I tried dhcp with debugging. This is what I got:

```
dhcpcd: MAC address = 00:12:f0:0f:5b:15
```

But nothing else happened. I cancelled it, and reran it. Nothing happened. That's when I noticed that the AP address was intact and kwifimanager looked steady, so reran it again, and - voila! - ip retrieval. I wonder how long it will work; and I still wonder what made it work this time...

----------

## Sloden

Great! A nice start. It should be mentioned that I never use the command dhcpcd to get my connection going. 

Adding iface_eth1="dhcp" to /etc/conf.d/net does it for me. Anyway; Great!  :Smile:  Keep me posted!

----------

## nightfrost

 :Sad:  ...lost it again. I felt brave so brought eth1 down, in order to see if I could bring it up again. I couldn't. I'm back to square one again. I even tried to re-emerge ipw2200 again, but that's not helping (and for the record, my CFLAGS are sane). This is so strange. I'm dual booting with archlinux now, where it still works fine (at least I'm happy I'm not dualbooting with win  :Smile: )...

I don't know if it's time for me to give up now, or if there's anything else I could do...

----------

## Sloden

Don't give up. I wouldn't sacrifice my gentoo for the world.  :Smile: 

----------

## nightfrost

Hey, thanks. You're probably right. I'm gonna keep on looking for a solution  :Smile:  ...but I'm kind of in the dark now- I have no clue of where to continue...

----------

## Sloden

I get all worked up about these things.  :Smile: 

* What's your exact output when doing a  /etc/init.d/net.eth1 (re)start? This is the only command you should have to give. 

* What does:  cat /var/lib/dhcpc/dhcpcd-eth1.info  yield of information?

* Is everything set as i described earlier?

* Did you try removing modules="iwconfig" from your /etc/conf.d/net and does it contain iface_eth1="dhcp"?

I've probably repeated myself over and over again. I'm just perplexed by this.  :Smile: 

----------

## nightfrost

OK, here's an update: First of all, note that eth0 is my wireless (I'm loading the nic module after ipw2200). This is what I've done: /etc/conf.d/net only contains iface_eth0="dhcp". (I've also tried with module=( "iwconfig"), as well as ifconfig_eth0=( "dhcp" ), but here I'm following your suggestions). iwconfig, gives me access point address, and everything looks just fine. I start kde, and take alook at kwifi manager, which is showing good signal.

/etc/init.d/net.eth0 start gives

```
 * Starting eth0

 *    Configuring wireless network for eth0

 *       eth0 connected to "Amani" at 00:11:50:4D:D1:04

 *       in managed mode (WEP disabled)

 *    Bringing up eth0

 *       dhcp

 *          Running dhcpcd ...                                                                             [ !! ]

```

and immediately after the command (i.e. before dhcpcd gives up), the access point address disappears and signal strenght returns to nothing.

And here's the output of "cat /var/lib/dhcpc/dhcpcd-eth0.info"

```
IPADDR=192.168.2.2

NETMASK=255.255.255.0

NETWORK=192.168.2.0

BROADCAST=192.168.2.255

GATEWAY=192.168.2.1

DOMAIN='Belkin'

DNS=192.168.2.1

DHCPSID=192.168.2.1

DHCPGIADDR=0.0.0.0

DHCPSIADDR=0.0.0.0

DHCPCHADDR=00:12:F0:0F:5B:15

DHCPSHADDR=00:11:50:4D:D1:03

DHCPSNAME=''

LEASETIME=4294967295

RENEWALTIME=2147483647

REBINDTIME=3758096383

INTERFACE='eth0'

CLASSID='Linux 2.6.11-gentoo-r8 i686'

CLIENTID=00:12:F0:0F:5B:15

```

This round, I've been following your suggestions exactly. I have no clue of what the stuff in dhcpcd-eth0.info mean. Does it help?

----------

## Sloden

I've simply compared our eth1.infos.  :Smile:  I didn't have the domain="belkin" in mine. Do you know where this comes from?

Do you sett options for your connection any other places? Where do you specify Amani? If you respecified it running iwconfig eth0 essid Amani?

----------

## nightfrost

I just compared the dhcp.info to that of archlinux, and there's absolutely no difference. This is just an open access point so I haven't defined anything anywhere, I just turn on the wlan-switch on my laptop, execute iwconfig, and it's all there  :Smile: 

As far as I know, I don't have anything set anywhere else. Is there anywhere I should look? I only know of /etc/conf.d/net, basically.

----------

## s0lar

I have the same card in my laptop, haven't ben able to get it to work, used arch linux too, how did you make it work in Arch Linux nightfrost? 

Thanks for the short howto steps, will try from a fresh gentoo install.

----------

## nightfrost

I'm sorry I haven't been around for a while. I'm out of town - and sort of out of civilization for while (on the countryside) - I'll start working on these things again as soon as I can.

What I did to get it working under arch was actually absolutely nothing. I just installed the ipw2200 package and modprobed it. That's it.

----------

