-   Linux - Newbie (
-   -   Why can I see wireless networks but never connect, WPA/WEP or open? (

Dan.b 09-02-2009 07:42 PM

Why can I see wireless networks but never connect, WPA/WEP or open?
I am fairly new to linux, I getting to grips with the offline and I am starting to be converted. The major problem I have is that I cannot get it to connect to my wireless network. I am using Fedora and my wireless card is the Belkin Wireless G Desktop Network Card - F5D7000uk (version 3000uk).

I am able to see the network and pick up the essid automatically through networkmanager or iwlist scan.

I have tried to connect using Network manager;
- it picks up the information and I submit my WEP key and the icon top right shows two green dots with a blue flame(?) rotating between them for a few minutes before asking for my key again.

and using the terminal commands.


$ sudo iwconfig wlan0 mode managed
$ sudo iwconfig wlan0 essid "BTHomeHub3-12GT"
$ sudo iwconfig wlan0 key 563865428

then tried to test the connection using


$ sudo ping
ping: unknown host


sudo iwconfig wlan0
wlan0    IEEE 802.11bg  ESSID:"BTHomeHub3-12GT" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated 
          Tx-Power=20 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2352 B 
          Power Management: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

If anyone can give me any help it would be greatly appreciated!


jschiwal 09-02-2009 07:59 PM

Look at /sbin/ifconfig. If you have an IP address for the wireless interface, it isn't a wireless problem. You need to either use DHCP or configure the IP, default gateway and DNS addresses manually.

The DHCP client should update the /etc/resolv.conf file with your ISP's DNS address. It is also possible that your router masquerades as a DNS server but doesn't function properly as one. If that is the case, try manually adding two OpenDNS servers manually to the router's configuration.

Dan.b 09-02-2009 08:33 PM


Originally Posted by jschiwal (Post 3667489)
If you have an IP address for the wireless interface, it isn't a wireless problem.


$ ifconfig wlan0
wlan0    Link encap:Ethernet  HWaddr 00:11:50:14:E3:1C 
          inet6 addr: fe80::211:50ff:fe14:e31c/64 Scope:Link
          RX packets:65 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2782 (2.7 KiB)  TX bytes:3816 (3.7 KiB)

Does this mean it is a wireless problem? Thanks awefully for your help.

jschiwal 09-03-2009 11:43 PM

There are three parts to getting wireless networking working.

Firstly, you need the kernel driver for your device. Sometimes you need to cut out binary blobs or wrap a driver written for windows for some drivers. When this is successful, you can detect other APs.

Next you need to be able to "supplicate" with the router, joining the wireless network. This is where WEP or WPA come in. You can't communicate with the DHCP server before you join the network. For this to be successful, wpa_supplicant needs to be configured. This might be done manually, by ifup scripts or on the fly by a network manager.

Lastly you need to configure your network. Often this means that the DHCP server supplies you with an IP address, default gateway address and name server address.

Not having an IP address, could be a failure in supplicating or in not configuring your device to use DHCP yet not configuring it manually.

Here is a command to see if the wpa_supplicant process is running:
ps -e | grep wpa_supplicant

This command will print out the command line used to launch it:
ps -fp $(pidof wpa_supplicant) | cat

If you don't have the pidof command, use the result of the first command as in "ps -fp 112354"

root 2844 1 0 15:25 ? 00:00:00 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log

My result shows that wpa_supplicant is running, the config file used, and where the results are being logged. I could run:
sudo tail -f /var/log/wpa_supplicant.log
and then try joining a network to monitor if wpa supplication is successful. Another program "wpa_cli" can be used at times, but not if you use networkmanager. You could also run "sudo tail -f /var/log/messages" to monitor kernel messages. wpa_supplicant and your network manager may log kernel messages as well.

All times are GMT -5. The time now is 10:12 AM.