Debian

如何讓WiFi自動工作?

  • November 21, 2018

我安裝broadcom-sta-common了它導致 WiFi 無法工作,我清除了它,但我仍然需要sudo modprobe brcmsmac在啟動後手動執行才能使 WiFi 工作。

我怎樣才能讓它像以前一樣自動工作?

一些輸出:

rahman@debian:~$ sudo rfkill list 
0: hp-wifi: Wireless LAN
   Soft blocked: no
   Hard blocked: no
1: phy0: Wireless LAN
   Soft blocked: no
   Hard blocked: no

rahman@debian:~$ uname -a
Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

rahman@debian:~$ lspci -nn -d 14e4:
44:00.0 Network controller [0280]: Broadcom Limited BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)

rahman@debian:~$ cat /var/lib/NetworkManager/NetworkManager.state
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true

rahman@debian:~$ cat /etc/modprobe.d/blacklist.conf 
blacklist brcmsmac

更新:使用 wl 模組時

rahman@debian:~$ sudo iw list | grep "Supported interface modes" -A12
   Supported interface modes:
        * IBSS
        * managed
   Band 1:
       Bitrates (non-HT):
           * 1.0 Mbps
           * 2.0 Mbps (short preamble supported)
           * 5.5 Mbps (short preamble supported)
           * 11.0 Mbps (short preamble supported)
           * 6.0 Mbps
           * 9.0 Mbps
           * 12.0 Mbps
           * 18.0 Mbps

使用 brcmsmac 模組時:

rahman@debian:~$ sudo iw list | grep "Supported interface modes" -A12
   Supported interface modes:
        * IBSS
        * managed
        * AP
        * AP/VLAN
        * monitor
   Band 1:
       Capabilities: 0x70
           HT20
           Static SM Power Save
           RX Greenfield
           RX HT20 SGI
           RX HT40 SGI

brcmsmac添加到之後,它現在可以在啟動時執行/etc/modules

您應該按照官方網站上的建議使用wl代替。brcmsmac

此外,您應該解除安裝有衝突的驅動程序女巫導致 wifi 停止,直到您重新啟動作業系統。

按照 debian wiki 上描述的步驟:

non-free組件添加到您的/etc/apt/sources.list

deb http://httpredir.debian.org/debian/ stretch main contrib non-free

安裝所需的包:

apt-get update
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms

解除安裝衝突的驅動程序:

modprobe -r b44 b43 b43legacy ssb brcmsmac bcma

載入wl模組:

modprobe wl

wireless.wiki.kernel.org

brcmsmac

Name    PCI Device ID
BCM4313 0x4727

請注意:至少不完全支持 BCM4313。有些模型似乎可以工作(使用者報告成功),但有些則不能,而且沒有跡象表明這會改變。例如:http ://marc.info/?t=138817851800006&r=1&w=2

引用自:https://unix.stackexchange.com/questions/391284