Qualcomm Atheros Device [168c:0042] (rev 30) Wi-Fi driver installation

70,805

Ubuntu 16.04 users should just need to

sudo apt-get update && sudo apt-get upgrade

and reboot.


You do not need Windows drivers and ndiswrapper.

This has been recently fixed upstream, follow these instructions to install the backported modules and needed firmware:

sudo apt-get install build-essential linux-headers-$(uname -r) git
echo "options ath10k_core skip_otp=y" | sudo tee /etc/modprobe.d/ath10k_core.conf
wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/backports-4.4.2-1.tar.gz
tar -zxvf backports-4.4.2-1.tar.gz
cd backport-4.4.2-1
make defconfig-wifi
make
sudo make install
git clone https://github.com/kvalo/ath10k-firmware.git
sudo cp -r ath10k-firmware/QCA9377 /lib/firmware/ath10k/
sudo cp /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin_WLAN.TF.1.0-00267-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin

And it should work after a reboot.

It will fail when a new kernel is installed through updates until the kernel is patched to support the wifi. When that happens you will need to:

cd backports-4.4.2-1
make clean
make defconfig-wifi
make
sudo make install

And reboot.

Share:
70,805

Related videos on Youtube

gunjit
Author by

gunjit

Updated on September 18, 2022

Comments

  • gunjit
    gunjit over 1 year

    I bought an Acer laptop and installed Ubuntu 14.04LTS but WiFi drivers are not available for it. So I am trying to install a windows driver using wifidocs/driver/ndiswrapper.

    On doing lspci -vvnn, it gives:

    Network controller [0280: Qualcomm Atheros Device [168c:0042] (rev 30)
    

    Then I also disabled the atheros drivers. Using lspci and lspci -n, I can say PCI id is 168c:0042. But Acer website has three atheros drivers. I could not figure out which one to download but downloaded one on a windows PC and pasted the zip file on my desktop then unzipped it from the terminal using unzip <filename>.zip. The page says you have to go to control panel system hardware and all that on the windows system. I did not do it. Windows computer not being mine, I am afraid I should not install any additional driver on it. After unzipping it has one .inx file and one .bin file but no .sys file. I don't know whether I am completely right till here or have I missed something? And if I am right then how to proceed from here? I also made a new directory and copied the unzipped .inx and .bin files in it. Then in that directory I ran the ndiswrapper -i <filename>.inf but it says ndiswrapper not installed and when I do sudo apt-get install ndiswrapper-common, I get the reply that ndiswrapper-common is already the latest version. What to do? here is my

    dmesg | grep ath10k result 
    [   7.882758] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0
    [    8.190016] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2
    [    8.334587] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/board-2.bin failed with error -2
    [   10.140677] ath10k_pci 0000:03:00.0: qca9377 hw1.0 (0x05020000, 0x003820ff sub 105b:e09a) fw WLAN.TF.1.0-00267-1 fwapi 5 bdapi 1 htt-ver 3.1 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 features ignore-otp
    [   10.140682] ath10k_pci 0000:03:00.0: debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
    Here is the output of
    lspci -nnk | grep -iA2 net

    02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) Subsystem: Acer Incorporated [ALI] Device [1025:098a] Kernel driver in use: r8169 03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30) Subsystem: Foxconn International, Inc. Device [105b:e09a] Kernel driver in use: ath10k_pci

    • Pilot6
      Pilot6 over 8 years
      See this question. Ndiswrapper will not work.
    • gunjit
      gunjit over 8 years
      Thanks. First during sudo update and wget commands there were a few errors of not being able to connect to some sites. Then after I tar the file and the first time I ran the make defconfig-ath 10k command ,by mistake I ran deconfig instead of defconfig but even when I ran defconfig it says can't find default configuration "defconfigs/ath" and it gives make[1]: [defconfig-ath] Error 1 and make: ***[defconfig-ath]Error 2 and after doing make it says your backport package is not configured and gives a list of options to configure it.
  • gunjit
    gunjit over 8 years
    Does the last command have to be entered from the backports 20151120 directory only? it gives the error cp: cannot create regular file ‘/lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin’: Permission denied
  • Jeremy31
    Jeremy31 over 8 years
    I edited the answer is needed to be sudo cp /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin_WLAN.TF.1.‌​0-00267-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin The directory is correct if the instructions were closely followed
  • gunjit
    gunjit over 8 years
    Thanks. Did as per the commands and now have an enable wifi option but still not being able to connect to it.
  • Jeremy31
    Jeremy31 over 8 years
    Please edit your question to include results from dmesg | grep ath10k Thanks
  • Jeremy31
    Jeremy31 over 8 years
    Can you check the encryption settings on the wifi router to see if it is WPA2 only with no TKIP or WEP enabled? You could also try with encryption disabled for a short test. Can you also add lspci -nnk | grep -iA2 net to your question as there is one version of this card that needs a different board.bin file
  • gunjit
    gunjit over 8 years
    first, thanks a lot for your cooperation. I really appreciate it. While using ndiswrapper i had disabled the drivers, can it possibly be because of that. But they were ath_pci, ath_hal, ath9k. Also, i am able to use the wifi by connceting my mobile phone to but when i plug out the usb it does not work then.
  • gunjit
    gunjit over 8 years
    Yeah it is not TKIP OR WEP enabled.
  • Jeremy31
    Jeremy31 over 8 years
    Not sure what the issue might be since my answer worked on the same chipset here The drivers you disabled wouldn't affect it, are you using WICD?
  • gunjit
    gunjit over 8 years
    No, i am not using WICD. Yeah, the solution should have worked. I might have changed some settings. Thanks for your help.
  • Jeremy31
    Jeremy31 over 8 years
    See the answer and post the script results or you can copy the contents of the wireless-info.txt file and paste at paste.ubuntu.com and post the URL
  • gunjit
    gunjit over 8 years
    thanks man! faced exactly the same problem after updating the kernel. now working fine. thanks a lot.
  • Seung
    Seung over 8 years
    sudo make install complained "can't access private key" or similar, but anyway
  • user3125971
    user3125971 about 8 years
    I got this error /backports-20151120/drivers/bcma/driver_gpio.c:191:6: error: ‘struct gpio_chip’ has no member named ‘dev’ chip->dev = bcma_bus_get_host_dev(bus);
  • ajbraus
    ajbraus about 8 years
    This worked to make the wifi connect, but then when I walked about 20 feet away from the router it stopped working. My iPhone and Mac both work at this distance, but my Lenovo Ideacentre 300 doesn't. Could this be a software issue or just a hardware one? Thx!
  • Darth Kotik
    Darth Kotik about 8 years
    Jeremy31, thank you very much for you responce, it really helped me. Question is: wifi stoped working again after installation of updates, do you know what caused this? Also, can I somehow track when this changes will be included in a base installation of ubuntu (I tried Beta of 16.04, wifi still not working)
  • Jeremy31
    Jeremy31 about 8 years
    @DarthKotik You likely got a kernel update and need to follow the second group of commands to install the driver for the new kernel. I think 16.04 will just need the firmware to be installed
  • Darth Kotik
    Darth Kotik about 8 years
    @Jeremy31, it worked! Thank you one more time!
  • Jeremy31
    Jeremy31 over 7 years
    @Pilot6 I guess with the changes made in linux firmware we could just tell users to install updates
  • Pilot6
    Pilot6 over 7 years
    @Jeremy31 That's correct. I just did that on Russian forums. I checked this answer for firmware names and found that the link to firmware does not work. Then I found that the firmware has been added to the main repos. But some users can't install updates without Wi-Fi.
  • Anand Soni
    Anand Soni over 7 years
    I followed the instruction, I can see wifi option. When I enable wifi it isn't showing any wifi connection. I have done wireless-info.txt and posted in ubunt. Here it is paste.ubuntu.com/23769391 What could be the solution ?
  • Jeremy31
    Jeremy31 over 7 years
    @AnandSoni Please ask a new question as I suspect you have a Lenovo and a different issue, include the wireless-info URL in your question
  • Anand Soni
    Anand Soni over 7 years
    @Jeremy31 Thank you. I have posted a new question. askubuntu.com/questions/870156/…
  • Anand Soni
    Anand Soni over 7 years
    @Jeremy31 thank you for your instruction. to make it working I have to add blacklist ideapd-laptop to /etc/modprobe.d/blacklist.conf. It would be good if you can add this instruction to your answer as well. Thank you again.
  • Cbhihe
    Cbhihe over 6 years
    Hi Jeremy, same wlan iface hw+driver and exact same pbm as OP... I run Zesty 17.04 on Dell XPS15 9560. Per yr instruction, I found that in /lib/firmware/ath10k/QCA6174/ I have 2 directories hw2.1 and hw3.0. They contain respectively firmware-5.bin and firmware-4.bin. Which of the two is used by default by the WiFi card ? On the github link you provided, the more recent seems to be hw3.0/4.4.1/firmware-6.bin_WLAN... TWO questions: 1) Is the latter firmware the one I should copy ? Where should I place/copy it ? 2) Do I need to do a backport on 17.04 ? Thanks.
  • Jeremy31
    Jeremy31 over 6 years
    @Cbhihe you don't need backports and dmesg | grep 'ath|firm' should show the files location
  • Cbhihe
    Cbhihe over 6 years
    Thanks ! The result is e.g.: ath10k_pci 0000:02:00.0: could not fetch firmware file 'ath10k/QCA6174/hw3.0/firmware-5.bin': -2 . Yesterday I had already placed the latest firnware-4.bin I could find on GitHub in ath10k/QCA6174/hw3.0/ and soft linked it to origin file firmware-5.bin. As a result upon reboot, my box could not detect a Wlan interface anymore ! Rebuilding hw3.0/ as it was previously restore the breathtaking 1Mbps of WiFi I currently "enjoy" ... I am really stumped after a good 20 hours tinkering trying to hack this thing... Any help welcome.
  • Rubanraj Ravichandran
    Rubanraj Ravichandran over 6 years
    This worked for me with little modification. The last command will looks like this now, i dont know they might changed the folder structure itseems. If possible pls update the original answer. sudo cp /lib/firmware/ath10k/QCA9377/hw1.0/CNSS.TF.1.0/firmware-5.bi‌​n_CNSS.TF.1.0-00267-‌​QCATFSWPZ-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin I have lenovo thinkpad E470 laptop and i faced wifi issue in Ubuntu 14.04. After followed the steps the problem was solved. Thanks again.