[CentOS] OT: a USB barcode scanner?

Sat Dec 10 10:42:59 UTC 2016
Jos Vos <jos at xos.nl>


On Fri, Dec 09, 2016 at 04:02:50PM -0500, m.roth at 5-cent.us wrote:

>    I'm about to go googling, but thought I'd ask here if anyone's using a
> barcode scanner with CentOS, and if so, a) what scanner are you using,
> and b) what, if any, software are you using to record what it scans?

Most USB barcode scanners can operate in so called keyboard wedge mode
(either implicitly or explicitly via some physical switch).  In that
case, you'll just see the scanned codes as keyboard input.

I did not yet dig into how I can isolate this scanner input, so that
it is only read by one specific process (e.g. after identifying the
USB device).  I think this is a pure Linux-related question, it is
unrelated to the scanners (just as if you would attach 2 keyboards).
If you have a recipe for that, just let me know ;-).

One of the scanners I tried is this cheap scanner from dx.com:


It just works out-of-the-box when connected to a Linux-system.
Start "cat" and you'll see the scanned codes.

--    Jos Vos <jos at xos.nl>
--    X/OS Experts in Open Systems BV   |   Office: +31 20 6938364
--    Amsterdam, The Netherlands        |   Mobile: +31 6 26216181