From owner-freebsd-questions Thu Nov 12 00:39:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA12345 for freebsd-questions-outgoing; Thu, 12 Nov 1998 00:39:02 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from soda.CSUA.Berkeley.EDU (soda.CSUA.Berkeley.EDU [128.32.43.52]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA12339 for ; Thu, 12 Nov 1998 00:39:00 -0800 (PST) (envelope-from joshk@CSUA.Berkeley.EDU) Received: from localhost (joshk@localhost) by soda.CSUA.Berkeley.EDU (8.8.8/) via SMTP id AAA21797 for ; Thu, 12 Nov 1998 00:38:42 -0800 (PST) env-from (joshk@CSUA.Berkeley.EDU) Date: Thu, 12 Nov 1998 00:38:42 -0800 (PST) From: Joshua Kneubuhl Reply-To: Joshua Kneubuhl To: freebsd-questions@FreeBSD.ORG Subject: hacking wacky modem echo... Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG More info / thoughts on the modem echo problem ... I got a new ppp from awfulhak.org, and tried to use gdb to trace some the data flow from tty<->socket<->tun0(?)<->kernel<->/dev/cuaa2 (This is purely speculation- feel free to correct, as I have only a slight idea of tun0's purpose...) I stumbled upon the following hack in the source, and thought it might be relevant: #ifdef __FreeBSD__ /* * A FreeBSD hack to dodge a bug in the tty driver that drops output * occasionally.... I must find the real reason some time. To display * the dodgy behaviour, comment out this bit, make yourself a large * routing table and then run ppp in interactive mode. The `show route' * command will drop chunks of data !!! */ if (mode == PHYS_INTERACTIVE) { close(STDIN_FILENO); if (open(_PATH_TTY, O_RDONLY) != STDIN_FILENO) { fprintf(stderr, "Cannot open %s for input !\n", _PATH_TTY); return 2; } } #endif Now, this alludes to an error _reading_ input from the tty, and it seems that the error is in ouput getting to the terminal from the modem. Though, after some more thought, I was thinking that this might be something do do with the way that the tty is using select() to get input from the fds... I thought that maybe if input from the console was triggering a callback to tell that the MODEM was ready with output, it would account for the output from teh modem getting to the console after each input... In addition, I noticed that when trying to get the disagnostics from the modem by holding down the space bar thr output from the modem would proceed in approximately the same rate as the repeat rate from the keyboard. Trying to be semi-automated, I started pasting mouse-buffers filled with spaces. To my dismay it slowed the output from the modem IMMENSELY. Could the X paste grab small chunks of spaces, and pass them to the shell running minicom? Each pasted chunk of spaces would generate a single select() interrupt and signal a byte to be read from the modem. When the modem is connected to my isp, puhing space is enough to generate a sizeable block of data to be read from the modem. Is this completely in the wrong direction? Help! Its a horrible end to be using windows 98 to type mail... Josh (This is a semi-followup to a message earlier tonight entitled "funky modem echo!") To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message