All threads / How do I access a USB device via a Ruby on Rails web app

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I access a USB device via a Ruby on Rails web app

adi asked in Rails

I have a Ruby on Rails web app via which I want to access my smart card reader connected to my PC via a USB.

The idea is to press a button in the web app to initiate read action in the card reader.[I have a ruby script to read the data serially and do what I want].I however want to extend the functionality to the web app,i.e. when the user clicks the read button on the webapp the card details are read via the card reader and displayed in the web page(Ruby on Rails web app). I am not sure on how to go about it. These are some of the "sources" that I have encountered online which might be the possible way:

WebUSB API
chrome.usb
libusb

Anyone who has previously done the same please guide me on how to go about it.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.