1. Introduction

This document is part of the Wireless Troubleshooting Guide. Command listings contain examples of their usage and key points are highlighted. For more information on each command check the manual page for that command. Open a terminal and type: man <command>

Where a word appears inside <>, input a value to complete the command. Do not include the <> symbols in your command.

Example Where you see <ath0> you need to replace this with your device's logical name (could be ath0; wlan0; eth1; etc...)

2. Commands

2.1. lshw

This command lists detailed hardware information.


sudo lshw

  • (i) We can limit the the output to specific devices by adding options to the command. The following option "-businfo" lists information about any SCSI, IDE, IDE devices and their bus addresses along with the class of each device.


sudo lshw -businfo








82801CA/CAM AC'97 Audio Controller



82801CA/CAM AC'97 Modem Controller




AR5212 802.11abg NIC

  • (i) You can then use the "-C network" option to limit output so it only shows networking devices.


sudo lshw -C network


       description: Wireless interface
       product: AR5212 802.11abg NIC
       vendor: Atheros Communications, Inc.
       physical id: 1
       bus info: pci@03:00.0
       logical name: ath0
       version: 01
       serial: 00:11:95:50:be:62
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath_pci driverversion= (EXPERIMENTAL) ip= multicast=yes wireless=IEEE 802.11g
       resources: iomemory:10800000-1080ffff irq:11

2.1.1. Key Points

  1. The configuration line will tell you if there is a driver loaded for your device, except devices using orinoco drivers.


    If you do not see a driver listed here, then there is not one loaded and assigned to the device, and it will not show up in iwconfig output or the nework-admin gui.

  2. The businfo option can show if devices are recognized and memory is readable but the device is not physically on the bus. This is rare but it has been seen. It may seem cryptic but your output will vary greatly and there needs to be some characters (other then 0) here denoting its place in the pci bus.
  3. The logical name (see example above) is assigned if the driver has been recognised. If there is none, the problem is either the card or the driver. Also, wmaster0 is a generic driver used by the kernel, and if this is the logical name assigned there is usually a problem with the driver also.

TODO: What does it mean when it shows *-network UNCLAIMED, and no configuration line is present?

2.2. lspci

This command lists information about devices on the pci bus. Adding the -v option results in more detailed output:


lspci -v

Info (!) You can limit the output by piping the output with grep


lspci -v | grep Ethernet


0000:03:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
        '''Subsystem: D-Link System Inc D-link DWL-G650 (Rev B5)''' Wireless cardbus adapter
        Flags: bus master, medium devsel, latency 168, IRQ 11
        Memory at 10800000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2

Adding the -n option to lspci makes the output include the numerical PCI vendor and device ID's.


sudo lspci -n


0000:03:00.0 0200: '''168c:0013''' (rev 01)

2.2.1. Key Points

  1. This command shows the revision of the card (in above example the revision of the card is B5 not 01).
  2. Using the -n option you can find the PCI ID (168C:0013) of the card and find the correct driver to use with ndiswrapper. ndiswrapper list.

2.3. lsusb

This command lists information about devices on the USB bus.


sudo lsusb -v


$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 004 Device 002: ID 2001:3700 D-Link Corp. [hex] DWL-122 802.11b
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000

2.4. lsmod

This command lists kernel modules that are loaded and running.


sudo lsmod

Info (!) When the command lshw was run, you saw the name of the driver allocated to the device. See example above. You can pipe this command through grep to limit the output.


lsmod | grep ath


ath_pci                78908  0
ath_rate_sample        16776  1 ath_pci
wlan                  141532  4 wlan_wep,ath_pci,ath_rate_sample
ath_hal               148432  3 ath_pci,ath_rate_sample

2.5. modprobe

modprobe runs or stops a module from running. Most wireless drivers in Ubuntu 5.10 (Breezy Badger) are in a module form. The following commands remove or add a module.

(i) When a recognized device loads, the kernel automatically loads the correct module for the device. This command is only needed to manually run a module

  • To start a module run this command:


    sudo modprobe <module>

  • To stop and remove a module run this command:


    sudo modprobe -r <module>

2.6. rfkill list

This command prints information detailing whether there are software or hardware blocks on your rf devices. To get a list of devices and their hardware and software status, try


rfkill list

2.7. iwconfig

This command prints information about a wireless interface and allows you to configure the network interface from the command line.


sudo iwconfig


* eth0      no wireless extensions.

