博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu16.04下无线网卡无法正常连网
阅读量:4952 次
发布时间:2019-06-11

本文共 6163 字,大约阅读时间需要 20 分钟。

背景:无线网卡初次连接可以正常上网,但是用了一会儿就会出现无法上网的情况

版本: Ubuntu 16.04 

一.分析:

1.使用ifconfig命令发现不会显示无线网卡,说明无线网卡被关闭,笔者输出的信息如下:

jello@jello:~$ ifconfig

eth0 Link encap:以太网 硬件地址 16:03:71:93:64:22 

inet 地址:192.168.100.3 广播:192.168.100.255 掩码:255.255.255.0
inet6 地址: fe80::1a03:73ff:fe92:632e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:295308 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:208860 错误:1 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:394951279 (394.9 MB) 发送字节:19510963 (19.5 MB)

lo Link encap:本地环回

inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:943526 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:943526 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1
接收字节:464924375 (464.9 MB) 发送字节:464924375 (464.9 MB)

2.使用lshw命令输出信息(只贴出无线网卡相关的信息)如下:

jello@jello:~$ lshw

*-network DISABLED

description: Wireless interface
physical id: 2
logical name: wlan0           1
serial: 92 :31:e3:4a:75:f2
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=brcmsmac driverversion=4.1.0-78-generic firmware=102.304 ip=192.168.100.131 link=no multicast=yes wireless=IEEE 802.11bgn

从第2点的"*-network DISABLED"这一行可以明确无线网卡在硬件上被禁止了

3.于是打开硬件开关,但尝试了很多次都没成功,通过rfkill的输出信息来判断:

jello@jello:~$ sudo rfkill list all

[sudo] jello 的密码:
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes

从"Hard blocked: yes"这一行可以看出无线网卡在硬件上被block

4.通过第3点开始怀疑无线网卡的驱动是否安装正确

二.安装无线网卡驱动:

1.卸载之前安装的无线网卡驱动(如果之前安装了的情况下,否则请无视):

sudo apt-get purge firmware-b43-installer

sudo apt-get purge bcmwl-kernel-source

2.获取无线网卡的PCI.ID (笔者的无线网卡品牌是broadcom,所以指定厂商代号为14e4)

jello@jello$ lspci -nn -d 14e4:

09:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)

从以上信息中获取到关键信息为:[14e4:4727] (rev 01)

-nn 选项是只显示指定的厂商代码对应的设备

-d 选项是显示厂商代号和设备代号,同时显示数字和名称

3.更新ubuntu的PCI.IDs列表:

3.1sudo apt-get update (首先更新软件包索引)

3.2sudo update-pciids (如果一直没有响应,那就将其中断),直接替换原来的/usr/share/misc/pci.ids文件,命令如下:

  cd /usr/share/misc/

  sudo mv pci.ids pci.ids.orig

    然后从http://pci-ids.ucw.cz/下载最新的pic.ids文件

  将下载好的pci.ids文件复制到/usr/share/misc/目录下(由于笔者认为目前的无线网卡硬件不是很新,因此无线网卡的信息在原来的pci.ids文件中是存在的,因此并没有手动去更新pci.ids文件)

4.安装对应的无线网卡驱动,从下表即可获得对应驱动的软件包名

