# [Solved] Madwifi DHCP Stopped Working After Package Update

## solamour

I've been using D-Link DWL-G650 with Madwifi, but it stopped working after I updated packages recently, which (I think) included a newer version of Madwifi. Specifically, when I do "/etc/init.d/net.ath0 start", it just sits there when it tries to get the IP address from the DHCP server until it times out. Here are the symptoms.

* When I scan the available AP using "wlanconfig ath0 list scan", my AP shows up in the list.

* When I boot to Win2K, the wireless card works fine, including getting the IP from the DHCP server.

* If I use a static IP, I can't ping to any of the machines on the network.

I might need to provide some sort of log in order for you to figure out what the problem is, but frankly I'm not sure where the logging info goes. I'd appreicate any help.

__

solLast edited by solamour on Sun Mar 15, 2009 8:36 am; edited 1 time in total

----------

## JoeUser

I've got the exact same problem.   I have an old Linksys AP with MAC filtering enabled.  I can log in to the Linksys configuration system and view the active MAC table and see the laptop has been registered with the MAC table but it wont get an IP via DHCP and static IP wont let it communicate on the network either.

After some frustrations I decided to format the drive and put windows back on just to make sure the wireless actually worked which it did so then I went back to gentoo.  I spent quite a bit of time troubleshooting and then I figured the Linksys box must be buggy and I gave up on it with plans to get a new one because I can't get my Zaurus to connect to it anymore either. 

When I scan for available networks and find mine I noticed the bssid being discovered (or reported by the Linksys box over the wireless) was incorrect.  I compared the values I was getting back with the Linksys configuration and instead of getting the MAC for the Linksys wireless interface I was getting the MAC for the Linksys LAN interface over the wireless.  

What brand/model is the AP you're trying to connect to?  Maybe you've got the same problem one I have?  I believe mine is a Linksys BEFW11S4, I'm at work right now and can't confirm that.  It's old and only supports 802.11b and simple WEP so this problem was going to be my excuse to upgrade if i can prove the AP is actually the problem.  I'm not yet entirely convinced the AP is the problem because Windows still works with it.

----------

## solamour

The AP is NETGEAR WGR614, and I'm not sure it's the AP's problem, because 1) when I boot to Windows, it works fine, 2) my iPAQ works fine as well, and 3) another Windows box that uses D-Link DWL-G510 works fine as well. Only Gentoo + DWL-G650 is the problem. And I'm fairly sure it worked fine before I upgraded the world.

__

sol

----------

## solamour

I still haven't found a solution yet, but I noticed something odd when I start the network card.

```

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

 * Starting ath0

 *   Configuring wireless network for ath0

 *     ath0 connected to ESSID "ind" at 00:00:00:00:00:00

 *     in managed mode on channel 7 (WEP enabled - open)

 *   Bringing up ath0

 *     dhcp

 *       Running dhcpcd ...

Error, timed out waiting for a valid DHCP server response                 [ !! ]

```

ESSID is "ind" (which is correct), but for some reason, the MAC is "00:00:00:00:00:00". I'm not sure what value it was showing when it was working, but all zeros don't seem right. When I do the scan, it gives me the correct MAC of the AP.

```
sens ~ # wlanconfig ath0 list scan

SSID            BSSID              CHAN RATE  S:N   INT CAPS

ind             00:09:5b:cc:ec:4e   11   54M 62:0   100 EPSs

```

And here is what my "/etc/conf.d/wireless" looks like.

```
associate_order_ath0="forcepreferred"

key_ind="12345678901234567890123456 enc restricted"

preferred_aps_ath0=( "ind" )

sleep_scan_ath0="1"

```

Any suggestions?

__

sol

----------

## bluetea

Well, I hate to add a "me too", but me too   :Smile: 

I have the same symptoms and a virtually identical config. I am able to get ath0 up and running manually using the instructions at http://madwifi.org/wiki/UserDocs/FirstTimeHowTo with dhcpcd. The Gentoo init scripts don't work at all anymore though - I can never get a dhcp lease and it appears to be associating on the wrong channel. Has anyone submitted a bug report? I haven't found one.

----------

## solamour

It looks like I'm not the only one affected by this problem (that's a relief).

http://madwifi.org/ticket/698

Some folks were able to make it work, so you might want to give it a try.

Anyhow, I tried the previous version ("madwifi-ng-tools-0.0.1531.20060427" and "madwifi-ng-0.0.1531.20060427"), which gave me the correct MAC of AP, but dhcp still didn't work. Something must be broken while I was messing with it.

__

sol

----------

## braindead0

One more 'me two'.. I even tried setting a static IP/route/gateway and that fails as well.  I think it was with package version 0.8.4 that it worked fine.

----------

## solamour

I'm still out of luck, but I'm fairly positive that the new version of Madwifi doesn't like my router, because it works without a problem with Linksys WRT54G.

__

sol

----------

## Zodiak

Me too.  I can follow the directions to manually bring up ath0 and dhcpcd and everything works.  If I use the init scripts, everything I get all 00's for the MAC of the AP.  As far as the router specific bit goes, I have a WRT-54GL, and I have tried with DD-WRT and HyperWRT+Thibor (latest of both).  Neither one works.  I have also tried it in a netgear cheapo (not sure model) as well as a Cisco Aironet 1100.  I can get WEP and non-WEP AP's to work with iwconfig.  I know the card/driver is working.  The init scripts are what seems borked.  All of them have the same results.  If anybody makes some progress on this, I would love to hear about it.

----------

## solamour

Well, I got tired of fiddling around, so I went ahead and got Linksys WRT54GC, which worked right out of the box. Google gave me a $10 instant rebate. But I still want to keep the old AP, so if you happen to know a workaround, please share.

__

sol

----------

## homry

same problem here after an "emerge world" (upgraded ipw2200 drivers, dhcp client and baselayout). i got it work after playing with the way i wrote my key in /etc/conf.d/wireless. that is why i think this is a problem of the new baselayout. without WEP it worked, with my key written as usual ("s:abcdefghijk enc open") it did not work, with my key like this "abcd-efgh-ijk enc open" it suddenly worked. i was glad that my notebook was able again to use wlan, but now i have again this problem with my desktop pc with a d-link 510 (driver is rt61). without WEP it works, with WEP it does not work and this time none of the layouts work. i am really helpless right now and this seems to be a problem a lot of people have.

homry

----------

## homry

hello,

another thing which i noticed now and which may help to solve the problem is that when i do an 

```
iwconfig eth1
```

 on my notebook (which has working wlan) i get the correct WEP-key displayed. if i do the same on my desktop pc (no working wlan) i get after every shutdown of the device and every restart a different WEP-key displayed, which should not be so, or? something is screwing up the key which gets to the AP. that is the problem. has anyone any idea? i am desperate   :Sad:  .

homry

----------

## solamour

I believe it's no longer an issue in recent releases. I haven't had a problem for a while.

__

sol

----------

