2

i'm having problems connecting over wireless. At the moment, I'm using wicd. It seems to get stuck on "Verifying AP association...". Without wicd I can get the connection up and ping the Net - but if I take eth0 down (ifconfig eth0 down), my wireless goes away too (same result if I unplug the wire instead). wicd is the only way I can bring eth0 back (which is the main reason I'm using it) - ifconfig eth0 and/or ifup eth0 do not re-enable the connection (I just discovered it leaves out the gateway. Adding the gateway back in re-enables the connection including wifi; I didn't want to delete the info about wicd above in case it gives someone an idea.)

Doing it manually, despite the errors (which it would be nice to also resolve) - allows me to ping the outside world:

ifup wlan0

ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ssh stop/waiting
ssh start/running, process 17336

ping -I wlan0 -c 4 8.8.8.8

PING 8.8.8.8 (8.8.8.8) from 192.168.0.12 wlan0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=43 time=48.8 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=43 time=47.9 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=43 time=48.7 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=43 time=53.2 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 47.975/49.711/53.235/2.063 ms

# iwconfig

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"TPLINK"  
      Mode:Managed  Frequency:2.427 GHz  Access Point: 64:66:xx:xx:xx:22   
      Bit Rate=108 Mb/s   Tx-Power=27 dBm   
      Retry  long limit:7   RTS thr:off   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality=70/70  Signal level=-39 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:3   Missed beacon:0
 bus info: pci@0000:03:00.0
   logical name: wlan0
   version: 01
   serial: f0:7d:68:c1:b4:13
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=ath9k driverversion=3.2.0-67-generic-pae firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
   resources: irq:17 memory:dfbf0000-dfbfffff

ip route

default via 192.168.0.1 dev eth0 
default via 192.168.0.1 dev wlan0  metric 100 
169.254.0.0/16 dev wlan0  scope link  metric 1000 
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.102 
192.168.0.0/24 dev wlan0  proto kernel  scope link  src 192.168.0.12

(For the record, I have no idea what the 169.254.0.0 address is doing there.)

uname -a

3.2.0-67-generic-pae #101-Ubuntu SMP Tue Jul 15 18:04:54 UTC 2014 i686 i686 i386 GNU/Linux

lshw -C network

  *-network               
   description: Ethernet interface
   product: NetXtreme BCM5751 Gigabit Ethernet PCI Express
   vendor: Broadcom Corporation
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: eth0
   version: 01
   serial: 00:11:11:59:fc:09
   size: 100Mbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.121 duplex=full firmware=5751-v3.23a ip=192.168.0.102 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
   resources: irq:16 memory:dfcf0000-dfcfffff
  *-network
   description: Wireless interface
   product: AR5418 Wireless Network Adapter [AR5008E 802.11(a)bgn] (PCI-Express)
   vendor: Qualcomm Atheros
   physical id: 0

/etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

source /etc/network/interfaces.eth0
source /etc/network/interfaces.wlan0

/etc/network/interfaces.eth0

#Main Interface
auto eth0
iface eth0 inet static
address 192.168.0.102
netmask 255.255.255.0
gateway 192.168.0.1

/etc/network/interfaces.wlan0

auto wlan0 
iface wlan0 inet static
address 192.168.0.12
gateway 192.168.0.1
dns-nameservers 192.168.0.1 8.8.8.8
netmask 255.255.255.0
wpa-driver wext
wpa-ssid TPLINK
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk dca1badb5fd4e9axxx4xxdaaxxfa91xx610bxx6a7d57ef67af9809dxx6af42e39

/etc/wpa_supplicant.conf

    ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="TPLINK"
    psk="my password"
    key_mgmt=WPA-PSK
    proto=RSN
    pairwise=CCMP
    group=CCMP
}

ifdown eth0

ifdown: interface eth0 not configured

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:11:xx:xx:xx:09  
          inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::211:11ff:fe59:fc09/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:213690 errors:0 dropped:0 overruns:0 frame:0
          TX packets:155266 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:220057808 (220.0 MB)  TX bytes:21137696 (21.1 MB)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:196412 errors:0 dropped:0 overruns:0 frame:0
          TX packets:196412 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:153270697 (153.2 MB)  TX bytes:153270697 (153.2 MB)

wlan0     Link encap:Ethernet  HWaddr f0:7d:xx:xx:xx:13  
          inet addr:192.168.0.12  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f27d:68ff:fec1:b413/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11335 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7287 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2563290 (2.5 MB)  TX bytes:855746 (855.7 KB)

ifconfig eth0 down

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:xx:xx:xx:xx:09  
          inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::211:11ff:fe59:fc09/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:192 (192.0 B)  TX bytes:94 (94.0 B)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:196418 errors:0 dropped:0 overruns:0 frame:0
          TX packets:196418 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:153270871 (153.2 MB)  TX bytes:153270871 (153.2 MB)

