s268@sol1.UUCP (s268) (10/17/85)
Does anyone know how to write C programs to access the Unix PC 7300 modem? There seems to be no documentation on /dev/ph1 ioctl()'s, or on how to run the dialer from a program. Also, I can't get the dial(3) routine to do anything, all I can get is a -11 error return. Does anyone have a code fragment for the 7300 which illustrates use of dial(3)?
acy@milo.UUCP (Adnan Yaqub) (10/28/85)
> Does anyone know how to write C programs to access the Unix PC 7300 modem? > There seems to be no documentation on /dev/ph1 ioctl()'s, or on how to > run the dialer from a program. > > Also, I can't get the dial(3) routine to do anything, all I can get is a > -11 error return. Does anyone have a code fragment for the 7300 which > illustrates use of dial(3)? I posted this once, but here it is again. Note that the manual page for dial is wrong. It should read int dial(call) CALL call; not int dial(call) CALL *call; #include <stdio.h> #include <dial.h> main() { CALL call; int error; unsigned sleep(); call.attr = NULL; call.baud = NULL; call.speed = NULL; call.line = "/dev/ph0"; call.telno = "9+4497455"; call.modem = NULL; if((error = dial(call)) < 0) { printf("dial failed %d\n", error); return; } sleep(30); undial(error); } I haven't figured out how to access the modem yet.
Michael Brant@kepler.UUCP (Michael Brant) (11/05/85)
I am working on a telecommunications package for the UNIX PC 7300. The package is written in C. I am using dial(3c) and ioctl()'s to access the internal modems and external modems like a Hayes Smartmodem. I have the package working pretty well but have run across a couple of problems that I need help with. Responses mailed to me will be greatly appreciated. (1) How do I send a BREAK? (2) How can I detect a dropped carrier signal if 1) the phone device is in non-blocking mode (O_NDELAY set) and 2) lv.c_linestatus from an ioctl(fd,PIOCGETP,&lv) call always returns zero? (dial(3c) was used to open the device with telno = NULL and modem = 1.) -- Michael Brant, MicroPro International Corporation UUCP: {ptsfa,hplabs,glacier,lll-crg}!well!micropro!kepler!michaelb {ucbvax, decwrl}!dual!micropro!kepler!michaelb By phone: 415-499-4181