From owner-freebsd-questions Thu May 13 2: 1:25 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.hitel.net (unknown [204.252.145.1]) by hub.freebsd.org (Postfix) with ESMTP id 932D514BD2 for ; Thu, 13 May 1999 02:01:20 -0700 (PDT) (envelope-from HyunTech@mail.hitel.net) Received: (from root@localhost) by mail.hitel.net (8.8.6H1/8.8.6) id RAA21231 for freebsd-questions@FreeBSD.ORG; Thu, 13 May 1999 18:00:07 +0900 (KST) Date: Thu, 13 May 1999 18:00:07 +0900 (KST) From: HyunTech@mail.hitel.net Message-Id: <199905130900.RAA21231@mail.hitel.net> Subject: How can I send/receive data th Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I want to send/receive data to other computer thru serial port without modem. So, I have connected COM1 to COM2 of itself and programed as follows. Shell("stty -f /dev/ttyd0 clocal cread raw 9600 cs8 -parenb -cstopb"); Shell("stty -f /dev/ttyd1 clocal cread raw 9600 cs8 -parenb -cstopb"); fd1 = open("/dev/ttyd0", O_RDWR); fd2 = open("/dev/ttyd1", O_RDWR); childpid = fork(); if(childpid > 0) for(;;){ ch = getchar(); write(fd1, &ch, 1); } else if(childpid == 0) for(;;){ rc = read(fd2, &ch, 1); putchar(ch); } But, if press any key, login message is displayed or nothing is displayed. But, I don't want to use serial port for terminal, but only for data communication. How can I solve this problem ? Regards. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message