For reading the input of the serial port you can use this skeleton code: void setup_rs232(void) { /* open port */ if ((rs232 = open("/dev/ttyS0", O_RDWR|O_SYNC)) < 0) fprintf(stderr, "Could not open rs232_port: %s\n", strerror(errno)); tcgetattr(rs232, &orig_termios); bzero(&rs232_termios, sizeof(rs232_termios)); /* clear structure */ rs232_termios.c_cflag = B9600|CS8|CLOCAL; rs232_termios.c_iflag = IXON|IXOFF|IGNBRK|IGNPAR|ICRNL; rs232_termios.c_oflag = 0; rs232_termios.c_lflag = 0; tcflush(rs232,TCIOFLUSH); tcsetattr(rs232, TCSANOW, &rs232_termios); tcflush(rs232,TCIOFLUSH); } main() { setup_rs232(); read_size = read(rs232, input_buffer, 512); ... route the charaters into keyboard buffer /* restore the port to its original settings and exit */ tcsetattr(rs232, TCSANOW, &orig_termios); if (close(rs232) != 0) printf("Error closing RS232 port\n"); } The part where you route the 'input_buffer' characters into the keyboard buffer is something I don't have experience with. It may be possible to full the X server into taking them as keyboard input, but you have to research that on your own. Rafael