概述

概述

所以我买了这个设备(DWA171 revC),但制造商似乎太聪明了,在设备中插入了一个记忆棒控制器来存储 Windows 驱动程序。

我已经从这里编译并 modprobe 了驱动程序https://github.com/diederikdehaas/rtl8812AU一切似乎都很好,但我仍然只在 dmesg 中看到记忆棒

供应商和产品 ID 似乎是 wifi 模块,但写的是“产品:DISK”。

编辑1-附加信息

<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 <[email protected]>
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 <[email protected]>
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

手动运行 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

产品 ID 似乎不正确,并且序列号看起来也不太可靠。

ip link show仅显示我的以太网和环回设备

谢谢,萨希尔

答案1

whitebatman2 版本正确的驱动程序8821立方英尺,没有明确涵盖您的 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

在我的 5.0.0-23 系统上,它成功构建,尽管出现了一些可能无害的警告

接下来,执行以下操作:

sudo modprobe 8821cu

你的无线网络现在应该可以正常工作了。

答案2

概述

无法使用的问题D-Link AC600(DWA 171 修订版 C)因为它被识别为 USB 闪存(存储 Windows 驱动程序文件)。请注意,这是不是关于DWA 171 修订版A

原因

按照Wi-Fi USB 适配器 D-Link DWA-171 出现问题

DWA-171 修订版 C 于 2018 年上市,并在加密狗标签上标明。revA 是一款简单的 WiFi 加密狗 - 安装了正确的 Linux 驱动程序后,插入加密狗即可开始比赛。但 revC 首先枚举为 USB 存储,因此包含一个 Setup.exe 来安装 Windows 驱动程序。

lsusb 显示 DWA 171 Revision C 为 Realtek 闪存驱动器。

Bus 003 Device 005: ID 0bda:1a2b Realtek Semiconductor Corp.    <----- USB Flash memory mode of DWA 171

解决方案

按照自动对 Wifi USB 使用 usb_modeswitch,运行 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

解释

参考文档包含在usb-modeswitch-data 包说-K表示弹出设备。

  • 标准弹出<0/1> -K

发送代表 SCSI 命令“ALLOW MEDIUM REMOVAL”和“START STOP UNIT”的特定批量消息序列,基本上是一种弹出操作。许多调制解调器都使用它来进行模式切换。可以与一个附加的“MessageContent”结合使用

结论

将 D-Link AC 600(DWA 171 Revision C)用作 USB WiFi。

  1. 编译、安装并加载 8821cu 模块(不是 8821au)。
  2. 使用 lsmod 验证模块是否已加载。
  3. 使用 usb_modeswitch -K 弹出 USB 闪存驱动器。
  4. 使用 lsusb 验证 USB WiFi D-Link 是否显示。

参考

答案3

D-Link 网站上的官方 Linux 驱动程序直接链接到撰写本文时的最新修订版(以防支持页面发生变化),它既处理与 realtek 芯片组的通信,也处理自动模式切换。

相关内容