zoukankan      html  css  js  c++  java
  • 联想Y430P CentOS 7.3 无线网络的配置

    # uname -a # 查看内核/操作系统/CPU信息的Linux系统信息命令

    [root@www ~]# uname -a
    Linux www 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    [root@www ~]# 

    # lspci -tv # 列出所有PCI设备

    [root@endv /]# lspci -tv
    -[0000:00]-+-00.0  Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller
               +-01.0-[01-06]----00.0  NVIDIA Corporation GM107M [GeForce GTX 850M]
               +-02.0  Intel Corporation 4th Gen Core Processor Integrated Graphics Controller
               +-03.0  Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
               +-14.0  Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI
               +-16.0  Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1
               +-1a.0  Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2
               +-1b.0  Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller
               +-1c.0-[07]----00.0  Qualcomm Atheros QCA8171 Gigabit Ethernet
               +-1c.4-[08]----00.0  Broadcom Limited BCM43142 802.11b/g/n
               +-1d.0  Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1
               +-1f.0  Intel Corporation HM86 Express LPC Controller
               +-1f.2  Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]
               -1f.3  Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller
    [root@endv /]# 

     # BCM43142
     # Wi-Fi Direct™ & Bluetooth 4.0 Combo Chip for PCs & Notebooks
     
      博通无线网卡 BCM43142 802.11b/g/n 64位驱动下载地址:
     # https://docs.broadcom.com/docs/12358410 


     建立安装路径并解压  
    # mkdir -p /usr/local/src/hybrid-wl

    将刚刚下载的.tar.gz复制到新建好的文件夹中

    # cp /home/XXXX/下载/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz /usr/local/src/hybrid-wl

    进入hybrid-hy文件夹

    # cd /usr/local/src/hybrid-wl


    编译安装

    # make clean

    [root@www hybrid-wl]# make clean
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean
    make[1]: 进入目录“/usr/src/kernels/3.10.0-514.el7.x86_64”
    CFG80211 API is prefered for this kernel version
    /usr/local/src/hybrid-wl/Makefile:85: Neither CFG80211 nor Wireless Extension is enabled in kernel
    make[1]: 离开目录“/usr/src/kernels/3.10.0-514.el7.x86_64”
    [root@www hybrid-wl]# 


    # make API=WEXT

    [root@www hybrid-wl]# make API=WEXT
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: 进入目录“/usr/src/kernels/3.10.0-514.el7.x86_64”
    Wireless Extension API specified in command line
    Using Wireless Extension API
      LD      /usr/local/src/hybrid-wl/built-in.o
      CC [M]  /usr/local/src/hybrid-wl/src/shared/linux_osl.o
      CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_linux.o
      CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_iw.o
      CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.o
      LD [M]  /usr/local/src/hybrid-wl/wl.o
      Building modules, stage 2.
    Wireless Extension API specified in command line
    Using Wireless Extension API
      MODPOST 1 modules
      CC      /usr/local/src/hybrid-wl/wl.mod.o
      LD [M]  /usr/local/src/hybrid-wl/wl.ko
    make[1]: 离开目录“/usr/src/kernels/3.10.0-514.el7.x86_64”
    [root@www hybrid-wl]# 


     编译成功,ls以下,发现生成了wl.ko文件 然后安装

    [root@www hybrid-wl]# ls
    built-in.o                                       lib       modules.order   src    wl.mod.c  wl.o
    hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz  Makefile  Module.symvers  wl.ko  wl.mod.o
    [root@www hybrid-wl]# 


    # make install

    [root@www hybrid-wl]# make install
    install -D -m 755 wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
    [root@www hybrid-wl]# 


    # modprobe lib80211 # 因为 wl.ko 需要依赖该模块

    [root@www hybrid-wl]# modprobe lib80211
    [root@www hybrid-wl]# 

    # insmod wl.ko

    [root@www hybrid-wl]#  insmod wl.ko
    [root@www hybrid-wl]# 


    添加开机启动
    # cp wl.ko /lib/modules/3.10.0-514.6.1.el7.x86_64/kernel/drivers/net/wireless (将wl.ko复制进去,其中3.10.0-514.6.1.el7.x86_64是你的内核版本,可以进入modules文件夹中ls一下)
    # depmod -a
    # echo modeprobe wl >> /etc/rc.local

    重启后,看看系统能否自动加载模块

    lsmod | grep 43142

    查看网卡的信息lsusb

    [root@www hybrid-wl]# lsusb
    Bus 002 Device 002: ID 8087:8000 Intel Corp. 
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 8087:8008 Intel Corp. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 004: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module
    Bus 003 Device 003: ID 0951:1643 Kingston Technology DataTraveler G3
    Bus 003 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 003 Device 002: ID 174f:1474 Syntek 
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    [root@www hybrid-wl]# 

    ifconfig查看若沒有用 ifconfig -a查看

    原来是ifconfig查看的是已激活的网卡,ifconfig -a 查看的所有的

    [root@www hybrid-wl]# ifconfig
    enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::5039:723e:63ad:6c7a  prefixlen 64  scopeid 0x20<link>
            ether 68:f7:28:16:b7:69  txqueuelen 1000  (Ethernet)
            RX packets 228289  bytes 328933422 (313.6 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 110309  bytes 7892078 (7.5 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 19  
    
    enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            ether 10:08:b1:d8:ac:db  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 16  
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1  (Local Loopback)
            RX packets 578  bytes 46314 (45.2 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 578  bytes 46314 (45.2 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
            ether 52:54:00:92:e3:3c  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    [root@www hybrid-wl]# 
    [root@www hybrid-wl]# ifconfig -a
    enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::5039:723e:63ad:6c7a  prefixlen 64  scopeid 0x20<link>
            ether 68:f7:28:16:b7:69  txqueuelen 1000  (Ethernet)
            RX packets 228672  bytes 328983321 (313.7 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 110684  bytes 7919712 (7.5 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 19  
    
    enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            ether 10:08:b1:d8:ac:db  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 16  
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1  (Local Loopback)
            RX packets 578  bytes 46314 (45.2 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 578  bytes 46314 (45.2 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
            ether 52:54:00:92:e3:3c  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    virbr0-nic: flags=4098<BROADCAST,MULTICAST>  mtu 1500
            ether 52:54:00:92:e3:3c  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    [root@www hybrid-wl]# 

    ,此时我们只需要将wlp0s29u1u6激活;

     借助wireless_tools和wpa_supplicant(因为现在的无线wifi网络大多是wpa加密。所以需要移植wpa_supplicant工具)等工具实现wifi的过程

    Download (HTTP): http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.tar.gz

    http://linux.softpedia.com/get/System/Networking/Wireless-Tools-6312.shtml

     cd /usr/src/kernels/3.10.0-514.el7.x86_64/tools 

    [root@www]# cd /usr/src/kernels/3.10.0-514.el7.x86_64/tools
    [root@www tools]#

    tar -zxvf wireless_tools.30.rtl.tar.gz -C /usr/local/src/进入到拆解的目录

    切換root權限,執行make和make iinstall

     

    我们进入/usr/local/sbin目录下:

  • 相关阅读:
    vue+node.js+webpack开发微信公众号功能填坑——组件按需引入
    myeclipse打开jsp页面慢或者卡死
    myeclipse自动添加注释
    解决java.lang.NoSuchMethodError:org.joda.time.DateTime.withTimeAtStartOfDay() Lorg/joda/time/DateTime
    Echarts柱状图实现不同颜色渐变色
    《Python学习手册 第五版》 -第38章 被管理的属性
    《Python学习手册 第五版》 -第37章 Unicode和字节串
    《Python学习手册 第五版》 -第36章 异常的设计
    《Python学习手册 第五版》 -第35章 异常对象
    《Python学习手册 第五版》 -第34章 异常编写细节
  • 原文地址:https://www.cnblogs.com/endv/p/6435401.html
Copyright © 2011-2022 走看看