Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Your situation

  • You have successfully installed Ubuntu.
  • You have just downloaded and booted Ubuntu live media.

    The latest LTS (see also HWE) or latest non-LTS release are preferred. See the list of Ubuntu releases that are currently supported.)

  • You upgraded your Ubuntu installation to the latest release that the software updater offered you. WiFi worked before, but not now on the new release.

  • You migrated your existing Ubuntu installation to new hardware.

Your problem

  • The wireless of your laptop or dekstop is not working. You tried switching the wireless switch off and on and you tried rebooting several times, but you don't see any WiFi access points.
  • You can see your wireless access point, but you cannot establish a connection.
  • You want to analyze the problem, but you don't know where to start or what information you can provide.

This question and answer was written to give people the wireless script that will provide the information needed in most cases to diagnose their wireless issue's.

Related questions

share|improve this question
    
What is the output of sudo rfkill list? –  Avinash Raj Feb 23 at 17:37
    
Before you run an arbitrary command, especially w/sudo make sure you know what it does. So try man rfkill first! –  Amanda Feb 23 at 17:43
    
Read OP's profile. I suspect OP will be providing a comprehensive answer. –  DK Bose Feb 23 at 18:06
1  
I take all the blame. I suggested that he should post this as a question so that we can have a canonical question about WiFi connection issues. I wasn't able to find the post by @fossfreedom by searching for wireless and through the wireless tag, and I doubt that other users would. So this started badly, can I still fix this? The link to the "Wireless Troubleshooting Guide" would be also more discoverable here in a seperate question. I would say this question would benefit the site and I want to do my part. Please? ◕д◕ –  LiveWireBT Feb 23 at 20:12
2  
Here is what we probably want to do: Close this as a duplicate of that hardware problems question. Here's the thing though - duplicates are signposts, so others will be able to find it. Duplicates create google juice, and improve the internets! –  jrg Feb 23 at 21:19
show 2 more comments

3 Answers 3

up vote 12 down vote accepted

Wireless Script

The easiest and most complete method of gathering information to help diagnose wireless issues is to run this script we created in the Ubuntu forums to collect all most common information needed while removing all sensitive data.

Open a terminal with ctrl+alt+t) and run the following command in the terminal:

wget -N -t 5 -T 10 http://dl.dropbox.com/u/57264241/wireless_script && \
chmod +x wireless_script && \
./wireless_script

It will download a script and create a file named wireless-info.txt or wireless-info.tar.gz in your home folder with wireless information so we can see the condition of your wireless at the time. The MAC address, WPA key and WEP key are removed for your security. Paste contents of the wireless-info.txt or wireless-info.tar.gz file at http://pastebin.ubuntu.com or alternatively http://pastebin.com/ then post the link here in your question.

If you have no Internet connection on the computer you are trying to troubleshoot, then follow the "No Internet - GUI Method" instructions from the post by varunendra in the Ubuntu forums.


Here is an example of the information that the script will collect:

*************** info trace ***************

***** uname -a *****

Linux larrys 3.8.0-030800rc7-generic #201302081635 SMP Fri Feb 8 21:36:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

***** lsb_release *****

Distributor ID: Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:    12.04
Codename:   precise

***** lspci *****

02:00.0 Ethernet controller [0200]: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe [14e4:16b5] (rev 10)
Subsystem: Acer Incorporated [ALI] Device [1025:0647] Kernel driver in use: tg3

03:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)
Subsystem: Lite-On Communications Inc Device [11ad:6617]
Kernel driver in use: ath9k

***** lsusb *****

Bus 001 Device 002: ID 8087:0024 Intel Corp.
Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. 
Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation   2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1bcf:2c18 Sunplus Innovation Technology Inc. 

***** PCMCIA Card Info *****


***** iwconfig *****

wlan0     IEEE 802.11bgn  ESSID:"suddenlink.net-4EE7"  
      Mode:Managed  Frequency:2.437 GHz  Access Point: <MAC address removed>   
      Bit Rate=52 Mb/s   Tx-Power=16 dBm   
      Retry  long limit:7   RTS thr:off   Fragment thr:off
      Power Management:off
      Link Quality=68/70  Signal level=-42 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:2  Invalid misc:67   Missed beacon:0


***** rfkill *****

0: acer-wireless: Wireless LAN
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

***** iw reg get *****

