From: clewis@ferret.ocunix.on.ca (Chris Lewis)
Newsgroups: comp.sys.3b1
Subject: Re: 3b1 internal modem speed fix
Date: 8 Jan 93 04:57:46 GMT
Organization: Elegant Communications Inc., Ottawa, Canada

In article <1993Jan6.195314.23751@noose.ecn.purdue.edu> wieland@ea.ecn.purdue.edu (Jeffrey J Wieland) writes:
>Sometime back, some posted an article about how to change the
>1200 bps rate on the 3b1's internal modem to make it work
>properly with certain other modems.  I now cannot find the
>the article, so if someone has it could they send it to me?

You must mean the code used to make a OBM talk to a Telebit
running with locked DTE speeds...

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# Contents:  phfix.c
# Wrapped by clewis@ecicrl on Wed Jun 19 02:57:59 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo If this archive is complete, you will see the following message:
echo '          "shar: End of archive 1 (of 1)."'
if test -f 'phfix.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'phfix.c'\"
else
  echo shar: Extracting \"'phfix.c'\" \(1136 characters\)
  sed "s/^X//" >'phfix.c' <<'END_OF_FILE'
X/*	Sample program for bashing the OBM into tone dial and
X	setting PIOCOVSPD to permit talking to certain modems
X	(particularly telebits).
X	The documentation mentions 2.3% speed change for PIOCOVSPD.
X	That's all I know.
X
X	You are free to do whatever you wish with this code, but
X	please leave this comment in.
X
X	Chris Lewis, clewis@ecicrl.uucp, Jan 2 1991.
X */
X#include <stdio.h>
X#include <fcntl.h>
X#include <sys/phone.h>
X
Xmain(argc, argv)
Xint argc; char **argv; {
X    int f;
X    struct updata upd;
X    f = open("/dev/ph1", O_RDWR | O_NDELAY, 0);
X    if (f < 0) {
X	perror("/dev/ph1");
X	exit(1);
X    }
X    ioctl(f, PIOCGETP, &upd);	/* retrieve Phone parameters */
X    upd.c_lineparam &= ~PULSE;	/* reverse the sense to set to pulse dial */
X    upd.c_lineparam |= DTMF;	/* reverse the sense to set to pulse dial */
X
X#ifdef	NEVER
X    upd.c_feedback |= SPEAKERON;
X    upd.c_feedback |= LOUDSPK;
X    ioctl(f, PIOCDISC, &upd);	/* apply PIOCOVSPD for talking to some modems*/
X#endif
X
X    ioctl(f, PIOCOVSPD, &upd);	/* apply PIOCOVSPD for talking to some modems,
X				   eg: Telebits */
X    ioctl(f, PIOCSETP, &upd);	/* set phone parameters */
X}
END_OF_FILE
  if test 1136 -ne `wc -c <'phfix.c'`; then
    echo shar: \"'phfix.c'\" unpacked with wrong size!
  fi
  # end of 'phfix.c'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    rm -f ark[1-9]isdone
else
    echo You still must unpack the following archives:
    echo "        " ${MISSING}
fi
exit 0
-- 
Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
Ferret list: ferret-request@ferret.ocunix.on.ca