LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-20-2004, 07:44 AM   #1
rrodrigues
LQ Newbie
 
Registered: Jul 2004
Distribution: 2.6.5
Posts: 3

Rep: Reputation: 0
Send data to the keyboard buffer


Hi,
i need to write a program in c to read data from serial port and send it into keyboard output buffer, that is I want to emulate a keyboard reciving the data from the serial port. I know how to read/write to the serial port but I do not know how I can send data to the keyboard buffer. Can anyone help me?

Thanks for your time,
Rui Rodrigues
 
Old 07-20-2004, 08:12 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 110Reputation: 110
Why not just use console-over-serial-port as provided by the kernel?
 
Old 07-20-2004, 08:17 AM   #3
rrodrigues
LQ Newbie
 
Registered: Jul 2004
Distribution: 2.6.5
Posts: 3

Original Poster
Rep: Reputation: 0
How does console_over_serial_port works? With this, does the keyboard work with any apllication?
 
Old 07-20-2004, 08:57 AM   #4
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
Maybe you can redirect stdin: my_prog < /dev/com_port_device

Last edited by itsme86; 07-20-2004 at 08:59 AM.
 
Old 07-20-2004, 09:04 AM   #5
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 110Reputation: 110
Quote:
Originally posted by rrodrigues
How does console_over_serial_port works? With this, does the keyboard work with any apllication?
You get a text-mode console over the serial port (the historical UNIX way of having a terminal). So I guess it would not work with frambuffer or X apps.
 
Old 07-20-2004, 09:26 AM   #6
rrodrigues
LQ Newbie
 
Registered: Jul 2004
Distribution: 2.6.5
Posts: 3

Original Poster
Rep: Reputation: 0
May be I did not explain my problem clearly... Sorry my fault...
What I want to do is control a set-to-box that has no keyboard via serial link. But I want to do eveything I want in the set top box (write mail in KMail or something else) like I was with a keyboard plugged in the set top box. I hope that with this explanation you wiil understand better my problem. Sorry for the english...
Now I am trying to write directly to the keyboard register with "outb". Has anyone of you work with that before?

Thanks.
 
  


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
compressing data to be later uncompressed and written to a buffer in knoppix dr_zayus69 Linux - Distributions 0 05-26-2005 09:14 AM
Data buffer size MarcReing Programming 7 10-21-2004 12:51 PM
Keyboard output buffer Majestros Linux - Hardware 0 07-06-2004 09:01 AM
getting ENOBUFS while trying to send data arb Programming 0 09-19-2003 06:52 AM
Send Receive Buffer in Linux? defa0009 Linux - General 6 06-21-2003 04:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:25 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration