Failed to claim interface: Operation not supported or unimplemented on this platform - google-chrome

I'm trying to use a USB Barcode Scanner on Windows 10 in Chrome v73.0.3683.86 via WebUSB.
The scanner is a Honeywell Voyager 1250g.
I can see the device via the device dialog - I can also open it and select a configuration.
However, when I try to claim interface(1) (There are 3 interfaces, but 1 is the bulk transfer) I get the error Failed to claim interface: Operation not supported or unimplemented on this platform in chrome://device-log/.
Is there a way around this, or is this scanner just not usable via WebUSB? Thanks!

Have you tried connecting to this device using WebUSB on other platforms? Windows has a particular additional requirement for applications (like Chrome) to access USB devices which is that the WinUSB.sys driver must be loaded for the interface.
I've written an article explaining the particular requirements on Windows here: https://developers.google.com/web/fundamentals/native-hardware/build-for-webusb/#windows
If you use the Windows Device Manager you can check which drivers are loaded for your device. If there is no driver loaded then you may be able to write a custom INF file as described in that article to instruct Windows to load the driver you want.

Related

Tried to connect a device to web via webusb but.. Failed to claim interface: Access denied (insufficient permissions)

I am using the webusb API in Google Chrome to try to connect a device to the browser. It worked with webserial API, but I am having trouble getting it to work with webusb API.
I am using HTTPS (Github pages)
I enabled #new-usb-backend for my browser
I can open the device and select configuration, but device.claimInterface(0) is not working (and I can confirm that 0 is an interface number).
None of the two interfaces this device has seems to be claimed
The error I get looking at chrome://device-log is
Failed to claim interface: Access denied (insufficient permissions)
I'm not sure where to go from here. I would appreciate some help.
Thank you.
device.claimInterface(1) worked. I heard somewhere mac automatically claims interfaces. Perhaps the first interface was claimed, although the api indicated otherwise. Anyhow, something about the second interface worked that didn't work in the first.
That error message indicates that there is either an existing driver that has claimed the interface or (Windows only) the WinUSB driver hasn't attached to the interface in order to enable applications like your browser to claim it. On Windows you can use the Zadig tool to force Windows to change the drivers being used for a USB device.
If the device can be opened using the Web Serial API then that indicates that the operating system has already loaded a serial driver for the device and so it has claimed at least some of the device's interfaces.
Why, if the Web Serial API works to connect to your device, are you trying to connect to it with the WebUSB API instead? Are you now on a different operating system which doesn't provide a USB serial driver compatible with the device?

WebUSB and RFID readers

I was wondering if anyone had any experience getting RFID readers to work through WebUSB. The reader I'm using is the https://www.parallax.com/product/28340 .
From what I've read, I'd have to write a driver to read from the device. I was just wondering if anyone has done any work regarding this and what they ended up doing.
The goal here is to read RFID tags without using another application to feed it to the web application.
Thanks!
The USB variant of that RFID reader uses an FTDI FT232R chip to provide a serial-to-USB interface. If the host operating system has a driver for this chip or the FTDI Virtual COM port drivers are installed then the browser will be unable to connect to the device when your application requests it through the WebUSB API because the USB interface presented by the device will already be claimed by the driver.
If you are able to guarantee that the Virtual COM port driver is not loaded then you will be able to write a driver using the WebUSB API to control the device.

WinUSB application on raspberry Pi (win10 IoT)

I want to install and discuss with my own usb device on a raspberry pi with windows iot.
For that, I just create an inf file for arm like WinUSB driver on Windows 10 IoT. The device is recognized by the raspberry (seen on the startup list of connected device). Then I want to discuss with the device.
First, I have tried with the "winusb.dll" but I need to use the library "SetupApi" that does not compile for ARM. (I used this solution on windows PC and communicate correctly with the device).
Do you have an idea on how to communicate correctly with an winusb device on windows iot?
Thanks in advance for your answers.
So, I try to migrate to Windows.device.usb, and I don't succeed in connecting to the device. There there an exception when I call the FromIdAsync() function. It's exactly the same issue as : Can't access USB device in Universal App
There are some fantastic samples that can be found here.
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CustomUsbDeviceAccess
Download all the samples. Check where it creates watchers based on specific devices (there are two samples in there, you'd need to add your own in) the page that displays USB descriptors checks on the device type -- add in a check so that it returns DeviceType.all to see if it can query the descriptors.
I've managed to get it working on Windows 10 desktop, but have failed to craft an INF file that I can use on my IoT device. Once I get that working, I may return.

Does ShareMediaTask Require a Data Connection

I am using the ShareMediaTask in my Windows Phone 8 application, and I am trying to determine the specific capabilities and requirements on a users device. Does a users Data Connection have to be turned on on their device for the ShareMediaTask to successfully send a picture? Also, is it required to have ID_CAP_NETWORKING checked in my application's WMAppManifest for ShareMediaTask to work? Must both of these be on?
What I have is ID_CAP_NETWORKING off in my WMAppManifest, which I do not believe is require for ShareMediaTask, but my device's Data Connection switched to On in the phone settings. Is this correct?
ShareMediaTask does not have any capability requirements for inclusion within your app.
However, for the user to be able to actually share the media they will need to be able to connect to the internet and the selected services. This happens outside of your app though and so your app does not need to declare the networking capability directly.
For reference, the rules of capability requirements are defined in
"C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\Marketplace\Rules.xml"

Using PeerFinder inside local wired network for P2P communication between Windows 8.1 store apps

Is it possible to use PeerFinder for initiating connection between applications in different PCs inside intranet?
I tried ProximityCS (Windows 8.1) sample and PeerFinder.SupportedDiscoveryTypes returns None for me. (Tested with Windows 8.1 Preview)
I have only found samples to connect using NFC or WifiDirect.
Is there any samples of using Infrastructure (TCP/IP) way of connecting?
Is it possible do this manually using Broadcast messages from Windows Store app?
Windows store apps support multicast; from this you can build your discoverability solution. There's a short video how-to about this on the Channel 9 site at http://channel9.msdn.com/posts/Multicast-LAN-Discovery
To send a multicast message in Windows Runtime, just send it to a multicast address. To receive, you just call JoinMulticastGroup and you can start to receive. To increase your code robustness, re-join when you learn about new networks; this will join the multicast group on newly available adapters.
Peerfinder is part of the Windows.Networking.Proxmity namespace which, as you have mentioned, supports only NFC and WifiDirect for communication and data transfer between two applications in different PCs.
Have you tried using StreamSocket so as to emulate a client-server like communication between two applications?