Ubuntu – How to debug the wireless problem


How can I get started with debugging my wireless problem?

  • How can I tell whether or not Linux has recognized my wireless hardware at all?
  • What are the main programs/daemons associated with wireless connectivity?
  • Where are the log files for those programs?
  • Do those programs have debug modes that I can access?
  • How can I tell whether a bug is in a userspace program or in a driver?

Edit: This was originally a more complex question with other inquiries about wireless driver hacking and debugging. I have removed those bullet points and plan to create another question to cover them, possibly on Unix & Linux SE.

Best Answer

Behold the power of the terminal!

List PCI devices / wifi network relevant portion only

$ lspci -v | grep -iA 7 network
03:00.0 Network controller: Intel Corporation Centrino Wireless-N 1000 [Condor Peak]
    Subsystem: Intel Corporation Centrino Wireless-N 1000 BGN
    Flags: bus master, fast devsel, latency 0, IRQ 43
    Memory at f0500000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: <access denied>
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

Look for correctly loading modules

$ lsmod | grep <your module>

In this case, the module is iwlwifi.

Show kernel messages related to your module

$ dmesg | grep <your module>

List hardware config for your network

$ sudo lshw -c network

Show and/or configure network interface(s)

$ ifconfig

Show and/or configure wireless interface(s)

$ iwconfig

Scan your network

$ iwlist scan

Network-manager configuration

$ nm-tool

Show switches for your wifi device

$ rfkill list all

If you want more detailed info/debug options you can run man <command> for each of them.

If you have wireless problems, post the output of these commands and we'll help you. Not all of them are necessary, but the more info the better.

For log files, check out the /var/log/ directory. The dmesg, boot and xorg.0.log files are generally the most useful ones, at least in my experience. For wifi stuff dmesg will do.

Related Question