Date: Thu, 13 May 1999 18:00:07 +0900 (KST) From: HyunTech@mail.hitel.net Subject: How can I send/receive data th Message-ID: <199905130900.RAA21231@mail.hitel.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905130900.RAA21231>