View previous topic :: View next topic |
Author |
Message |
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Mon Jan 29, 2007 4:16 pm Post subject: Unable to get IP address via Wireless [SOLVED] |
|
|
Hi guys. I'm staying in a motel right now that has a wireless router and an encryption key. I'm using wireless-tools (and iwconfig). I've been able to connect to the access point - I see signal strength, the mac address of the cell, bit rate, etc. However if I do a "dhcpcd wlan0" I get timeouts. If I set /etc/conf.d/net with a static IP, I can't ping/resolve past my own interface.
I'm not too hot with wireless so all help appreciated.
Thanks...
Phil.
PS - Using ~x86 and the laptop is up to date, using ndiswrapper which looks like it's working perfectly.
Last edited by phil_r on Tue Jan 30, 2007 11:24 pm; edited 1 time in total |
|
Back to top |
|
|
no_hope Guru
Joined: 23 Jun 2003 Posts: 482
|
Posted: Mon Jan 29, 2007 4:31 pm Post subject: |
|
|
are you sure you are using the correct key?
did you check dmesg and /var/log/messages for errors?
you could use tcpdump or wireshark to see if your interface actually sees any packets. |
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Mon Jan 29, 2007 4:35 pm Post subject: |
|
|
Yeah, I know it's the correct key... and I have no idea how to use tcpdump or wireshark. |
|
Back to top |
|
|
foxbat Tux's lil' helper
Joined: 19 Jul 2006 Posts: 77 Location: Washington, DC
|
Posted: Mon Jan 29, 2007 4:51 pm Post subject: |
|
|
are you receiving packets?
try configuring it manually:
Code: | iwconfig eth1 mode managed key XXXXXXX
iwconfig eth1 essid "MYESSID"
dhcpcd eth1 |
ping to test. _________________ Gentoo 2006.1 | AMD X2 |
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Mon Jan 29, 2007 4:53 pm Post subject: |
|
|
I tried that - I just get dhcp: time out, wlan0 (or soemthing like that, I'm at work right now) |
|
Back to top |
|
|
no_hope Guru
Joined: 23 Jun 2003 Posts: 482
|
Posted: Mon Jan 29, 2007 5:45 pm Post subject: |
|
|
ifconfig will tell you how many packets the interface sent and received by the kernel.
run cat /proc/net/wireless (hopefully ndiswrapper supports that, if not iwconfig should give something similar) and look at statistics for frames discarded before reaching the kernel.
Did you ever use this card with encryption before? A lot of people complain of encryption not working with ndiswrapper. |
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Mon Jan 29, 2007 11:49 pm Post subject: |
|
|
Well, trying something different - emerged wpa_supplicant and madwifi. dmesg is showing that wifi0 is being created with ar5212 chipset (confirmed by lspci). I can bring wlan0 up, use:-
iwconfig wlan0 essid abvi
iwconfig wlan0 key s:7705340303
iwconfig shows all the right info. dhcpcd wlan0 still doesn't work though...
Help!!!!!!!!! _________________ Just when you think you know the answers, I change the questions. |
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Mon Jan 29, 2007 11:56 pm Post subject: |
|
|
I just tried cat /proc/net/wireless and see this...
Discarded packets = nwid 1364, crypt 0, frag 0, retry 0, misc 0
Does that mean anything? _________________ Just when you think you know the answers, I change the questions. |
|
Back to top |
|
|
no_hope Guru
Joined: 23 Jun 2003 Posts: 482
|
Posted: Tue Jan 30, 2007 5:34 am Post subject: |
|
|
phil_r wrote: | I just tried cat /proc/net/wireless and see this...
Discarded packets = nwid 1364, crypt 0, frag 0, retry 0, misc 0
Does that mean anything? |
That means that the driver claims that it discarded 1364 packets that belonged to wireless networks to which it was not associated, 0 packets were dropped due to decryption error, 0 due to fragmentation and I am not 100% sure about the rest.
Basically, the driver sees packets, but either is able to successfully decrypt frames or doesn't see encrypted frames. If the key wasn't working correctly, it would show up here.
If you are using wpa_supplicant, I think you need to set the key through it, and not iwconfig. Try wpa_gui?
Also, to be thorough, after you load the madwifi driver check dmesg for errors.
I am pretty sure that your problems are on driver level, but if you can emerge program on the laptop, emerge tcpdump, and run tcpdump -i <interface_name> -n -s 0 -c 100 That will show first 100 packets the kernel will receive and/or try to send. While that is running, run dhcpcd and see if tcpdump will show any packets.
I once was in a hotel where I couldn't get a DHCP address from a specific AP. If several APs are available, you could try telling iwconfig to associate to a different one. |
|
Back to top |
|
|
Laitr Keiows Bodhisattva
Joined: 04 Jul 2005 Posts: 891 Location: Kobe, Japan
|
Posted: Tue Jan 30, 2007 8:23 pm Post subject: |
|
|
Try this: dhcpcd -N -m 2000 -S -t 0 -i '' -d wlan0
Please let us know if it helps. Post output if it does not. |
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Tue Jan 30, 2007 8:43 pm Post subject: |
|
|
Is that -N -m or -N -n ? Just reading the man page, doesn't show a -m option... _________________ Just when you think you know the answers, I change the questions. |
|
Back to top |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Tue Jan 30, 2007 10:00 pm Post subject: |
|
|
strange madwifi-ng for me creates an ath0 device; wlan0 sounds more like an ndiswrapper device. at any rate, if the card is atheros-based, it should work with either. When i connect to my WEP-encrypted network with an atheros card (don't use WPA) I do this:
iwconfig ath0 essid 311g
iwconfig enc key=s:12345
i use 40-bit encryption just to keep out the neighbors and designate it by a 5-letter string for a key. you could also use a hex key, and additionally, you can specify 128-bit encryption with a string or hex as well; see the manpage of iwconfig for details.
In what form were you provided the key? _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Tue Jan 30, 2007 10:55 pm Post subject: |
|
|
Laitr Keiows wrote: | Try this: dhcpcd -N -m 2000 -S -t 0 -i '' -d wlan0
Please let us know if it helps. Post output if it does not. |
-S is an invalid option, so without it...
Info, wlan0: dhcpcd 3.0.9 starting
Info, wlan0: ehternet address = 0:13:49:63:c7:c0
Info, wlan0: broadcasting for a lease
Debug, wlan0: sending DHCP_DISCOVER with xid 1120099434
Debug, wlan0: waiting on select for infinity
...and it waits, and waits, and waits...
Erik - the key was just given to me as a text string - it's the phone number for the motel.
I've removed ndiswrapper and rebooted, but it still shows as wlan0. I know what you mean, that is strange.
Phil. _________________ Just when you think you know the answers, I change the questions. |
|
Back to top |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Tue Jan 30, 2007 11:09 pm Post subject: |
|
|
the way I describe is for WEP keys. there is another way for WPA-supplicant but unfortunately i think it requires more software. _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
|
phil_r Apprentice
Joined: 14 Mar 2006 Posts: 265 Location: Omaha, NE, USA
|
Posted: Tue Jan 30, 2007 11:24 pm Post subject: |
|
|
FIXED!!!
Just for the hell of it, I tried connecting without the s: and just used the key - that fixed it
Excellent!!! Thanks for everyone's help.
Phil. _________________ Just when you think you know the answers, I change the questions. |
|
Back to top |
|
|
|