5 ms·
I'm curious how an RFID reader works in a "not clunky" way since the application is delivered via a web browser. I'm assuming the RFID reader is just showing u
by tyingq 5y ago
I'm curious how an RFID reader works in a "not clunky" way since the application is delivered via a web browser. I'm assuming the RFID reader is just showing up as a virtual keyboard in this kind of setup.
Do the employees have to click on a form field before swiping their badge, etc?
Or maybe there's something like the RFID reader sending an unusual keycode that an event handler in the browser can wait for?
- zeusk 5y agoMy university had this, and you're right. When I tap the ID card, it would just blurt out my uni ID number in whichever field had the focus.
- northwest65 5y agohttps://www.easytechjunkie.com/what-is-a-keyboard-wedge.htm https://www.easytechjunkie.com/what-is-a-keyboard-wedge.htm
- nkellenicki 5y agoFocus can be set automatically in the desired field using Javascript, and tricks can be done to hide that field too - ie. set opacity so it's transparent, etc. You can make it work pretty smoothly for the end user. Some of the original Yubikeys worked this way, and there are some barcode scanners out there that emulate keyboards too. I've seen some web based implementations go to great lengths to hide this fact.
- extra88 5y agoFocus can also be set automatically on page load by adding the HTML ‘autofocus’ attribute to the input field.
- tyingq 5y agoStill sounds a bit clunky, as you would have people in line, and the page would need to smoothly be ready for the next person, deal with double-scans of the card, etc. I'd certainly prefer something like un-typeable keycodes to listen for as start/end markers.
- kelnos 5y ago> deal with double-scans of the card, Presumably you know the length of the string generated by the barcode reader, so you just set the max length of the text field to that length, and/or ignore anything longer via JS.
- lizard 5y ago> I'm assuming the RFID reader is just showing up as a virtual keyboard in this kind of setup. I'm not affiliated with this project but built a few variations of the same thing several years ago. Essentially, yes, you can configure these scanners in a keyboard mode such that they type the student id with a return. Just set up a simple form with focus on a text field, and reset after each submission. One iteration I worked on used some other groups web form that wasn't design with this case. I just set up my Pis to automatically launch Firefox on boot, and wrote user script to browse the site and launch the form. This was all built into the image so if anything ever went wrong, just write the image to a new SD card and reboot. You can set up the scanners as to scan cards passively as well, but (the way I did it anyways) they won't decode the id when configured this way. Or maybe it was just more fun to reverse engineer it.
- mark-r 5y agoIf there's an unusual keycode you need to start the process, maybe you could encode it into the start of the RFID string on the tag. Or maybe RFID readers are configurable like the barcode scanners I've worked with and you can program them to emit the keycode as a prefix.
- daniellarusso 5y agoSo, most barcode scanners operate in ‘wedge’ mode. This may be true for RFID scanners, as well. They emulate a keyboard and some have pass-through ports, for PS/2 keyboard interfaces. For more ‘custom’ solutions, some also have serial interfaces, so they can be programmatically controlled to scan and read based on the logic you implement.