[comp.lang.c] Acessing modem from C

mitchemt@silver.ucs.indiana.edu (Terry Mitchem) (05/04/90)

	HELP!! I am trying to access my modem (under xenix 286). I have no
idea how to do this and the manuals arn't very helpful. The modem is on tty1a
(1A if you care about modem control). I just need some hints to help me get
started. I tried to open tty1a as a file but had no luck. It seems that the
modem won't accept anything I write there as a command. Any and all help is 
appreciated. Please E-mail if possible.
			Later
			  Terry

campbell@Thalatta.COM (Bill Campbell) (05/04/90)

In article <44008@iuvax.cs.indiana.edu> mitchemt@silver.ucs.indiana.edu (Terry Mitchem) writes:
:>
:>	HELP!! I am trying to access my modem (under xenix 286). I have no
:>idea how to do this and the manuals arn't very helpful. The modem is on tty1a
:>(1A if you care about modem control). I just need some hints to help me get
:>started. I tried to open tty1a as a file but had no luck. It seems that the
:>modem won't accept anything I write there as a command. Any and all help is 
:>appreciated. Please E-mail if possible.

You need to open with the O_NDELAY to open with no carrier detect.  This
allows the open to succeed before carrier is present.  Without the O_NDELAY
the open waits for carrier.

The best thing for you to do is look at the dialer sources in /usr/lib/uucp
on your Xenix system.
-- 
....microsoft--\                    Bill Campbell; Celestial Software
...uw-entropy----!thebes!camco!bill 6641 East Mercer Way
....fluke------/                    Mercer Island, Wa 98040
....hplsla----/                     (206) 232-4164