home | list info | list archive | date index | thread index

Re: how to limit HID qr scanners

On 2020-04-13 10:10, Peter Sjöberg wrote:

> How can I prevent some generic qr scanners from sending anything else
> than [A-Za-z0-9] while still allowing a normal keyboard to be connected
> by some tech servicing the machine?

You can't easily.  One way I can think to do it would be to have some
embedded device in the middle that acts as a USB host to the QR
scanner, and a USB device to the real PC, and then filters what the
scanner can send.  You could, for example, put a recent Raspberry Pi 4
in between the scanner and the PC.  Accept input from the scanner,
filter it, and then use Linux's USB gadget framework to talk to the
PC.

https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/

You might be able to do it without another device if you can detach the
QR scanner from being handled by the kernel, and handle it yourself
with libusb, but that might not be so easy because then you somehow
have to re-inject the keyboard events into the input system.

Regards,

Dianne.

To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org

replies

references

message navigation