home *** CD-ROM | disk | FTP | other *** search
- /* Sample program for bashing the OBM into tone dial and
- setting PIOCOVSPD to permit talking to certain modems
- (particularly telebits).
- The documentation mentions 2.3% speed change for PIOCOVSPD.
- That's all I know.
-
- You are free to do whatever you wish with this code, but
- please leave this comment in.
-
- Chris Lewis, clewis@ecicrl.uucp, Jan 2 1991.
- */
- #include <stdio.h>
- #include <fcntl.h>
- #include <sys/phone.h>
-
- main(argc, argv)
- int argc; char **argv; {
- int f;
- struct updata upd;
- f = open("/dev/ph1", O_RDWR | O_NDELAY, 0);
- if (f < 0) {
- perror("/dev/ph1");
- exit(1);
- }
- ioctl(f, PIOCGETP, &upd); /* retrieve Phone parameters */
- upd.c_lineparam &= ~PULSE; /* reverse the sense to set to pulse dial */
- upd.c_lineparam |= DTMF; /* reverse the sense to set to pulse dial */
-
- #ifdef NEVER
- upd.c_feedback |= SPEAKERON;
- upd.c_feedback |= LOUDSPK;
- ioctl(f, PIOCDISC, &upd); /* apply PIOCOVSPD for talking to some modems*/
- #endif
-
- ioctl(f, PIOCOVSPD, &upd); /* apply PIOCOVSPD for talking to some modems,
- eg: Telebits */
- ioctl(f, PIOCSETP, &upd); /* set phone parameters */
- }
-