MagTek Swipe Card Reader Not Working In Electron Browser

I am using this project to provide Kiosks on our campus

However, for some reason, a browser application I am working on does not seem to recognize input from my magstripe reader. Of course, this works without any issue from my PC in Chrome, Firefox, etc. The device recognizes the device properly, as seen below. I have electron browser opened up with Developer Tools and all my other Jquery function without issue, but the jquery for the swipe reader does not work. It does not even output the console.log. It is like the hardware device is not being recognized by electron. I would greatly appreciate any assistance to troubleshoot this issue.

# lsusb
Bus 001 Device 005: ID 0801:0001 MagTek Mini Swipe Reader (Keyboard Emulation)


Can you please paste here the output of lsusb on your resin device in the host OS?

Already did above for the relevant entry, but here is the entire output. Thank you.

# lsusb
Bus 001 Device 005: ID 0801:0001 MagTek Mini Swipe Reader (Keyboard Emulation)
Bus 001 Device 006: ID 05ac:0220 Apple, Inc. Aluminum Keyboard (ANSI)
Bus 001 Device 004: ID 0557:8021 ATEN International Co., Ltd
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Sorry it wasn’t clear if the output of lsusb in your first post was from the resin device or your PC.
Does anything happen in the host OS shell when you swipe a card?
How is it supposed to work? Did you install anything specific on your PC?

Nothing is installed. Is is an entirely web-based “program” written in PHP, Javascript/Jquery. I have only tested this on my PC in a browser. I am installing Node on my PC now to open the eltron program that way to see if it gives me more information.

I think the problem I am having is that electron uses webview, somewhat like an iframe, and does actually access the webpage directly (so to speak). Can someone point me to a project that uses chromium-browser in a kiosk. I saw one once upon a time but cant seem to find it again.

Hi there,

Could you verify that the swipe reader you’re using is fully supported at least on Linux? If so, you could check if there are any additional packages you need to make it work properly

@rpelletier not sure if you have got further with this issue, but I thought since the card reader is a HID keyboard emulation device, this project might give some way forward as you could capture events from the devices