2017-09-05 69 views
0

我最近買了一臺聯想500-15ACZ筆記本,並在其上安裝了Ubuntu 16.04。安裝後,我發現我無法連接到Wifi。當我搜索這個問題時,這似乎是Broadcom無線網卡的常見問題。我在askubuntu上找到this question,並按照路易斯阿爾瓦拉多的回答的步驟。
命令lspci -nn -d 14e4:告訴我,我的設備的pci.id是14e4:43ae rev 02,這在Linux中還不支持。
然而,在GIT中,試圖通過反向移植來解決這個腳本(link to project):Broadcom 14e4的Backport安裝腳本:43ae wifi控制器故障

 #!/bin/bash 

cd /tmp 
git clone https://github.com/kvalo/ath10k-firmware.git 
cd ath10k-firmware/QCA9377/hw1.0 
sudo mkdir -p /lib/firmware/ath10k/QCA9377/hw1.0 
sudo cp board.bin /lib/firmware/ath10k/QCA9377/hw1.0 
sudo cp firmware-5.bin_WLAN.TF.1.0-00267-1 /lib/firmware/ath10k/QCA9377/hw1.0/firmware-5.bin 
sudo modprobe -r ath10k_pci 
cd /tmp 
wget https://www.kernel.org/pub/linux/kernel/projects/backports/2015/11/20/backports-20151120.tar.gz 
tar -xf backports-20151120.tar.gz 
cd backports-20151120 
make defconfig-ath10k 
make 
sudo make install

但是,當我試圖運行此,make引發了以下錯誤:

 

     Building backport-include/backport/autoconf.h ... done. 
     CC [M] /tmp/backports-20151120/compat/main.o 
     In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0, 
     from :0: 
     ./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’: 
     /tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration] 
     #define IS_BUILTIN(option) config_enabled(option) 
            ^
     ./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’ 
     return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); 
           ^
     ./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function) 
     return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); 
              ^
     /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ 
     #define IS_BUILTIN(option) config_enabled(option) 
               ^
     ./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in 
     return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); 
              ^
     /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ 
     #define IS_BUILTIN(option) config_enabled(option) 
               ^
     cc1: some warnings being treated as errors 
     scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed 
     make[6]: *** [/tmp/backports-20151120/compat/main.o] Error 1 
     scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed 
     make[5]: *** [/tmp/backports-20151120/compat] Error 2 
     Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed 
     make[4]: *** [_module_/tmp/backports-20151120] Error 2 
     Makefile.build:6: recipe for target 'modules' failed 
     make[3]: *** [modules] Error 2 
     Makefile.real:88: recipe for target 'modules' failed 
     make[2]: *** [modules] Error 2 
     Makefile:40: recipe for target 'modules' failed 
     make[1]: *** [modules] Error 2 
     Makefile:30: recipe for target 'default' failed 
     make: *** [default] Error 2 
     CC [M] /tmp/backports-20151120/compat/main.o 
     In file included from /tmp/backports-20151120/backport-include/backport/backport.h:7:0, 
     from :0: 
     ./include/asm-generic/qrwlock.h: In function ‘__qrwlock_write_byte’: 
     /tmp/backports-20151120/backport-include/linux/kconfig.h:25:28: error: implicit declaration of function ‘config_enabled’ [-Werror=implicit-function-declaration] 
     #define IS_BUILTIN(option) config_enabled(option) 
            ^
     ./include/asm-generic/qrwlock.h:156:26: note: in expansion of macro ‘IS_BUILTIN’ 
     return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); 
           ^
     ./include/asm-generic/qrwlock.h:156:37: error: ‘CONFIG_CPU_BIG_ENDIAN’ undeclared (first use in this function) 
     return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); 
              ^
     /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ 
     #define IS_BUILTIN(option) config_enabled(option) 
               ^
     ./include/asm-generic/qrwlock.h:156:37: note: each undeclared identifier is reported only once for each function it appears in 
     return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); 
              ^
     /tmp/backports-20151120/backport-include/linux/kconfig.h:25:43: note: in definition of macro ‘IS_BUILTIN’ 
     #define IS_BUILTIN(option) config_enabled(option) 
               ^
     cc1: some warnings being treated as errors 
     scripts/Makefile.build:294: recipe for target '/tmp/backports-20151120/compat/main.o' failed 
     make[5]: *** [/tmp/backports-20151120/compat/main.o] Error 1 
     scripts/Makefile.build:567: recipe for target '/tmp/backports-20151120/compat' failed 
     make[4]: *** [/tmp/backports-20151120/compat] Error 2 
     Makefile:1524: recipe for target '_module_/tmp/backports-20151120' failed 
     make[3]: *** [_module_/tmp/backports-20151120] Error 2 
     Makefile.build:6: recipe for target 'modules' failed 
     make[2]: *** [modules] Error 2 
     Makefile.real:88: recipe for target 'modules' failed 
     make[1]: *** [modules] Error 2 
     Makefile:40: recipe for target 'install' failed 
     make: *** [install] Error 2 