country 00:
(2402 - 2472 @ 40), (3, 20)
(2457 - 2482 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS
(2474 - 2494 @ 20), (3, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
(5170 - 5250 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
(5735 - 5835 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS

***** route -n *****

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
192.168.0.0     0.0.0.0         255.255.255.0   U     2      0        0 wlan0

***** lsmod *****

ath9k                 151840  0 
mac80211              626881  1 ath9k
ath9k_common           14053  1 ath9k
ath9k_hw              422337  2 ath9k,ath9k_common
ath                    24123  3  ath9k,ath9k_common,ath9k_hw
cfg80211              525244  3 ath9k,mac80211,ath

***** nm-tool *****

NetworkManager Tool

State: connected (global)

Device: wlan0  [suddenlink.net-4EE7] ----------------------------------
Type:              802.11 WiFi
Driver:            ath9k
State:             connected
Default:           yes
HW Address:        <MAC address removed>

Capabilities:
Speed:           52 Mb/s

Wireless Properties
WEP Encryption:  yes
WPA Encryption:  yes
WPA2 Encryption: yes

Wireless Access Points (* = current AP)
*suddenlink.net-4EE7: Infra, <MAC address removed>, Freq 2437 MHz, Rate 54 Mb/s, Strength 75 WPA WPA2

IPv4 Settings:
Address:         192.168.0.19
Prefix:          24 (255.255.255.0)
Gateway:         192.168.0.1
DNS:             8.8.8.8

***** NetworkManager.state *****

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true

***** NetworkManager.conf *****


[main]
plugins=ifupdown,keyfile
dns=dnsmasq

no-auto-default=<MAC address removed>,

[ifupdown]
managed=false

***** interfaces *****

auto lo
iface lo inet loopback


***** iwlist *****

wlan0     Scan completed :
      Cell 01 - Address: <MAC address removed>
                Channel:6
                Frequency:2.437 GHz (Channel 6)
                Quality=70/70  Signal level=-37 dBm  
                Encryption key:on
                ESSID:"suddenlink.net-4EE7"
                Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                          24 Mb/s; 36 Mb/s; 54 Mb/s
                Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                Mode:Master
                Extra:tsf=0000002a5a8c7789
                Extra: Last beacon: 24ms ago
                IE: Unknown: 001373756464656E6C696E6B2E6E65742D34454537
                IE: Unknown: 010882848B962430486C
                IE: Unknown: 030106
                IE: Unknown: 2A0104
                IE: Unknown: 2F0104
                IE: IEEE 802.11i/WPA2 Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (2) : CCMP TKIP
                    Authentication Suites (1) : PSK
                IE: Unknown: 32040C121860
                IE: Unknown: 2D1AFC181BFFFF000000000000000000000000000000000000000000
                IE: Unknown: 3D1606081500000000000000000000000000000000000000
                IE: Unknown: DD7A0050F204104A0001101044000102103B0001031047001080F6E625B04C347ABE8EC912179A05631021000541525249531023000541525249531024000631323334353610420007303030303030311054000800060050F20400011011000741525249534150100800022008103C0001011049000600372A000120
                IE: Unknown: DD090010180207F02C0000
                IE: WPA Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (2) : CCMP TKIP
                    Authentication Suites (1) : PSK
                IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00

***** resolv.conf *****

nameserver 127.0.0.1
search 8.8.4.4

***** blacklist *****
[/etc/modprobe.d/blacklist-ath_pci.conf]
blacklist ath_pci

[/etc/modprobe.d/blacklist.conf]
blacklist evbug
blacklist usbmouse
blacklist usbkbd
blacklist eepro100
blacklist de4x5
blacklist eth1394
blacklist snd_intel8x0m
blacklist snd_aw2
blacklist i2c_i801
blacklist prism54
blacklist bcm43xx
blacklist garmin_gps
blacklist asus_acpi
blacklist snd_pcsp
blacklist pcspkr
blacklist amd76x_edac

***** modinfo *****

filename:       /lib/modules/3.8.0-030800rc7-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko
license:        Dual BSD/GPL
description:    Support for Atheros 802.11n wireless LAN cards.
author:         Atheros Communications
srcversion:     4F3666E007A341BC945A998
alias:          platform:qca955x_wmac
alias:          platform:ar934x_wmac
alias:          platform:ar933x_wmac
alias:          platform:ath9k
alias:          pci:v0000168Cd00000036sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000037sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000034sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000033sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000032sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000030sv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Esv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Dsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Csv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Bsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Asv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000029sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000027sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000024sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000023sv*sd*bc*sc*i*
depends:        ath9k_hw,ath9k_common,mac80211,ath,cfg80211
intree:         Y
vermagic:       3.8.0-030800rc7-generic SMP mod_unload modversions 
parm:           debug:Debugging mask (uint)
parm:           nohwcrypt:Disable hardware encryption (int)
parm:           blink:Enable LED blink on activity (int)
parm:           btcoex_enable:Enable wifi-BT coexistence (int)
parm:           enable_diversity:Enable Antenna diversity for AR9565 (int)

filename:       /lib/modules/3.8.0-030800rc7-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k_common.ko
license:        Dual BSD/GPL
description:    Shared library for Atheros wireless 802.11n LAN cards.
author:         Atheros Communications
srcversion:     4FDB7F71E41160F4E56627C
depends:        ath,ath9k_hw
intree:         Y
vermagic:       3.8.0-030800rc7-generic SMP mod_unload modversions 

filename:       /lib/modules/3.8.0-030800rc7-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
license:        Dual BSD/GPL
description:    Support for Atheros 802.11n wireless LAN cards.
author:         Atheros Communications
srcversion:     4751BF98C99D71B97F2E49D
depends:        ath
intree:         Y
vermagic:       3.8.0-030800rc7-generic SMP mod_unload modversions 

filename:       /lib/modules/3.8.0-030800rc7-generic/kernel/drivers/net/wireless/ath/ath.ko
license:        Dual BSD/GPL
description:    Shared library for Atheros wireless LAN cards.
author:         Atheros Communications
srcversion:     5627B8DA4AC105006A960BE
depends:        cfg80211
intree:         Y
vermagic:       3.8.0-030800rc7-generic SMP mod_unload modversions 

***** udev rules *****

# PCI device 0x14e4:/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC address removed>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x168c:/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0 (ath9k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC address removed>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# USB device 0x1410:0xb00b (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC address removed>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

***** dmesg *****

[   11.093901] ath: phy0: ASPM enabled: 0x43
[   11.093903] ath: EEPROM regdomain: 0x65
[   11.093903] ath: EEPROM indicates we should expect a direct regpair map
[   11.093905] ath: Country alpha2 being used: 00
[   11.093905] ath: Regpair used: 0x65
[   11.129051] ieee80211 phy0: Selected rate control algorithm 'ath9k_rate_control'
[   18.695226] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   21.488011] wlan0: authenticate with <MAC address removed>
[   21.496975] wlan0: send auth to <MAC address removed> (try 1/3)
[   21.501949] wlan0: authenticated
[   21.503193] wlan0: associate with <MAC address removed> (try 1/3)
[   21.508823] wlan0: RX AssocResp from <MAC address removed> (capab=0x411 status=0 aid=7)
[   21.508884] wlan0: associated
[   21.508894] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

****************** done ******************
share|improve this answer
add comment

I would want everything in this script:

wget -N -t 5 -T 10 http://dl.dropbox.com/u/57264241/wireless_script && chmod +x wireless_script && ./wireless_script 

It gathers all the information that I would like to see and, in most cases, correct any wireless problem.

share|improve this answer
    
@LiveWireBT Wonder who those friends are that helped him with the script... –  chili555 Feb 23 at 21:59
    
Ok I think I got it. My bad. :) –  LiveWireBT Feb 23 at 22:09
    
Looks nice and useful; however, I'd be somewhat reluctant to run a script off an URL - could you possibly mirror the content inside the answer? –  Piskvor Feb 24 at 16:05
    
You can certainly download it without running it and look at the code in gedit: wget -N -t 5 -T 10 dl.dropbox.com/u/57264241/wireless_script –  chili555 Feb 24 at 16:26
add comment

What information do we need? This:

  • What have you tried? What happened when you tried it?
  • What do you mean by "doesn't work"? The indicator applet appears to show connectivity but you can't reach any web pages? The indicator applet is frozen? Not present? You can select a connection from the indicator applet but the password for that connection doesn't work?
  • What is the make of your machine and which version of Ubuntu are you running?
  • Has it ever worked? (ie, Did it work for a while and stop working? Did it work under Windows but not under Ubuntu? Did it work under 12.04 but not 13.10?)

The Ubuntu Wireless Troubleshooting Guide appears to be current, so that might be a place to start. Some useful commands there:

If your wireless has worked on this install before, and you want to troubleshoot a connection:

  • nm-tool will give you a report on the state of your network manager and any attached devices.
  • rfkill will enable or disable network devices. rfkill --list will list any available devices and provide some clues to their state. You may need to run this as root.
  • ifdown and ifup will bring network interfaces up and down. If you've changed settings, stopping and starting (as root) with ifdown wlan0 and ifup wlan0 may help.
  • Not sure what your network interfaces are even called? Try ifconfig -a

If you aren't sure you even have drivers installed, find out with lshw if your wireless card is built in, or lspci (for PCI cards -- less likely these days) or lsusb (for a USB wireless device). lshw -C network will display details of hardware in the "network" class, which is what you want. Again, you may need to run this as root.

share|improve this answer
    
Good questions, link looks promising and up to date. –  LiveWireBT Feb 23 at 20:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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