wlan0     Link encap:Ethernet  HWaddr f0:7d:xx:xx:xx:13  
          inet addr:192.168.0.12  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f27d:68ff:fec1:b413/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11359 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7293 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2565482 (2.5 MB)  TX bytes:856363 (856.3 KB)

ip route

default via 192.168.0.1 dev wlan0  metric 100 
169.254.0.0/16 dev wlan0  scope link  metric 1000 
192.168.0.0/24 dev wlan0  proto kernel  scope link  src 192.168.0.12 
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.102 

ping -I wlan0 -c 4 8.8.8.8

PING 8.8.8.8 (8.8.8.8) from 192.168.0.12 wlan0: 56(84) bytes of data.

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3024ms

ping -I eth0 -c 3 router

PING router (192.168.0.1) from 192.168.0.102 eth0: 56(84) bytes of data.

--- router ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2015ms

ping -I wlan0 -c 3 router

PING router (192.168.0.1) from 192.168.0.12 wlan0: 56(84) bytes of data.

--- router ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2014ms

Let me know if you need more info.

Thank you in advance.

# #

The results:

ifup wlan0
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
RTNETLINK answers: File exists
Failed to bring up wlan0.

So I killed wpa_supplicant (with SIGHUP) and reran ifup wlan0:

RTNETLINK answers: File exists
Failed to bring up wlan0.

syslog states: wpa_supplicant[13626]: Failed to initiate AP scan

wpa_supplicant[13626]: message repeated 409 times: [ Failed to initiate AP scan.]

ps -ef | grep wpa
root 13626 1 0 11:13 ? 00:00:00 /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -C /var/run/wpa_supplicant

iwconfig
lo no wireless extensions.

 wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Frequency:2.447 GHz Access Point: Not-Associated
Tx-Power=27 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

A further cycle of ifup ifdown wlan0 finally brings up wlan0 despite an error message denying it, but fails to add a default route for wlan0 and so the Net remains unpingable through that interface.

ip route
default via 192.168.0.1 dev eth0
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.102
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.12
1

First, the 169.254.x.y address is a dummy address that tells us the interface requested an address from the access point but was not given one.

I suggest you use either Wicd or manual methods (/etc/network/interfaces) but not both.

Second, your interfaces file has both eth0 and wlan0 starting automatically. I doubt that you want or need both. Assuming you use wireless the most, I'd comment out the 'auto eth0' line. If you wish to use ethernet, stop wireless and start ethernet:

sudo ifdown wlan0 && sudo ifup eth0

Next, the interfaces file expects that wpa-psk is going to be the WPA2 password in clear text. I suggest you clean up the wlan0 file like this:

auto wlan0 
iface wlan0 inet static
address 192.168.0.12
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1 8.8.8.8
wpa-ssid TPLINK
wpa-psk <your_key_in_clear_text>

Finally, you will also need to declare DNS nameservers in the eth0 file.

  • Thank you for the response. Good to know about the dummy address, I've never noticed that documented anywhere. I'm only using wicd because it was the only way to restore a working connection after taking eth0 down and bringing wlan0 up and back down. At least until I realized that "ifconfig eth0 up" was not restoring the gateway. I do in fact want both eth0 and wlan0, at least until the time that wireless is working flawlessly and I can remove the cable - but I'll comment it out of the file temporarily so that it can be eliminated as a potential source of this problem. (continued)... – user171154 Aug 22 '14 at 18:38
  • ... (continued) I'll put the clear text password back in for wpa-psk, but according to ubuntuforums.org/showthread.php?t=318539 (which is the best document I've found on the subject) it should not be in ASCII form, but in hex. Can you please provide a pointer to the documentation (or even the code) that supports your statement? As an access point is in fact obtained, I'm not sure a password is the issue. Oddly, it doesn't seem to matter which form the password is in, it seems to accept both formats. (continued...) – user171154 Aug 22 '14 at 18:39
  • I have trimmed the wlan0 file as you have suggested. Finally, in regard to the dns-nameservers, I've added it into the eth0 file at your suggestion, however DNS resolution for eth0 isn't the problem. I have added the results to the original question above. – user171154 Aug 22 '14 at 18:39
  • The example you refer to is quite old and takes what we now know is the long way to get to the same place. I can provide no documentation aside from dozens of cases I've worked on and four computers in my own home that use the abbreviated method perfectly. Here is a recent sample: ubuntuforums.org/showthread.php?t=2234144&highlight=wpa-psk – chili555 Aug 22 '14 at 19:11
1

A firmware upgrade of my TP-Link WR841N router resolved the problem. I upgraded to Firmware Version: 3.13.33 Build 130506 Rel.48660n for Hardware Version 8. I upgraded by going to the System Tools option in the TP-Link menu and selecting the "Firmware Upgrade" option.

Download address:

Link for the (Windows) instructions:

To anyone else with the same problem, note: I upgraded upon the advice of TP-Link support. I'd recommend speaking with them first if you have this problem (though I would suspect that if you do you'll end up doing the same thing anyway, but better safe than sorry.)

  • Done as requested. – user171154 Aug 24 '14 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.