Ubuntu 18.04 - Tp Link 加密狗 - 连接网络失败(型号 TL-WN821N)

Ubuntu 18.04 - Tp Link 加密狗 - 连接网络失败(型号 TL-WN821N)

我在 PC 上使用全新安装的 Ubuntu 18.04,它主要使用有线网络,但有时也需要 wifi 连接。为此,我使用 wifi 加密狗 - 在双启动 Windows 时工作正常,但在使用 Ubuntu 时:它确实可以检测到家中的网络 - 但不连接任何网络。

TP-Links 网站提供了驱动程序安装说明,其中包含详细的安装说明链接至 TP-LINK 驱动程序,一开始就失败了,如下面的 ATTCH #1 所示。

第二次尝试:参考几乎完全相同的问题发布但再次失败make

感谢您的帮助

盖伊

附件#1

guy@desktop:~/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047$ make clean
#make -C /lib/modules/4.15.0-20-generic/build M=/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047 clean
cd hal ; rm -fr */*/*/*.mod.c */*/*/*.mod */*/*/*.o */*/*/.*.cmd */*/*/*.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
guy@desktop:~/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047$ ma
ma: command not found
guy@desktop:~/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-20-generic/build M=/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047  modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o
In file included from /home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service.h:47:0,
                 from /home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/drv_types.h:27,
                 from /home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.c:17:
/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h:299:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
  ptimer->data = (unsigned long)cntx;
        ^~
/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/include/osdep_service_linux.h:300:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
  init_timer(ptimer);
  ^~~~~~~~~~
  _init_timer
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o' failed
make[2]: *** [/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047/core/rtw_cmd.o] Error 1
Makefile:1552: recipe for target '_module_/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047' failed
make[1]: *** [_module_/home/guy/Downloads/rtl8192EU_WiFi_linux_v5.2.19.1_25633.20171222_COEX20171113-0047] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:1828: recipe for target 'modules' failed
make: *** [modules] Error 2

答案1

在最新的内核中,某些功能已经过时,因此原始驱动程序需要根据新内核进行修改。从以下链接下载 tp 链接驱动程序。

https://github.com/ZeeRooo/RTL8192EU

转到驱动程序文件夹并运行以下命令。

# apt update
# apt-get install gcc make libelf-dev
# make
# make install

移除 wifi usb 加密狗并重启系统。安装 wifi 模块

# modprobe 8192eu

现在插入 wifi 加密狗并测试。我已在 ubuntu 18.04 和 Arch linux 上进行了测试。

相关内容