Xref: utzoo comp.sys.3b1:1288 comp.dcom.modems:9580 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!apple!mauxci!eci386!ecicrl!clewis From: clewis@ferret.ocunix.on.ca (Chris Lewis) Newsgroups: comp.sys.3b1,comp.dcom.modems Subject: Re: help wrt UUCP between 3B1 OBM and TB Message-ID: <1467@ecicrl.ocunix.on.ca> Date: 6 May 91 03:59:54 GMT References: <1991May4.210605.28387@sceard.Sceard.COM> Followup-To: comp.sys.3b1 Organization: Elegant Communications Inc., Ottawa, Canada Lines: 88 In article <1991May4.210605.28387@sceard.Sceard.COM> mrm@Sceard.COM (M.R.Murphy) writes: >[Friend has difficulty between 3B1's OBM and trailblazers] This C program, in addition to setting the line to tone dial (mine won't thru "normal" channels for some reason, sets PIOCOVSPD on the modem which permits it to talk to trailblazers. #! /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 Mon May 6 00:57:58 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 X#include X#include 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, Phone: (613) 832-0541, Domain: clewis@ferret.ocunix.on.ca UUCP: ...!cunews!latour!ecicrl!clewis; Ferret Mailing List: ferret-request@eci386; Psroff (not Adobe Transcript) enquiries: psroff-request@eci386 or Canada 416-832-0541. Psroff 3.0 in c.s.u soon!