2

Windows 8

I have tried both a Wemos D1 R32 and a ESP32 UWB, but I can't open a device using WEBUSB

My code is

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);
     });
});

The device appears and then when selected the error is

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

It is currently using the "Silicon Labs CP210x USB to UART Bridge" device driver.

I followed the instructions on this question but when I update the device driver software to point at this inf file I get the message

---------------------------
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.
CarbonMan
  • 4,350
  • 12
  • 54
  • 75

2 Answers2

2

Rather than trying to use the WebUSB API, since your system already has the right UART driver installed, try using the Web Serial API.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
Reilly Grant
  • 5,590
  • 1
  • 13
  • 23
0

use this software zadig
go to this link : https://zadig.akeo.ie
step-1 : download zadig
step-2 : go to options and select list all devices
step-3 : select your device
step-4 : replace driver
step-5 : done
  • You should add explanation. – Super Kai - Kazuya Ito Jun 16 '23 at 13:49
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 20 '23 at 13:40