Is there a way to communicate with USB devices from a browser?

Is there a way to communicate with USB devices in a regular browser (FF, Safari, IE8, etc.)? I assume it could be Javascript -> Java bridge or something else.

I ask for advice

PS Is this possible with minimal dependencies? If not, the whole point of browser-based software is useless (in my case)

+9
browser usb
source share
8 answers

If your CC and barcode scanners work as HID devices (basically keyboard emulation), yes you can, and I saw it. If they are more complicated, it depends on this, the system will require drivers for the device, and then it depends on the OS. But, for example, there are smart card readers that will connect the card to the system for authentication.

You will not be able to use a chip credit card with this device, however, since the protocol requires bi-directional communication with the card for them. I think there may be a way to talk to the proper point of sale for the CC terminal via USB, but this will most likely require drivers.

+5
source share

Google chrome offers a javascript USB device interface, but it's chrome.

https://developer.chrome.com/apps/usb

Not sure what you are doing in other browsers.

+7
source share

There are two options.

  • Use the browser plugin executable (Silverlight or Flash) that negotiates with the Windows HID.

or 2. Use a local HTTP server and send a jQuery message to the local HTTP server that communicates with the HID.

+3
source share

An electron can also be useful here, since it is built on a node, it can access HID devices. There is also a good node plugin for accessing HID devices.

+2
source share

There are ways in Silverlight 4 (beta) to do such things, but only for trusted applications and maybe not the way you hope ...

It provides an API for COM automation. This means that you need a drive that provides you with some kind of COM interface, or you need to write something to control the USB port / device yourself.

This article seems like a good example:

http://sblakemore.com/blog/post/Silverlight-4-COM-Automation-e28093-Taking-photos-with-a-DSLR-using-Windows-Image-Acquisition.aspx

+1
source share

I also searched for the answer to this question. Using a signature (naturaSign) to capture a signature.

Silverlight (dead only supported until 2021) ActiveX (works only in IE, you need to change security settings, certificates, etc.) Chrome.USB (only for chrome, does not support C #)

So what's left: Windows Service / Form? (works only in windows, requires installation)

Sigh...

0
source share

Can you suggest me any modules in Javascript on how to communicate HID scanners with brother

0
source share

Why won't the browser-based software point be useless?

The browser โ†’ USB seems like a huge security flaw.

I do not allow the browser to talk to my hard drive, why should it talk to my flash drive?

I do not allow my browser to talk to my built-in webcam; why is it needed for usb webcam?

-8
source share

All Articles