Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebUSB and driver for Windows

I want to use WebUSB with libusbK on Windows.

It looks like WebUSB works with WinUSB driver only. I couldn't make it work with libusbK.
I searched for a detailed paper but couldn't find anything.
I don't see any information about this at https://wicg.github.io/webusb/

Is it possible to use WebUSB with libusbK on Windows?

I have FTDI FT232H chip and I use libusbK driver for it.
Below is the code

<!DOCTYPE html>
<html>
<body>

<button type="button" id="request-device">click me to list connected usb devices</button>

<script>
'use strict';

let button = document.getElementById('request-device');
button.addEventListener('click', async () => {
  let device;
  let e;
  let filters;

  await navigator.usb.requestDevice({filters: []})
    .then(device => {
      console.log("vendorId:" + device.vendorId.toString(16) + 
         " productId:" + device.productId.toString(16));
    })
    .catch(e => {
      console.log("There is no device. " + e);
    });
});

</script>

</body>
</html>

Chrome opens a popup window with nonexistent devices but my device is not on the list. I re-installed driver to WinUSb by Zadig. Reboot computer. Start my code. And I see my device in the list.

Does WebUSB work with WinUSB drivers only (on Windows)?

like image 241
zlyh Avatar asked Feb 01 '26 18:02

zlyh


1 Answers

Chrome does not officially support the libusb0 or libusbK drivers, only the WinUSB driver that is included with Windows.

like image 200
Reilly Grant Avatar answered Feb 03 '26 09:02

Reilly Grant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!