LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-03-2013, 07:15 PM   #1
markerikson
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Rep: Reputation: Disabled
Simulating input from a serial port


I work with cash registers that are bare-boned RedHat Linux boxes. These registers have a scanner attached to a serial port (ttyS2).

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/ttyS2

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.
 
Old 03-03-2013, 08:35 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
What about hardware? You can easily make a serial port loopback device (connect TX to RX), plug it into the serial port, and then anything you echo out the serial line would be immediately returned.
 
Old 03-03-2013, 08:46 PM   #3
markerikson
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MS3FGX View Post
What about hardware? You can easily make a serial port loopback device (connect TX to RX), plug it into the serial port, and then anything you echo out the serial line would be immediately returned.
Unfortunately, the whole point of this exercise is to remove the need for anything to be done physically at the cash register. The idea is to be able to ssh into the register remotely and perform test scans without actually using the scanner.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial port problem: ttyS1 input/output error. ted_chou12 Linux - Software 2 02-08-2013 04:26 PM
Serial Port Input and out buffer embeduser Programming 4 06-04-2012 12:57 PM
Creating a bash script with serial port input Elv13 Linux - Hardware 10 06-08-2010 07:01 AM
[SOLVED] Serial port input/output error john_erlandsson Linux - Newbie 9 07-27-2009 08:47 AM
How to Redirect serial port input to a file Legaviu Linux - General 1 07-31-2001 07:23 PM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration