Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

browser

usb

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

Please advice

P.S. Does it possible with minimal dependencies? If not, the whole point of browser-based software is useless (in my case)

like image 579
Dan Sosedoff Avatar asked Jan 26 '10 21:01

Dan Sosedoff


People also ask

Can a website access USB?

The website can clean up permissions to access a USB device it no longer needs by calling forget() on the USBDevice instance. For example, for an educational web application used on a shared computer with many devices, a large number of accumulated user-generated permissions creates a poor user experience.

How do I access my USB over the Internet?

Quick Instruction. Download USB over Network. Install USB over Network Server on the computer to which USB devices are connected. Install USB over Network Client on the computers, from which access to remote USB devices is needed.


2 Answers

Google chrome offers a javascript USB device interface but this is chrome specific.

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

Not sure what you would do on other browsers.

like image 99
user2474942 Avatar answered Nov 01 '22 17:11

user2474942


If your CC and barcode scanners work as HID devices (basically, keyboard emulation), yes you can, and I have seen it done. If they're more complicated than that, it depends, the system is going to require drivers for the device and it is then OS dependant. But, for example, there are smartcard readers that will hook the card into the system's certificate framework for authentication.

You're not going to be able to use a chipped credit card with that sort of reader, however, since the protocol for those requires bidirectional communication with the card. I think there may be a way to talk to a proper point of sale CC terminal over USB, but that will most likely require drivers.

like image 39
Andrew McGregor Avatar answered Nov 01 '22 16:11

Andrew McGregor