所以我买了这个设备(DWA171 revC)但是manuf。似乎太聪明了,在设备中插入了一个记忆棒控制器来存储 Windows 驱动程序。
我已经从这里编译并修改了驱动程序https://github.com/diederikdehaas/rtl8812AU一切似乎都很好,但我仍然只在 dmesg 中显示记忆棒
供应商和产品 ID 似乎是 wifi 模块,但它写的是“产品:磁盘”。
Edit1 - 附加信息
<username>@<username>-MS-7A70:~$ sudo dpkg -s usb-modeswitch
[sudo] password for <username>:
Package: usb-modeswitch
Status: install ok installed
Priority: optional
Section: comm
Installed-Size: 158
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 2.5.2+repack0-2ubuntu1
Depends: libc6 (>= 2.27), libpipeline1 (>= 1.0.0), libusb-1.0-0 (>= 2:1.0.9), usb-modeswitch-data (>= 20140529)
Suggests: comgt, wvdial
Breaks: usb-modeswitch-data (<< 20100127)
Conffiles:
/etc/usb_modeswitch.conf b7f857804762b4a81a71c93a2fe1207f
Description: mode switching tool for controlling "flip flop" USB devices
Several new USB devices have their proprietary Windows drivers onboard,
especially WAN dongles. When plugged in for the first time, they act
like a flash storage and start installing the driver from there. If
the driver is already installed, the storage device vanishes and
a new device, such as an USB modem, shows up. This is called the
"ZeroCD" feature.
.
On Debian, this is not needed, since the driver is included as a
Linux kernel module, such as "usbserial". However, the device still
shows up as "usb-storage" by default. usb-modeswitch solves that
issue by sending the command which actually performs the switching
of the device from "usb-storage" to "usbserial".
.
This package contains the binaries and the brother scripts.
Original-Maintainer: Didier Raboud <odyx@debian.org>
Homepage: http://www.draisberghof.de/usb_modeswitch/
<username>@<username>-MS-7A70:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 0bda:1a2b Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Run Code Online (Sandbox Code Playgroud)
手动运行 usb_modeswitch 后,我现在在 dmesg 中有这个:-
[133898.810951] usb 1-2: USB disconnect, device number 2
[133899.193566] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[133899.341961] usb 1-2: New USB device found, idVendor=2001, idProduct=331d
[133899.341967] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[133899.341971] usb 1-2: Product: DWA-171
[133899.341975] usb 1-2: Manufacturer: D-Link Corporation
[133899.341978] usb 1-2: SerialNumber: 123456
Run Code Online (Sandbox Code Playgroud)
产品 ID 似乎不真实,序列号看起来很粗略。
ip link show 只显示我的以太网和环回设备
谢谢,萨希尔
正确驱动程序8821cu的 whitebatman2 版本并未明确涵盖您的 2001:331d 设备。但是,有一种安装驱动程序的方法。从终端:
sudo apt update
sudo apt install build-essential git dkms
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
chmod +x dkms-install.sh
sudo ./dkms-install.sh
Run Code Online (Sandbox Code Playgroud)
它在我的 5.0.0-23 系统上成功构建,尽管有一些可能无害的警告
接下来,执行:
sudo modprobe 8821cu
Run Code Online (Sandbox Code Playgroud)
您的无线现在应该可以工作了。
无法将D-Link AC600(DWA 171 修订版 C)用作 WiFi USB 的问题,因为它被识别为 USB 闪存(存储 Windows 驱动程序文件)。请注意,这不是关于DWA 171版本一个。
根据Wi-Fi USB 适配器 D-Link DWA-171 的问题:
DWA-171 修订版 C 于 2018 年上市,并在加密狗标签上进行了标记。revA 是一个简单的 wifi 加密狗——安装了正确的 Linux 驱动程序,插入加密狗,你就可以参加比赛了。但 revC 首先枚举为 USB 存储,因此包含一个 Setup.exe 来安装 Windows 驱动程序。
lsusb 将 DWA 171 修订版 C 显示为 Realtek 闪存驱动器。
Bus 003 Device 005: ID 0bda:1a2b Realtek Semiconductor Corp. <----- USB Flash memory mode of DWA 171
Run Code Online (Sandbox Code Playgroud)
根据Automatically use usb_modeswitch for Wifi USB,运行 usb_modeswitch 如下(在 之后,并使用 lsusb 和 ip 命令确认。
$ lsusb
...
Bus 003 Device 005: ID 0bda:1a2b Realtek Semiconductor Corp.
$ /usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b
$ lsusb
...
Bus 003 Device 006: ID 2001:331d D-Link Corp. <--- Changed from Realtek
$ ip link show
...
3: wlx58d56e015102: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 58:d5:6e:01:51:02 brd ff:ff:ff:ff:ff:ff
Run Code Online (Sandbox Code Playgroud)
包含在usb-modeswitch-data 包中的 REFERENCE 文档说 -K 表示弹出设备。
- 标准弹出 <0/1> -K
发送表示 SCSI 命令“ALLOW MEDIUM REMOVAL”和“START STOP UNIT”的特定批量消息序列,基本上是弹出操作。许多调制解调器使用它进行模式切换。可以与一个额外的“MessageContent”结合使用
将 D-Link AC 600(DWA 171 修订版 C)用作 USB WiFi。