“无法在‘USBDevice’上执行‘打开’:访问被拒绝。”

问题描述 投票:0回答:2

Windows 8

我尝试了 Wemos D1 R32 和 ESP32 UWB,但无法使用 WEBUSB 打开设备

我的代码是

document.getElementById('getDevices').addEventListener('click', (event) => {
      navigator.usb.requestDevice({
        filters: []
      }).then(function (device) {
        console.log(device);
        return device.open(); // Begin
      })
      .catch(error => {
        console.error(error);
     });
});

设备出现,然后选择时出现错误

DOMException: Failed to execute 'open' on 'USBDevice': Access denied.

当前正在使用“Silicon Labs CP210x USB to UART Bridge”设备驱动程序。

我按照这个问题的说明进行操作,但是当我更新设备驱动程序软件以指向this inf文件时,我收到消息

---------------------------
Select Device
---------------------------
The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems.
google-chrome esp32 webusb
2个回答
3
投票

不要尝试使用 WebUSB API,因为您的系统已经安装了正确的 UART 驱动程序,请尝试使用 Web Serial API


0
投票

使用zadig软件:

  1. https://zadig.akeo.ie
  2. 下载 zadig
  3. 转到选项并选择列出所有设备
  4. 选择您的设备
  5. 更换驱动程序
  6. 完成
© www.soinside.com 2019 - 2024. All rights reserved.