**Does anyone know how to fix this?** 
Please let me know if you need any other info. 
Thanks in advance!  

更新: 我安裝了broadcom- sta-dkms包如你所建議的。不幸的是,你是對的。這沒有奏效。
當我試圖WL驅動,dmesg | grep -i wl回到

[

12.459884] wl: loading out-of-tree module taints kernel. 
    [ 12.459890] wl: module license 'MIXED/Proprietary' taints kernel. 
    [ 12.468203] wl: module verification failed: signature and/or required key missing - tainting kernel 
    [ 12.487603] wl driver 6.30.223.271 (r587334) failed with code 1001 
    [ 12.487606] ERROR @wl_cfg80211_detach : 
    [ 12.487607] NULL ndev->ieee80211ptr, unable to deref wl 

但是,我怕我不知道這意味着什麼。對於其他車手,dmesg什麼也沒有返回。

回答

0

那麼,我會建議保持一致。您有一個Wi-Fi設備,並且您知道它的PCI供應商ID(位於冒號前面)和設備ID - 14e4:43ae。在您的問題中,您沒有提供您的lspci的完整摘錄,因此您的設備是否確實被確定爲Broadcom尚不清楚。但是,如果我們假設它是真的,我們可以搜索它。

這裏是WikiDevi page說:

802.11a/b/g/n/ac WLAN + Bluetooth 4.0 NGFF 2230 Mini Card 
WI1 chip1: Broadcom BCM43162 
Probable Linux driver unknown 
PCI ID not yet observed in any mainline kernel/this list 

所以,你可能會看到,這個頁面揭示了類似的芯片命名和這樣的PCI ID的內核代碼認識當前觀察這樣重要的事情光。後者意味着,根據他們的研究,主內核樹中沒有一個驅動程序在對應的PCI ID表中具有這樣的ID,藉助於該ID,內核決定探測給定設備的特定驅動程序。沒有關於PCI ID的信息。

但是現在我們確信這個確實是一個Broadcom設備。 看着你摘自腳本(你正試圖利用)令我感到困惑了很多,因爲它是高通Atheros博通。它嘗試從(可能)不受信任的存儲庫獲取QCA固件並編譯ath10k反向驅動程序。所以,在這一點上,我們知道僅僅關於編譯錯誤的問題從一開始就是無益的。但是,當然,可以假設沒有安裝Linux內核頭文件包,或者反向移植版本ath10k與您當前的內核不兼容。而已。

因此,很明顯我們會尋找Broadcom驅動程序(可能還有Broadcom固件)。從這個角度來看,我可以告訴您,Broadcom設備有三種類型的驅動程序:b43(主要是遺留的),供應商許可的broadcom-stawl)和樹中的brcm80211。後者是brcmsmacbrcmfmac的通用名稱。 這裏有權威頁面最多最新信息:

B43 - http://linuxwireless.org/en/users/Drivers/b43/

brcm80211 - https://wireless.wiki.kernel.org/en/users/drivers/brcm80211

而且,或多或少的描述頁供應商許可wl

https://wiki.debian.org/wl

我無法在任一頁上找到您的PCI ID。這確實證實相應的支持尚未添加。但是,我們可以通過嘗試手中的驅動程序來進一步證實這一點。很顯然,內核b43brcm80211不適合你,但看看dmesg可能會有用 - 也許,加載了brcm80211但無法找到FW。 如果找不到任何有用的信息,那麼嘗試wl會很好。該驅動程序通過broadcom-sta包(Debian,Ubuntu)發佈,我可以在Ubuntu網站上提及相應的description。 因此,要嘗試wl,您需要確保您有適當的Linux標頭,然後只需安裝broadcom-sta-dkms包。

