Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sgi!key!perry From: perry@key.COM (Peter Kiehtreiber) Newsgroups: comp.mail.uucp Subject: Re: Bidirectional Modem Lines under SunOS 4.0.1 Message-ID: <743@key.COM> Date: 4 Apr 89 17:16:28 GMT References: <160@osc.COM> Reply-To: perry@arkon.key.COM (Perry The Cynic) Organization: Key Computer Laboratories, Fremont Lines: 57 In article <160@osc.COM> stephen@osc.UUCP (H. Stephen Au-Yeung) writes: > > According to "Managing UUCP and Usenet" by O'Reilly & Associates (A Nutshell > Handbook), SunOS has a mechanism of its own that allows a port to be used in > both directions. I have tried to follow that mechanism (on page 34-35) but > everytime when getty tries to open /dev/ttyd? it gets through! Could someone > please tell me what I have done wrong (we use Telebit T1000 modems)? Thanks! > > Stephen Au-Yeung > ...!{amdcad,pacbell,stratus}!osc!stephen [I tried to mail a reply, but decwrl gave me the thumbs-down, and this may just be of use to others.] [SunOS's mechanism for dual call-in/call-out on one line, in case you others wonder, is to split /dev/tty* into /dev/ttyd* (dial-in) and /dev/cua* (call-out), distinguished by minor device number. The two logical devices lock each other out, so the call-out device fails the open while the corresponding call-in device is in use, and vice versa.] Stephen, Sounds like your setup doesn't properly handle the CD (carrier detect) signal. In the correct setup, getty will hang on the open(2) call for the modem because CD is down (off) until somebody actually dials in and the modem connects and turns CD on. Conversely, the corresponding /dev/cua* device will return open errors while CD is up (because the line is currently used for dial-in). For mostly historical reasons, most modems get delivered with a factory default that causes the modem to assert CD at all times. That's because in olden times, the computer/modem hardware and/or cabling tended to do unreasonable things with this signal. For the SunOS setup to work, CD must properly reflect the connect status of the modem. So: check your documentation. Find the dip switch and/or modem command that sounds like "raise and lower Carrier Detect depending on modem connection" as opposed to "always keep Carrier Detect asserted". Use it. Next potential gotcha: for similar reasons, the default configuration of the serial drivers pretends that the CD signal is always on, no matter what the hardware says (does that start to sound familiar?!). Check your kernel configuration file (/usr/sys/conf/WHATEVERFILENAME). If you use the CPU board serial port(s), check the "device zs0" line (say "man zs" for details). If you use a serial interface board (e.g. an ALM-2), check its configuration line (the ALM-2 is "man mcp", in case you wondered). In either case, clear the appropriate "flags" bits in the configuration file. [Yes, this means you have to build and install a new kernel. That's life.] If that doesn't help either, you're probably using bad cables that have short- circuited the CD line (yes, you can really buy such cables!). I hope this helps -- perry -- ------------------------------------------------------------------------ Perry The Cynic (Peter Kiehtreiber) perry@arkon.key.com ** What good signature isn't taken yet? ** ...!pacbell!key!perry