尝试使用 Kubuntu 20.04 安装 USB WiFi 设备

尝试使用 Kubuntu 20.04 安装 USB WiFi 设备

当我按照 README 文件中的说明进行操作时,出现以下错误:

/home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/osdep_service_linux.h:295:8: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
  295 |  ptimer->data = (unsigned long)cntx;
      |        ^~
/home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/osdep_service_linux.h:296:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
  296 |  init_timer(ptimer);
      |  ^~~~~~~~~~
      |  _init_timer
In file included from /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/drv_types.h:35,
                 from /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/core/rtw_cmd.c:22:
/home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/wifi.h: At top level:
/home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 1019 | #define IEEE80211_MAX_AMPDU_BUF 0x40
      | 
In file included from /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/osdep_service_linux.h:86,
                 from /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/osdep_service.h:47,
                 from /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/include/drv_types.h:32,
                 from /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/core/rtw_cmd.c:22:
./include/linux/ieee80211.h:1460: note: this is the location of the previous definition
 1460 | #define IEEE80211_MAX_AMPDU_BUF  0x100
      | 
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1760: /home/glenn/SM8811CU-V2.0/linux/WiFi/RTL8821CU_WiFi_linux_v5.2.5.1_22211_COEX20170310-1212.20170517/driver/rtl8821CU_WiFi_linux_v5.2.5.1_22211.20170517_COEX20170310-1212] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-73-generic'
make: *** [Makefile:1893: modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

它在以太网上可以工作,但不能用这个特定的 USB wifi 适配器。我应该指出的是,这个设备在 Microsoft Windows 上可以毫无问题地工作。

如果我运行“lsusb”,我会得到:

Bus 002 Device 003: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 004: ID 413c:2006 Dell Computer Corp. 
Bus 001 Device 003: ID 413c:1004 Dell Computer Corp. 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

我相信我的设备在列表中排在第二位。最上面的是朋友的设备,我正在使用它,这样我就可以通过笔记本电脑连接并尝试弄清楚发生了什么。

有什么想法我下一步应该尝试什么吗?

答案1

请打开终端并执行:

sudo apt update
sudo apt install -y git dkms
git clone https://github.com/morrownr/8821cu.git
cd 8821cu
sudo ./install-driver.sh

移除两个 USB 无线设备;重新插入 c811。您的无线设备现在应该可以正常工作了。

相关内容