* ath0      IEEE 802.11g  ESSID:"XXXXX"
          Mode- Managed  '''Frequency- 2.437 GHz'''  '''Access Point- 00:17:16:1D:FC:DE'''
          Bit Rate-36 Mb/s   Tx-Power-18 dBm   Sensitivity=0/3
          Retry- off   RTS thr:off   Fragment thr- off
          Encryption key:xxxx-xxxx-xx   Security mode:restricted
          Power Management off
          Link Quality=50/94  Signal level=-45 dBm  Noise level=-95 dBm
          Rx invalid nwid:10911  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

2.7.1. Key Points

  1. This example shows the interface of ath0. If you do not see anything like this sample then you do not have a working driver.
  2. The interface may not be named "ath0". It could say "wlan1". You may need to use the correct interface name to configure WICD or other wireless manager.
  3. Access Point: If you see all zeros here or nothing then you are not connected/associated to your router. When you are connected it will show the mac address of the router here.
  4. Frequency more commonly known as channel. If you can not connect to your router ensure frequency is correct.

(i) You can not set the channel(currently with breezy or earlier) via the network gui. Most drivers are set up as auto so it changes to the corresponding channel of the ap you're trying to connect to. But if you must make the change then this is the command to change it.


sudo iwconfig <ath0> channel <X>

  • or


sudo iwconfig <ath0> freq <x.xxxG>

  • Channel/Frequency Chart

    Ch 1


    Ch 2


    Ch 3


    Ch 4


    Ch 5


    Ch 6


    Ch 7


    Ch 8


    Ch 9


    Ch 10


    Ch 11


    Ch 12


    Non US Channels

    Ch 13


    Ch 14


2.8. ip

This command is similar to iwconfig with the following differences.

  1. It is a more general networking command. It works with any interface whether wireless or wired.
  2. Its configuration options and output show different networking references or set different settings.


ip addr


2: ath0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:11:95:50:be:62 brd ff:ff:ff:ff:ff:ff
    inet scope global ath0
    inet6 fe80::211:95ff:fe50:be62/64 scope link 
       valid_lft forever preferred_lft forever

2.8.1. Key Points

  1. The benefit with iproute2 on a wireless device is it shows if you have an IP address assigned to the device which is noted next to inet addr. iwconfig may show you're connected to your router but you still have no internet connection without an IP address assigned to the device.

2.9. iwlist

This command will give you more detailed information from the wireless interface such as a scan of all available routers with in range.


sudo iwlist <ath0> scan


ath0      Scan completed :
          Cell 01 - Address: 00:13:46:1D:BC;0E
                    Mode: Master
                    Frequency: 2.437 GHz (Channel 6)
                    Quality=49/94  Signal level=-46 dBm  Noise level=-95 dBm
                    Encryption key:on
                    Bit Rate:1 Mb/s
                    Bit Rate:2 Mb/s
                    Bit Rate:5 Mb/s
                    Bit Rate:6 Mb/s
                    Bit Rate:9 Mb/s
                    Bit Rate;11 Mb/s
                    Bit Rate;12 Mb/s
                    Bit Rate;18 Mb/s
                    Bit Rate;24 Mb/s
                    Bit Rate;36 Mb/s
                    Bit Rate;48 Mb/s
                    Bit Rate;54 Mb/s
                    Extra bcn_int=100

2.9.1. Key Points

  1. If you get a completed scan like the example above, your device and driver are probably working properly.
  2. Some devices, such as orinoco cards, do not support scanning so this command may not work for you.

2.10. dhclient

dhclient deals with DHCP if your router is running as a DHCP server.


sudo dhclient <ath0>

(i) If you are associated with your router try running this command to get IP and other information to set up connection.

2.11. ping

ping is a good troubleshooting command to track down where the connection problem may be. Ping works like SONAR by sending an echo request to a server, waiting for it to respond and recording the time taken for the response to arrive.

  1. ping your local loopback device. The -c 4 option means that 4 echo requests will be sent. is the IP address for the local loopback device; a special address that is actually your own computer. This is identical to pinging yourself.


    ping -c 4

    (i) If this doesn't work then there is a problem in the TCP/IP stack somewhere.

  2. If your device is assigned an IP address, ping that. (i) use iproute2 to find the IP address assigned to the device


    ping -c 4 <>

  3. ping your router


    ping -c 4 <>

  4. ping an external site using its IP address


    ping -c 4

  5. ping an external website using its common name.


    ping -c 4 www.google.com

(i) If you can ping an external site with its IP address but not the common name then there is a DNS nameserver problem.

3. Manual Pages

CategoryWireless CategoryNetworking

WifiDocs/WirelessTroubleShootingGuide/Commands (last edited 2013-12-14 00:20:22 by knome)