wlan0 接口丢失

wlan0 接口丢失

我正在尝试在运行 debian buster 的 DE10 nano 板上获取 WIFI 访问权限。内核版本为 5.10.50-lts。我使用的wifi设备是RT5370芯片组。问题是 wlan0 设备在ifconfig -a.输出如下所示:

ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::4043:34ff:fe2e:f5bb  prefixlen 64  scopeid 0x20<link>
        ether 42:43:34:2e:f5:bb  txqueuelen 1000  (Ethernet)
        RX packets 168  bytes 22755 (22.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 247  bytes 64167 (62.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 39  base 0xa000

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 1000  (Local Loopback)
        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

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 1000  (IPv6-in-IPv4)
        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

感兴趣的内核模块是rt2800usb并被加载。命令lsmod如下所示:

Module                  Size  Used by
rt2800usb              28672  0
rt2800lib             110592  1 rt2800usb
crc_ccitt              16384  1 rt2800lib
rt2x00usb              20480  1 rt2800usb
rt2x00lib              49152  3 rt2800lib,rt2800usb,rt2x00usb
rtl8188ee             106496  0
rtl_pci                32768  1 rtl8188ee
rtlwifi                94208  2 rtl_pci,rtl8188ee
mac80211              626688  6 rt2800lib,rtl_pci,rt2x00lib,rt2x00usb,rtl8188ee,rtlwifi
libarc4                16384  1 mac80211
cfg80211              602112  3 rt2x00lib,mac80211,rtlwifi

我可以看到我的 USB wifi 设备确实已使用命令插入lsusb,输出如下所示:

Bus 001 Device 002: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/lib/firmware在我已经安装的 iwlwifi 固件安装目录中。

该命令的lshw -c network结果是:

  *-network
       description: Ethernet interface
       physical id: 2
       logical name: eth0
       serial: 42:43:34:2e:f5:bb
       size: 100Mbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=st_gmac driverversion=Jan_2016 duplex=full link=yes multicast=yes port=twisted pair speed=100Mbit/s

该命令lspci不返回任何结果。

该命令rfkill list返回:

rfkill: cannot open /dev/rfkill: No such file or directory
rfkill: cannot read /dev/rfkill: Bad file descriptor

该命令iwconfig返回:

lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

该命令ifconfig wlan0 up返回:

wlan0: ERROR while getting interface flags: No such device

我从中dmesg发现了一个可能感兴趣的部分:

[  262.173356] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  262.204790] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  262.330974] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[  309.244598] usbcore: registered new interface driver rt2800usb

谁能帮我解决这个问题?如果需要任何其他信息,请告诉我。谢谢

答案1

我下载了名为rtl8188eu 来自 GitHub

make all我按照主机上的说明进行了交叉编译,将生成的8188eu.ko文件带到了我的开发机器上并安装了它:

install -p -m 644 8188eu.ko /lib/modules/5.10.50zImage/kernel/drivers/staging/r8188eu/

然后我运行命令:

depmod -a 5.10.50zImage
modprobe 8188eu

之后,ifconfig归还我的wlan0设备,我可以 ping google.com,所以现在一切正常。

注意:您可能需要编辑 Makefile 并重新配置交叉编译器和指向内核源代码的变量,就像我所做的那样。

相关内容