7300/3b1 modem port

hzhang hzhang at elbereth.rutgers.edu
Mon Apr 25 05:09:50 AEST 1988


I have been trying to make C-Kermit work for 7300/3b1 by using its on board
modem.  The dialing part of kermit is bypassed and replaced by a dialing
function written for 3b1.  Kermit takes over after a modem connection has
been established.  Now this modified kermit seems to be dependent on some
initial modem settings.  Usually (e.g., after a fresh boot) the kermit doesn't
work.  The dialing function is ok, but the following read() can't get anything
out of the modem port.  Now if I run ATE and kill it abnormally (e.g., using
'kill' to kill all ATE processes and 'rm' its lock file), the kermit works
flawlessly then.  It keeps working fine until an ATE session is terminated
normally (by Shift-EXit) or the machine is rebooted.

The only thing I can guess is some settings of the modem port that ATE knows
but is not documented.  If any one knows anything about it, please let me
know.  The dialing function is listed in the following:

static struct updata phdata;

dial3b1(phnum) char *phnum;
{	char c;
	int status;
	phdata.c_lineparam = DATA|DTMF;
	phdata.c_waitdialtone = 5;
	phdata.c_feedback = SPEAKERON|NORMSPK;
	phdata.c_waitflash = 500;
	ioctl(ttyfd,PIOCSETP,&phdata);
	ioctl(ttyfd,PIOCOFFHOOK,&c);
    	for (;;)
	{	ioctl(ttyfd,PIOCGETP,&phdata);
		if (phdata.c_linestatus & DIALTONE) break;
	}
	sleep(1);
	while (c = *phnum++) ioctl(ttyfd,PIOCDIAL,&c);
	c = '@'; ioctl(ttyfd,PIOCDIAL,&c);
	for (;;)
	{	ioctl(ttyfd,PIOCGETP,&phdata);
		if (phdata.c_linestatus & MODEMCONNECTED)
		{	status = 0;
			break;
		}
		if (phdata.c_linestatus & BUSYTONE)
		{	status = -1;
			break;
		}
	}
	phdata.c_feedback &= ~SPEAKERON;
	ioctl(ttyfd,PIOCSETP,&phdata);
	return status;
}



More information about the Comp.sys.att mailing list