![如何让WiFi自动工作?](https://linux22.com/image/117652/%E5%A6%82%E4%BD%95%E8%AE%A9WiFi%E8%87%AA%E5%8A%A8%E5%B7%A5%E4%BD%9C%EF%BC%9F.png)
我安装了它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
答案1
brcmsmac
添加后它现在可以启动/etc/modules
答案2
您应该使用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
brcmsmac
Name PCI Device ID
BCM4313 0x4727
请注意:至少不完全支持BCM4313。有些模型似乎有效(用户报告成功),但有些则无效,并且没有迹象表明这种情况会改变。例如:http://marc.info/?t=138817851800006&r=1&w=2