LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-17-2005, 04:11 AM   #1
goestin
Member
 
Registered: Nov 2004
Location: Netherlands (east)
Distribution: debian, suse, novell linux desktop
Posts: 81

Rep: Reputation: 15
redirecting /dev/ttyS0 -> stdin


Hi all,
i've got a little problem with a barcode scanner.
the barcode scanner is connected to /dev/ttyS0 and if i say:
Code:
cat /dev/ttyS0
i see a good output of a barcode.

now my question is, how do i redirect it to the stdin in that way, that it will be handled the exactly same way as a keyboard (yes, even in X)

EDIT:
maybe it is possible only in X if i could manage to create an InputDevice for it? (i don't need to work with it in the shell)

i hope you can help.

-cheers-

Last edited by goestin; 05-17-2005 at 05:12 AM.
 
Old 05-17-2005, 09:43 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Hmmm... not clear what you are trying to do here - cat will send the input to stdout (terminal screen) and this is what happens to anything from stdin too. Anywhere stdin can co, cat can send it... so what was the question?

(I suspect you are trying to do something that has a more common approach to it.)
 
Old 10-26-2011, 12:34 PM   #3
neo571
Member
 
Registered: Jan 2006
Location: Italy
Distribution: Mandriva
Posts: 41

Rep: Reputation: 15
I think that goestin want to redirect all input that come from /dev/ttyS0 to the STDIN as the input of the keyboard, so he want to have something as keyboard emulator...
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
redirecting stdin in bash script artur Programming 3 12-09-2011 07:07 AM
how and by what is /dev/ttyS0 made? dansawyer Linux - Software 10 10-26-2005 06:51 AM
after redirecting stdin still need to read data from keyboard vrikers Programming 4 10-31-2004 07:11 AM
redirecting stdin and stdout with pipes: convincing apps they're for a terminal? prell Programming 1 09-02-2004 07:38 AM
chmod g+w /dev/ttyS0 jISV Linux - General 4 04-13-2002 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration