PDA

View Full Version : Can't get IP with wireless on thinkpad (atheros)...



icantux
22nd March 2006, 06:56 AM
Hi,

I'm running gentoo, but decided to try out fedora core 5 as I've read much about great improvements... The installation went great, got everything running in no time and then came the wireless... Ah, yes - wireless..

I managed to install madwifi, as indicated on another post (from atrpms repo), then rebooted (to be sure), configured the network (using System -> Administration -> Network Configuration), saved and tried to activate the wireless.

..... no ip! No matter what I do, the thing won't get an IP!

I've got an IBM a/b/g AR5212 based card. Running " # iwlist ath0 scan " shows a number of ap's around me but it won't get an IP no matter what.

Here is the output of /etc/sysconfig/network-scripts/ifcfg-ath0


ONBOOT=no
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Wireless
HWADDR=00:05:4d:45:c3:d2
BOOTPROTO=dhcp
NETMASK=
DHCP_HOSTNAME=
IPADDR=
DOMAIN=
ESSID=
CHANNEL=1
MODE=Managed
# RATE=54M
DEVICE=ath0


result of # ifup ath0:


# ifup ath0

Determining IP information for ath0... failed.


I'm starting to think that the Atheros drivers are foobar-ed :mad:
Possible?

I'd appreciate any help from anyone here that has it working on their ThinkPad or other laptop.

Cheers

Deore
22nd March 2006, 12:10 PM
The Atheros drivers work very well. In your config file you need to specify network essid - the name of the network you wish to connect to (see that from the output of '# iwlist ath0 scan') Also if the network is encrypted, you will need to specify key. I would just issue:

# iwconfig ath0 essid *name-of-network* key *key-of-network*
# dhclient ath0

If that doesn't help, see if dhclient is running (ps ax |grep dhclient) and kill it if yes. Then try again.
Hope that helps!

icantux
22nd March 2006, 05:19 PM
Deore,

Thanks for your feedback. I've tried all the manual connection commands but my ath0 is still not picking up any IP at all.

Tried:
# iwconfig ath0 essid booger key xxxxxxx
- fine.

# ifconfig ath0 up
- fine ... lots of LED activity for my wifi

# dhclient ath0
- no problems ...

Try to access anything on the internet - no go! I don't have an IP!
then I try (to make sure):
# ifup ath0
Determining IP information for ath0... failed.

running
# ps ax |grep dhclient
1698 ? Ss 0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
3076 ? Ss 0:00 dhclient eth0
3206 pts/1 S+ 0:00 grep dhclient


.... blamo! Problem.
My eth0 gets an IP via dhcp but my wifi refuses to hear about it. Even if I disconnect the ethernet, I get the same result and still no ip for wifi. Try releasing dhclient (dhclient -r ) nothing changes.

icantux
22nd March 2006, 06:10 PM
Hmm... ok I tried something bold and thought about getting back to basics with the wireless - turn off all encryption to see if my wifi would get an IP that way.

Well, it did. I noticed that it took a while to get an IP but it got one and I'm writing this using the wifi connection. Now the whole issue is centered on encryption and the reasons why it won't get an IP when attempting to connect to a router with encryption turned on.

Could it be the amount of time it takes to secure an IP by DHCP with encryption on? The default seems to be ~25 second delay. Is there any way to lengthen that to say 1 minute (60 seconds)?

Also noticed that the signal from my wifi is very weak in FC5 compared with gentoo. Sitting in the same location (everything else being equal) I'm only pulling in 28/94 signal quality in Fedora but a nice 72/94 in gentoo. How do I tweak the power settings?

Ah... linux... tweaking tweaking tweaking..

Deore
23rd March 2006, 09:33 AM
Something similar happened to me with fc5. I even had static settings for my wired eth0 (but no wire in the card) and wanted to get dhcp address on my wifi. It got everything right, but ping to google or sth outta my network resulted in no path to host. Seemed like my eth0 settings repressed my dhcp ones for the wireless interface. I rmmod-ed the wifi driver, ifdown-ed eth0, modprobe-ed wifi driver again, set it up, got ip and it went straight on!
So try killing dhclient first, stopping your wired interface and then try to get ip for the wireless.
After you issue dhclient ath0 what does ifconfig say? Could you paste that?
Power usage and such chip settings are setup with specific commands - check out the madwifi wiki about them, it is very useful.
p.s. don't mix ifup and dhclient. I don't know why (maybe I did sth wrong) but when I created interface in "system-config-network" for the wireless with all correct settings (including key) it couldn't get me ip.

icantux
23rd March 2006, 06:22 PM
Hmm. That's an interesting train of thought.

Well I tried removing the ath_pci module, successfully, then shutting down eth0 and finally modprobing the wifi module. Everything worked out nicely, except I can't get the wifi radio to stay on now. It seems I can turn the radio on, but it shuts down almost immediately (10-15 seconds), thus by the time I issue the dhclient command, the radio is already off and will not broadcast anything. This is really strange.

It's as if my wifi is somehow dependent on eth0 in more ways than one. If I don't start eth0 at boot-up then I cannot control the power state of ath0! However, by the same token, if I do start eth0 at boot ath0 refuses to obtain an IP via dhcp when attempting to use encryption.

Damned if you do and damned if you don't.

Something's not done right. I'm surprised that somehow eth0 and ath0 are tied in together as opposed to having a common loopback instead!!! Is this a FC5 specialty? Is this tied in with how networkmanager controls wired/wireless connections? If so, that's not a very good solution IMO.

So, I'm stuck with using WEPless and WPAless wifi in FC5. :(

jpkeisala
23rd March 2006, 06:53 PM
I have been also trying to enable WEP for IBM/Lenovo ThinkPad Z60t (Atheros AR5006EX) but I am getting following error when trying to access to my router using WEP.

Error for wireless request "Set Bit Rate" (8B20) :
SET failed on device ath0 ; Invalid argument.
If I disable security mode in router I am able to connect.
I downloaded drivers from Livna reposity following MadWiFi (http://madwifi.org/wiki/UserDocs/Distro/RedHat) instructions

I also tried same with Ubuntu Dapper and I get same error. I think there is something wrong in madwifi drivers.

icantux
23rd March 2006, 07:01 PM
Ah see, that's interesting, because I have no such trouble with gentoo. I am able to connect to any WEP encrypted ap using madwifi-drivers and madwifi-tools version 0.1443.20060207 (both). But here in FC5, nothing doing. Like I said, though, non-encrypted doesn't pose a problem, but as soon as I introduce some form of encryption - BLAM! no IP via DHCP! Something's messed up.

That's why I'm led to believe it's not only a madwifi problem, but rather perhaps a combination of dhclient and madwifi.

Regardles, BTW, you may want to set the mode to "managed" but then edit your ath0 (?) config file manually and edit the line that starts with RATE to read " RATE=' 54Mb/s ' .. Save and close the config file and you'll rid yourself of that message.

Deore
23rd March 2006, 07:07 PM
How did you install madwifi? I have a Netgear WG511T external wireless card which has Atheros chip. A simple "yum install madwifi" did the hard part for me. Then I could just plug in the card and saw in dmesg output it was correctly recognized (the leds blinked as they should too). Even turbo mode (108mbps) works with the drivers.

icantux
23rd March 2006, 07:42 PM
I did the same... yum install madwifi (using atrpms repo).


Already uninstalled (reboot to make sure) and re-installed. Still the same thing.
My setup's a bit different. I've got an IBM Thinkpad T42 (2378-REU) with an IBMa/b/g (AR5212 based atheros) as a mini-pci.

volekvolek
23rd March 2006, 08:07 PM
Well, Here is what I did on my Toshiba, with NeatgearWG511T , Fedora 5, with the latest Kernel.

Note: During this install I was connected to net via my Wired eth0. So having another network interface access has no baring on you wireless install , it shouldn't , and it did not.

1. Download latest madwifi from madwifi.org (used svn to download lates from trunks)
2. install kernel sources using Yum
3. Did a make and make install on madwifi after compile,
4. read http://madwifi.org/wiki/UserDocs/Distro/RedHat
5. did teh following per instructions on the #4 web page .
ifconfig ath0 up
iwconfig ath0 mode managed
iwconfig ath0 nick "Netgear"
iwconfig ath0 channel 9
iwconfig ath0 key "hexvalue" (without 0x prefix)
iwconfig ath0 essid "your ssid"
dhclient

Lights started to blink , I removed my ethernet wired cable to test teh wireles connection, and sure enough it is working.

Now, I am trying to make changes permanent so at boot time, eveything will be set.

good luck

icantux
23rd March 2006, 08:35 PM
Note: During this install I was connected to net via my Wired eth0. So having another network interface access has no baring on you wireless install , it shouldn't , and it did not.

1. Download latest madwifi from madwifi.org (used svn to download lates from trunks)
2. install kernel sources using Yum
3. Did a make and make install on madwifi after compile,

Well, I installed FC5 the same way. Until I get my wifi up and running I only get to use my eth0. I'm just as perplexed with the behavior here as you may be. Even more so because I don't have a problem with it at all while using gentoo. Something's messed up, that's for sure, one thing I'm finding out is that my ath0 seems to follow eth0 around like a sick puppy.

I disable eth0 on boot and there's no way I can get ath0 running. If I enable eth0 but disable ath0 on boot, then I can start ath0 later on in a session, but I can't get WEP to work at all. Go figure. At this point, I'm all ears.

in fact I'm contemplating scrapping the madwifi rpm and go your way, but I'd need a refresher on svn download and installing kernel sources for Fedora ...

Cheers

cub
23rd March 2006, 09:51 PM
I'm not sure I should start a new thread or continue on this one, but I have some questions and trouble getting my Netgear WG511 to work. I have tried installing the madwifi from atrpms and so far it looks good. But then everyone in all threads manage to get the ath0 in some way and I just can't make it. Any pointers? (besides "read the page duh"..cause I've done that and obviously it didn't help).

icantux
23rd March 2006, 09:55 PM
I'm not sure I should start a new thread or continue on this one, but I have some questions and trouble getting my Netgear WG511 to work. I have tried installing the madwifi from atrpms and so far it looks good. But then everyone in all threads manage to get the ath0 in some way and I just can't make it. Any pointers? (besides "read the page duh"..cause I've done that and obviously it didn't help).

You might have to reboot for the changes to take effect after installing madwifi. Running iwconfig should then list the card as ath0. If that doesn't work, just make sure the "ath_pci" is listed in "# lsmod" and then start the card (ifconfig ath0 up). Then do # iwconfig again and it should be there.

cub
23rd March 2006, 09:58 PM
You might have to reboot for the changes to take effect after installing madwifi. Running iwconfig should then list the card as ath0. If that doesn't work, just make sure the "ath_pci" is listed in "# lsmod" and then start the card (ifconfig ath0 up). Then do # iwconfig again and it should be there.
I did reboot (I've tried installing madwifi twice) but iwconfig doesn't show ath0 and it's not in lsmod either.

icantux
23rd March 2006, 10:32 PM
I did reboot (I've tried installing madwifi twice) but iwconfig doesn't show ath0 and it's not in lsmod either.
As root, do # modprobe ath_pci <-- that's the module that loads up your wifi card.

Deore
23rd March 2006, 11:37 PM
cub, did you insert the card in the slot? Module should load automatically when you insert the card.

snoze
24th March 2006, 05:38 AM
Final deal with fedora.. follow the instructions
cleick fedora icon in menubar f
click on system, click network device control and set the network...

cub
24th March 2006, 08:20 AM
As root, do # modprobe ath_pci <-- that's the module that loads up your wifi card.
I have done that but nothing happens, I just get the prompt back. And no ath0 or ath_pci is found afterwards either.


cub, did you insert the card in the slot? Module should load automatically when you insert the card.
I have tried to install madwifi with the card in place, then I tried to insert it after installation, and even install-reboot-insert and still nothing happens. If I do "#dmesg" I can see it notice that a card is inserted, but doesn't specify what kind of card it is..and no LED light.

I'm beginning to suspect the combination WG511 and Compaq/HP nx9010 is not working. Am I doomed to go back to Windows to use my wlan? :(

jpkeisala
24th March 2006, 12:54 PM
Ah see, that's interesting, because I have no such trouble with gentoo. I am able to connect to any WEP encrypted ap using madwifi-drivers and madwifi-tools version 0.1443.20060207 (both). But here in FC5, nothing doing. Like I said, though, non-encrypted doesn't pose a problem, but as soon as I introduce some form of encryption - BLAM! no IP via DHCP! Something's messed up.

That's why I'm led to believe it's not only a madwifi problem, but rather perhaps a combination of dhclient and madwifi.

You are probably right. I have now tried everything I can think of, I also dowloaded latest drivers from madwifi trunk and compile it manually. I think I am going to give up and install Windows on other partition until this is solved by someone who knows more about this than me. :( There is no much since to use laptop without wireless.

Robgould
24th March 2006, 02:17 PM
I have an Atheros, and use madwifi in FC5....works fine. It was little hard to get working. The changed the configuration applet in Gnome. I do have WEP enabled using a hexidecimal key. To get it to work I had to chage the type from "atuo" to "managed". I am going off memory here as I am at work. As soon as I did that, it worked fine.

jpkeisala
24th March 2006, 04:23 PM
I have an Atheros, and use madwifi in FC5....works fine. It was little hard to get working. The changed the configuration applet in Gnome. I do have WEP enabled using a hexidecimal key. To get it to work I had to chage the type from "atuo" to "managed". I am going off memory here as I am at work. As soon as I did that, it worked fine.
I went to System -> Administration -> Network and in Wireless Settings -tab I change mode to Managed and I change Key to hex 0xXXXXXXXXXXXXXX
When I tried to active card I get

Determining IP information for ath0...PING 192.168.1.1 (192.168.1.1) from 192.168.1.102 ath0: 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3000ms
, pipe 3
failed.
How does your /etc/sysconfig/network-scripts/ifcfg-ath0 look like?

icantux
24th March 2006, 05:01 PM
Please read through patiently ...

Well, regardless. If the config file at /etc/sysconfig/network-scripts/ifcfg-ath0 shows default values, then any command-line attempt at hooking up (with WEP) should work, yet it doesn't. Look, as suggested elsewhere here, starting my wifi on boot and starting it with proscribed settings on boot is not an option for me.

There's a difference in using pre-determined data and supplying connect info on-demand. If I had a static AP with nothing around me for kilometres, then I wouldn't care. BUT, that's not the point of wifi in an urban environment - is it?

More so, there are two reasons why I prefer using the command line to hook up wirelessly. One is mobility and choice. What would be the point of specifying hex WEP encryption keys, or ap names in hard-coded format if the whole point of wireless is to be able to quickly hook up to any IP with different encryption settings in a varied environment?? That's why I use the command line and not some proscribed setting on boot.

The second reason why I don't want wifi or anything else that sucks power to start on boot is because I use a laptop. It's not always hooked up to a direct power current, so I can't afford having wifi blasting on full power right on start. That's just not right. Come on, this (wifi) isn't some landline here - it's intended to work as a tool that increases mobility. If I am at location "x" and use wifi there, I should be able to immediately switch over to another ap at location "y" - correct? WEP or not.

Well, I can hook up using wifi - but not with WEP - why not?? because dhcp refuses to give out an IP address because it times out <--- that's the issue.

Now, before I posted my original plea for help/explanation I wasn't going into this whole drama blinded with no knowledge. I did my homework, searched in these forums and elsewhere for pointers and hints based on other people's issues. I'm eager to find out what's causing this strange behaviour of my wifi card in my laptop on Fedora Core, not to just accept some default setting "because otherwise it won't work". That's a cop-out, and that's not right.

Some claim it (madwifi + encryption) works out of the box, others have this issue of DHCP not giving out an IP (like me). I'd like to find out why.

*** Therefore:

1) One of the questions I have (look previous posts here) is how I can change the default timeout that dhclient is set to get an IP. Right now, as it is, if I don't use WEP, then it takes approximately 20-25 seconds to get an IP from my router. (For some reason that happens nearly instantaneously in gentoo using "dhcpcd"). Why does it take so long to get an IP in Fedora?? If it's a setting somewhere, I'd like to find out what it is so I can fix it - and then by golly help those that are experiencing the same problem!

BTW, hasn't anyone else noted the time lag when using their regular lan while surfing the web? If you haven't clicked on any link for a while and then attempt to keep surfing there's a significant time delay before you're able to access the clicked link.... That's a DHCP problem and the reason I'm suspecting that dhclient isn't tweaked properly and that's having an effect on the wifi. If it takes dhclient longer to give out an IP than it should, then the result would be no IP given out particularly with when being filtered through an extra layer of protection/communication like WEP!


2) If there are numerous places to get madwifi drivers (livna, atrpms, source), which ones are better to use with fedora? ATrpms? Livna? Source? If there are significant differences between them that means that one of these repositories could possibly have a foobar-ed set of drivers that don't play well with the dhclient. Let's face it, continued development of any piece of software may contribute to the introduction of a bug ... moreover madwifi is known to be somewhat unstable lately.

Thanks ...

volekvolek
31st March 2006, 07:47 PM
HI Icantux:

I am on a Toshiba Satelite, Netgear WG511T wireless card, FC5 with kernel 2.6.16.1 and WEP is active. Wireless is working. I upgrded to this Kernel few days ago, with few restarts :) wireless started to work. I looked at the changes made to this kernel vs the one before it, and no changes made to DHCP code, so I am not sure if the problem some are seeing is actually a DHCP related problem.

You might want to use Ethereal to see what is actually being passed to your router.

Best of Luck