Wifi interface not working - larsjuetten/linux-hacks GitHub Wiki

Wifi not working

Check Wifi-devices

The output of command iwconfig should show something like:

$ iwconfig 
lo        no wireless extensions.

virbr0    no wireless extensions.

virbr0-nic  no wireless extensions.

eno1      no wireless extensions.

docker0   no wireless extensions.

wwp0s20u7c2i12  no wireless extensions.

wlp2s0    IEEE 802.11abgn  ESSID:"WLAN-F72408"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 7C:4F:B5:F7:24:AA   
          Bit Rate=144.4 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=61/70  Signal level=-49 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:27   Missed beacon:0

My wireless device is wlp2s0. If it e.g. shows no wireless extensions, there is probably something wrong!

If so, there are many useful commands to get it back running. First is lsusb, which lists all connected usb devices. You should see there your usb adapter.

Second is lspci, showing all devices connected to the PCI bus. In my case, for instance, I obtain (restricting the output to network devices only):

List network devices on PCI-bus

$ lspci -vnn | grep -i net
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I218-LM [8086:155a] (rev 04)
02:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08b1] (rev 73)

This shows the all-important code of the wifi card, [8086:08b1] in my case.

Then you search for this code in Wikidevi: the page it finds says that the driver for my wireless card is iwlwifi in my case. It is important to use the code in square parentheses above, because producers often have several versions of a wifi adapter with different chips, sometimes even from different manufacturers (!!!) requiring different drivers. Thus the only certain way to identify your driver does not involve the adapter's name, but its code.

Now that we know the driver's name we first check whether we have it,

Check if driver is loaded

  modinfo iwlwifi

If there is some output, we have it. Then we check that it really is suited to my card, as follows:

$ modinfo iwlwifi | grep 8086  | grep 08B1
alias:          pci:v00008086d000008B1sv*sd0000C420bc*sc*i*
alias:          pci:v00008086d000008B1sv*sd0000C02Abc*sc*i*
alias:          pci:v00008086d000008B1sv*sd0000C020bc*sc*i*
*
*
*

This shows that my driver has several lines (corresponding to several different versions of my wifi adapter) for my card's Vendor code V8086 and Device code d088E. Notice that in this case you must use capital letters, B in my case. So this driver is indeed suited to my adapter.

Then, we check whether it is correctly mounted:

  lshw -C network

The output is longish (it involves ethernet card, 3G card, ...) but the relevant part is:

 *-network
   description: Wireless interface
   product: Centrino Advanced-N 6235
   vendor: Intel Corporation
   physical id: 0
   bus info: pci@0000:04:00.0
   logical name: wlan0
   version: 24
   serial: c8:f7:33:4c:cc:e1
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-27-generic firmware=18.168.6.1 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn
   resources: irq:47 memory:e2500000-e2501fff

Here you see that it says driver=iwlwifi and firmware=..... Thus the correct driver and firmware have been loaded into the kernel. Everything works fine, in my case.

If not, you may have to update the firmware of your device.

Updating the firmware

On the webiste Linux wireless, search for Intel 7260 or iwlwifi (in my case) to retrieve information for the device-driver combination. Depending on your kernel version (uname -r), download the appropriate firmware version. In my case this was iwlwifi-7260-ucode-16.242414.0.tgz. Unpack the file and follow the installation instructions in the README-file. On my machine the firmware microcode files where in /usr/lib/firmware. Hence I copied the firmware-file to this directory and rebooted my machine.

cp iwlwifi-7260-ucode-16.242414.0/iwlwifi-7260-16.ucode /usr/lib/firmware/
reboot

Check that interface is up and running

Lastly, we may check whether the adapter is up or down: from the previous output you see that my wifi card is given physical name 0 (corresponding to phy0) and logical name wlan0. I can search for its current status by means of:

$ ip link show dev wlp2s0 
4: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether f8:16:54:ad:fb:f6 brd ff:ff:ff:ff:ff:ff

which clearly states it is UP. If it didn't, this command

$ ip link set wlp2s0 up

would bring it up.

If all of this has been checked and is ok but your wifi still does not work, you can get useful info from the command:

  dmesg | grep wlp2s0

or wlan1 or whatever your wifi card is called.

You can go through the same steps, and see what is missing in your case.