Reputation: 31
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)?
Upvotes: 3
Views: 2054
Reputation: 6083
Chrome does not officially support the libusb0 or libusbK drivers, only the WinUSB driver that is included with Windows.
Upvotes: 2