1、检查设备状态

$ lspci -k
06:00.0 Network controller: Intel Corporation WiFi Link 5100
    Subsystem: Intel Corporation WiFi Link 5100 AGN
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

检查设备驱动是否已经加载

2、检查内核中的固件信息

$ dmesg | grep firmware
[   7.148259] iwlwifi 0000:02:00.0: loaded firmware version 39.30.4.1 build 35138 op_mode iwldvm

有类似的输出,说明固件正常

3、无线网络管理

获取接口名

$ iw dev
phy#0
    Interface wlan0
        ifindex 3
        wdev 0x1
        addr 12:34:56:78:9a:bc
        type managed
        channel 1 (2412 MHz), width: 40 MHz, center1: 2422 MHz

检查连接状态,未连接时,可以看到

$ iw dev wlan0 link
Not connected.

连接到 AP 后可以看到

$ iw dev wlan0 link
Connected to 12:34:56:78:9a:bc (on wlan0)
    SSID: MyESSID
    freq: 2412
    RX: 33016518 bytes (152703 packets)
    TX: 2024638 bytes (11477 packets)
    signal: -53 dBm
    tx bitrate: 150.0 MBit/s MCS 7 40MHz short GI

    bss flags:    short-preamble short-slot-time
    dtim period:    1
    beacon int:    100

获取统计数据

$ iw dev wlan0 station dump
Station 12:34:56:78:9a:bc (on wlan0)
    inactive time:    1450 ms
    rx bytes:    24668671
    rx packets:    114373
    tx bytes:    1606991
    tx packets:    8557
    tx retries:    623
    tx failed:    1425
    signal:      -52 dBm
    signal avg:    -53 dBm
    tx bitrate:    150.0 MBit/s MCS 7 40MHz short GI
    authorized:    yes
    authenticated:    yes
    preamble:    long
    WMM/WME:    yes
    MFP:        no
    TDLS peer:    no

4、激活内核接口

# ip link set wlan0 up

如果出现错误 RTNETLINK answers: Operation not possible due to RF-kill, 请确保硬件开关已经打开。参阅 #Rfkill 警告

要验证接口确实打开

# ip link show wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 12:34:56:78:9a:bc brd ff:ff:ff:ff:ff:ff

<BROADCAST,MULTICAST,UP,LOWER_UP> 中的UP 显示接口已经打开

参考链接:https://wiki.archlinux.org/index.php/Wireless_network_configuration_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

版权声明:本文为flymeng原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/flymeng/p/7215922.html