WebUSB and RFID readers - google-chrome

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.

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?

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

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.

How Google Chrome extension check if a specific app installed on the client machine or not?

i want to know if it is possible for google chrome extension to check if there is already a native app installed on the client machine or not
So we established that you control both the extension and the native app.
Note that the extension cannot access the filesystem to check for existence of files; presumably, you also want to detect the presence of the app even if it's not running, and ideally be able to launch it if it isn't.
The best way to check that the app is installed is to provide a Native Messaging host in the app. The installer would then add a registry key to let Chrome know that the native host is present, and you can connect to it.
Now, there are some considerations:
You can't check the presence of the native host without trying to launch it.
The process launched that way lives only as long as its communication port is opened in the extension.
The communication channel between the extension and the app is the STDIO.
It would not be wise to just declare your main Windows Forms app as the native host. You should write a separate utility app that can communicate according to the Native Messaging protocol (even if to just answer "I'm here"). If needed, it can launch the main app and/or communicate with it as needed using other channels. You could also just launch the main app from your native host and then communicate with it using WebSockets.

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?

USB Token for autentication in website form

I have a website with HTML login form I want to use USB device as token to login into my website.
How can I use USB device for authentication and login via USB flash memory.
Is it possible to copy something like certificate on USB and when I connect it to my computer its automatically log into Website.
Thank you
Have a look at the yubikey, a good and inexpensive usb-token (http://www.yubico.com/yubikey).
Yubikeys register als usb keyboard, and because of that work on every system (that support usb keyboards) without the installation of any device drivers.
You can find many examples online how to use their one-time-key authentification service with php, ruby-on-rails or whatever language you use for your webpage.
If your system isn't connected to the internet you can still use the static key that the yubikey also can generate.