在 openSUSE-Leap-15.3-DVD-x86_64 下安装 USB 无线网卡驱动 rtl88x2bu

在 openSUSE-Leap-15.3-DVD-x86_64 下安装 USB 无线网卡驱动 rtl88x2bu

台式机电脑已经安装 openSUSE-Leap-15.3-DVD-x86_64 和 KDE 桌面,USB 无线网卡为翼联 EP-AC1610,已经得知驱动模块名称为 rtl88x2bu,当前 openSUSE-Leap-15.3 是不可以上网的,将 USB 无线网卡插入主机后端
localhost:~ # lsusb
Bus 002 Device 002: ID 0bda:b812 Realtek Semiconductor Corp. RTL88x2bu [AC1200 Techkey]

一、让台式机电脑使用手机流量上网
安卓手机用数据线连接主机背后的 USB 接口——手机选择仅充电——设置——网络和互联网——热点和网络共享——USB 网络共享
此时 openSUSE-Leap-15.3 打开 Firefox 浏览器是能够正常上网
localhost:~ # lsusb
Bus 002 Device 006: ID 19d2:1365 ZTE WCDMA Technologies MSM ZTE A7010

二、到 openSUSE 官网下载驱动 rtl88x2bu
打开 https://software.openSUSE.org/——版本选择 openSUSE Leap 15.3——关键字输入 rtl88x2bu——单击右边的搜索
看到 rtl88x2bu Kernel driver for Realtek 88x2bu Wi-Fi cards——单击查看——单击 openSUSE Leap 15.3 下边的显示社区软件包——Expert Download——单击右边 SUSE Linux Enterprise 图标——添加软件源并手动安装——复制那三条命令到记事本
zypper addrepo https://download.opensuse.org/repositories/home:MasterPatricko:branches:hardware/15.3/home:MasterPatricko:branches:hardware.repo
zypper refresh
zypper install rtl88x2bu


三、安装驱动 rtl88x2bu
屏幕左下角 SUSE 图标——应用——系统——konsole 终端——切换到 root 用户——按顺序逐条复制粘贴命令并回车执行
ruhong@localhost:~> su -l root
密码:
localhost:~ # zypper addrepo https://download.opensuse.org/repositories/home:MasterPatricko:branches:hardware/15.3/home:MasterPatricko:branches:hardware.repo
localhost:~ # zypper refresh
localhost:~ # zypper install rtl88x2bu

Loading repository data…
Reading installed packages…
Resolving package dependencies…

The following 2 NEW packages are going to be installed:
rtl88x2bu rtl88x2bu-kmp-default

2 new packages to install.
Overall download size: 0 B. Already cached: 12.2 MiB. After the operation, additional 104.1 MiB will be used.
Continue? [y/n/v/…? shows all options] (y):
In cache rtl88x2bu-5.8.7.1+git20210928.f2bccb9-lp153.7.1.x86_64.rpm (1/2), 14.0 KiB ( 17.7 KiB unpacked)
In cache rtl88x2bu-kmp-default-5.8.7.1+git20210928.f2bccb9_k5.3.18_57-lp153.7.1.x86_64.rpm
(2/2), 12.2 MiB (104.1 MiB unpacked)

Checking for file conflicts: …[done]
(1/2) Installing: rtl88x2bu-5.8.7.1+git20210928.f2bccb9-lp153.7.1.x86_64 …[done]
(2/2) Installing: rtl88x2bu-kmp-default-5.8.7.1+git20210928.f2bccb9_k5.3.18_57-lp153.7.1.x86_64 …[done]
Executing %posttrans scripts …[done]

四、连接安卓手机便携式热点
安卓手机——设置——网络和互联网——热点和网络共享——WLAN 热点——开启
重启台式机电脑——单击右下角的 Wi-Fi 图标——单击手机热点右边的连接——输入密码——测试能否正常上网

五、后记:之前踩过的坑
https://github.com/cilynx/rtl88x2bu 下载驱动源代码 rtl88x2bu-5.6.1_30362.20181109_COEX20180928-6a6a.zip,在 openSUSE-Leap-15.2 下编译是不会报错的,还是非常顺利正常使用,但在 15.3 下就会报错,在 www.github.comhttps://gitee.com/试过几个驱动源代码都是同样报错
/root/rtl88x2bu-5.6.1.6_35492.20191025_COEX20180928-6a6a/os_dep/linux/ioctl_cfg80211.c:9952:3: error: ‘struct cfg80211_ops’ has no member named ‘mgmt_frame_register’
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
^~~~~~~~~~~~~~~~~~~

最后,很意外发现 suse 软件官网有社区试验版本,希望此文章给遇到同样困难的人参考

3赞