I work with cash registers that are bare-boned RedHat Linux boxes. These registers have a scanner attached to a serial port (ttyS0
).
We do a lot of testing that requires someone to stand at the register and swipe products across the scanner. I'm trying to figure out a way to remove the person from the equation.
Is there an easy way to simulate input FROM the serial port?
Obviously, sending information TO the serial port is easy:
echo [whatever] > /dev/ttyS0
but what I'd really love is some sort of bash code where I could type:
echo [barcode number] > (some code that makes the machine think the barcode number is coming from the serial port)
Is this possible?
I'm also restricted in what I can actually put on the register. I can't install any new utilities onto the machine. I can put bash
scripts on there, but that's about it.