apt-get update 
apt-get install linux-headers-$(uname -r) 
apt-get install broadcom-sta-dkms 

希望它能編譯和安裝它。然後,您應該重新啓動並查看Wi-Fi會發生什麼情況。最有可能的是,這不會有幫助(因爲我認爲你的設備真的不被支持),但是如果它有效,你將能夠使用它。即使您確定您的設備確實無法與wl一起使用,例如brcm80211的情況,也需要查看dmesg的輸出結果。然而,例如,尋找一個有效的FW圖像(如果dmesg抱怨)是一個單獨的問題,應該相應地討論。

此外,我可以在這個主題上進行擴展,並提到在網絡上的某些郵件列表中,一些人已經詢問了有關爲此設備添加支持的計劃。這裏是one的鏈接。因此,如果brcm80211wlbroadcom-sta-dkms)均不能幫助您,您可以考慮發送電子郵件給brcm80211支持者之一。他們的名字和電子郵件地址在page上列出。其中有Broadcom員工。如果你問他們一個好的建議,你也會幫助其他人。

UPDATE

所以,你說b43(也b43_legacy)和brcm80211保持沉默,在dmesg。這可能意味着您的PCI ID不受這些驅動程序的支持。

什麼是對wl輸出,我可以分享我的輸出進行比較:

wl: loading out-of-tree module taints kernel. 
wl: module license 'MIXED/Proprietary' taints kernel. 
Disabling lock debugging due to kernel taint 
wlan0: Broadcom BCM43a0 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334) 

這顯然意味着,你的產出減去這一項又給出了某種沉默。但是,要確定您的設備是否不受支持或存在某些固件版本問題,這太晦澀難懂了。

所以,好像沒有選擇繼續留在這裏。 但是,您仍然可以考慮ndiswrapper解決方案。在兩個詞,這是一個特殊的工具/驅動器,可以安裝一個適當的INFSYS從Windows驅動程序文件(即你應該得到它你的卡的地方,例如,從CD中提取或來自Broadcom下載網站),以便驅動程序可以像在Windows環境中一樣在Linux中運行。這種類型的解決方案有其缺點和侷限性。首先,只有無線驅動程序的Windows XP版本都支持,所以如果你有,比如,從供應商的網站一個ZIP壓縮包,您需要從Windows XP後命名的目錄中提取INFSYS文件(而不是Vista/7/10),並且需要注意CPU架構選擇(32位/ 64位)。這裏是來自Debian的article,它可能適合Ubuntu。但是總體上這種解決方案可能會面臨一些額外的缺點和突然的不良操作(這是單獨討論的話題),並且一般而言,它被認爲是缺少驅動程序的不好解決方案。所以,在這種情況下,許多人只是喜歡將其不支持的卡與其他卡交換,或者等到將缺少的支持添加到本地驅動程序之一。隨你便。

+0

感謝詳細的解答!我目前正在工作,但當我回家時我會嘗試你的建議。至於劇本,我試圖用這個,因爲這個項目的描述說:「_A很小的腳本,應使件14e4:在Linux上43ae博通的Wi-Fi芯片組,我已經使用這個對我的聯想IdeaPad 500S在的Wi- Fi在Linux上無法使用。「 – deadpool

+0

不客氣。是的,我還在Github上看到過這樣的腳本,他們提到了Broadcom,但實際上下載了QCA軟件包。這太奇怪了!我無法得到它。另外,請注意,由於我在原始版本中犯了一些錯誤,因此我做了一些編輯。也就是說,我不小心混淆了'wl'和'brcm80211'驅動程序 - 它們不一樣。用兩個詞來說,在內核中可以使用'b43'(遺留,反向工程)和'brcm80211'(Broadcom的**開源**驅動程序)。 –

+0

'wl'是Broadcom的另一個驅動程序 - 一個官方授權的驅動程序,它是單獨發行的(Ubuntu的'broadcom-sta-dkms'軟件包)。所以,現在我澄清了區別。有關更多信息,請參閱我的更新答案。 –