Answer the question
In order to leave comments, you need to log in
How to read a barcode scanner device?
The problem is reading the /dev/hidraw1 device, a barcode scanner is connected to the server, the device is detected, but when scanning, the code is simply entered into the terminal window, as I wrote from the keyboard, but I should read it and send it to the thread (file, script).
so that it doesn’t interfere with what it spits out, I cut through ssh and try to read the device read /dev/hidraw1
, it doesn’t display anything, it spits out an unreadable cat /dev/hidraw1
format like"$ ( "" ( "$$ ) "
Answer the question
In order to leave comments, you need to log in
showkey -s
only works for 10 seconds -
cat /dev/console
runs all the time
As a rule, scanners work in a keyboard break (text input). You can throw a script that will intercept input
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question