PCI.ID              16.04 LTS                        17.10+------------------------------------------------------------------------------------14e4:0576           Special Case #1                   UNKNOWN      14e4:4301           firmware-b43-installer            firmware-b43-installer      14e4:4306           firmware-b43-installer            firmware-b43-installer      14e4:4306 rev 02    firmware-b43-installer            firmware-b43-installer      14e4:4306 rev 03    firmware-b43-installer            firmware-b43-installer      14e4:4307           firmware-b43-installer            firmware-b43-installer      14e4:4311           firmware-b43-installer            firmware-b43-installer      14e4:4311 rev 01    firmware-b43-installer            firmware-b43-installer      14e4:4312           firmware-b43-installer            firmware-b43-installer      14e4:4313           firmware-b43-installer            firmware-b43-installer               14e4:4315           firmware-b43-installer            firmware-b43-installer      14e4:4315 rev 01    firmware-b43-installer            firmware-b43-installer14e4:4318           firmware-b43-installer            firmware-b43-installer                14e4:4318 rev 02    firmware-b43-installer            firmware-b43-installer                14e4:4319           firmware-b43-installer            firmware-b43-installer               14e4:4320 rev 02    firmware-b43-installer            firmware-b43-installer               14e4:4320 rev 03    firmware-b43-installer            firmware-b43-installer            14e4:4321           firmware-b43-installer            firmware-b43-installer  14e4:4324           firmware-b43-installer            firmware-b43-installer        14e4:4325           firmware-b43-installer            firmware-b43-installer      14e4:4328           firmware-b43-installer            firmware-b43-installer         14e4:4329           bcmwl-kernel-source               bcmwl-kernel-source        14e4:432a           bcmwl-kernel-source               bcmwl-kernel-source        14e4:432b           bcmwl-kernel-source               bcmwl-kernel-source        14e4:432c           bcmwl-kernel-source               bcmwl-kernel-source        14e4:432d           bcmwl-kernel-source               bcmwl-kernel-source       14e4:4331           firmware-b43-installer            firmware-b43-installer          14e4:4335           firmware-b43-installer            firmware-b43-installer      14e4:4350           firmware-b43-installer            firmware-b43-installer  14e4:4353           Special Case #1                   UNKNOWN        14e4:4353 rev 01    Special Case #1                   UNKNOWN                 14e4:4357           Special Case #1                   UNKNOWN        14e4:4358           bcmwl-kernel-source               bcmwl-kernel-source14e4:4359           bcmwl-kernel-source               bcmwl-kernel-source       14e4:4360           bcmwl-kernel-source               bcmwl-kernel-source    14e4:4365           bcmwl-kernel-source               bcmwl-kernel-source      14e4:4365 rev 01    bcmwl-kernel-source               bcmwl-kernel-source      14e4:43a0           bcmwl-kernel-source               bcmwl-kernel-source14e4:43ae rev 02    UNKNOWN                           UNKNOWN     14e4:43b1           bcmwl-kernel-source               bcmwl-kernel-source        14e4:43b1 rev 03    bcmwl-kernel-source               bcmwl-kernel-source              14e4:43c3 rev 04    UNKNOWN                           Special Case #2                     14e4:4727           bcmwl-kernel-source               bcmwl-kernel-source        14e4:4727 rev 01    bcmwl-kernel-source               bcmwl-kernel-source        14e4:a962           firmware-b43-installer            firmware-b43-installer      ------------------------------------------------------------------------------------ 4.1从上表中可以看到bcmwl-kernel-source与14e4:4727 rev 01对应,因此安装命令如下: sudo apt-get install bcmwl-kernel-source 4.2重新启动

 

转载于:https://www.cnblogs.com/dakewei/p/7639175.html

你可能感兴趣的文章
个人进度(13)
查看>>
将数据绑定到combobox的方法
查看>>
操作Git中出现的问题,记录
查看>>
《断章》----卞之琳
查看>>
jQuery插件--根据数据加载的进度动画案例
查看>>
ubuntu 18.04安装ftp服务器
查看>>
ubuntu18.04安装golang
查看>>
FastReport.Net使用:[35]奇偶行
查看>>
使用IP代理以后为什么有的时候还是会被封号
查看>>
783. Minimum Distance Between BST Nodes
查看>>
VC++ .net 2005运行库解析
查看>>
linux系统安装nginx
查看>>
FZU 1894 志愿者选拔【单调队列】【monotone decreasing queue】
查看>>
Mac下Android studio 之NDK配置教程(一)
查看>>
Java随机验证吗
查看>>
C++简易
查看>>
VS 2010项目中添加lib库 【转】http://blog.csdn.net/w174504744/article/details/7368169
查看>>
IIS下PHP的ISAPI和FastCGI比较
查看>>
Masonry中的mas_makeConstraints方法
查看>>
百度、高德地图数据源是哪里?
查看>>