kad@ttrdc.UUCP (Keith Drescher) (07/11/85)
Does anyone out there have any idea how to use dial(3) on the PC7300? I've tried, but I get a message about three routines (tgetnum, tgetent, tget...). These routines are present in libtermcap and libtermlib, but the problem seems to be that they are not defined to dial in libc, because the error comes from libc. Also, I've been able to dial via ioctl's, but haven't been able to figure out how to get the internal modem to respond once the carrier from the called modem shows up. Querying the dialer via ioctl doesn't help, it doesn't seem to be able to detect anything but a dial tone, regardless of the mnemonics for other conditions which are present in phone.h. I'm trying to write a 'ct' like routine, which is why I'm asking. If I'm reinventing the wheel, let me know. The PC7300 I'm working on has 'cu' but not 'ct'. Does anyone know of any technical information which is available on the 7300? The manuals I've got are all application level stuff. -- Keith Drescher (kad@ttrdc) ------------------------------------------------------------------------- Standard Disclaimer: The views presented here are not those of my employer, my family, or myself. ------------------------------------------------------------------------- Path: .....!ihnp4!ttrdc!kad
mjs@eagle.UUCP (M.J.Shannon) (07/12/85)
> Does anyone out there have any idea how to use dial(3) on the > PC7300? I've tried, but I get a message about three routines > (tgetnum, tgetent, tget...). These routines are present in > libtermcap and libtermlib, but the problem seems to be that they > are not defined to dial in libc, because the error comes from > libc. > > Keith Drescher (kad@ttrdc) If the dial routine refers to the mentioned routines in libtermlib, then you must include "-ltermlib" in whatever command you use to load your program (i.e., cc or ld). -- Marty Shannon UUCP: ihnp4!eagle!mjs Phone: +1 201 522 6063
kad@ttrdc.UUCP (Keith Drescher) (07/12/85)
>> Does anyone out there have any idea how to use dial(3) on the >> PC7300? I've tried, but I get a message about three routines >> (tgetnum, tgetent, tget...). These routines are present in >> libtermcap and libtermlib, but the problem seems to be that they >> are not defined to dial in libc, because the error comes from >> libc. >> >> Keith Drescher (kad@ttrdc) > >If the dial routine refers to the mentioned routines in libtermlib, then you >must include "-ltermlib" in whatever command you use to load your program >(i.e., cc or ld). >-- > Marty Shannon >UUCP: ihnp4!eagle!mjs >Phone: +1 201 522 6063 Unfortunately, that doesn't work. I posted to the net because loading via 'cc -o prog prog.c -ltermlib' didn't solve the problem, which I thought was strange (it is strange). However, James Blasius of AT&T Indian Hill solved the problem. For any of you interested, here's how to compile something which uses dial: Answer: use 'cc -c prog.c' 'ld -o prog prog.o /lib/shlib.ifile /lib/crt0s.o [other libs]' note: [other libs] CAN NOT include libc.a or the problem occurs. Not being able to use any of the libc stuff is nasty, but you can get around that as follows: main.c - the main program ddial.c - another file which only contains a call to dial ex: #include <dial.h> ddial() { extern struct CALL call; int i; i=dial(&call); /*Note that although the doc. for dial says that */ return (i); /*you need a pointer to a structure, you must send */ } /*the actual structure address. Thanks to James */ /* Blasius for this info also. */ cc -c main.c ddial.c ld -r -o dd.o ddial.o /lib/shlib.ifile /lib/crt0s.o ld -o name main.o dd.o -lc [other libs] Hope this helps somebody somewhere. Send me mail if you want info on using ioctl to dial, but don't ask me how to connect the modem to the line after that!. -- ------------------------------------------------------------------------- ____________ _ (___________/ ====<_>==== // Keith Drescher (kad@ttrdc) \_\__//____ >__________/ PATH: ...!ihnp4!ttrdc!kad ------------------------------------------------------------------------- Standard Disclaimer: The views presented here are not those of my employer, my family, or myself. -------------------------------------------------------------------------