home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.dcom.modems
- From: fred@genesis.demon.co.uk (Lawrence Kirby)
- Path: sparky!uunet!pipex!demon!genesis.demon.co.uk!fred
- Subject: Re: RS-232 and DTR when system dies
- Distribution: world
- References: <1993Jan6.211938.3214@chg.mcd.mot.com>
- Organization: BT
- X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
- Lines: 58
- Date: Thu, 7 Jan 1993 14:06:39 +0000
- Message-ID: <726415599snz@genesis.demon.co.uk>
- Sender: usenet@demon.co.uk
-
- In article <1993Jan6.211938.3214@chg.mcd.mot.com> heiby@chg.mcd.mot.com writes:
-
- >I have been having a philosophical discussion with one of my
- >colleagues, on the subject of the DTR line in the RS-232 standard.
- >I'm looking for information to help resolve the disagreement that has
- >emerged.
- >
- >My interpretation of RS-232 is that the DTR line should be asserted
- >*only* when the DTE is ready to exchange data. My colleague believes
- >that that is an over-strict interpretation.
- >
-
- You must be careful not to confuse this with flow control. Serial printers
- confuse the issue by essentially using DTR for flow control.
-
- >The exact situation in question is what should be done with DTR on
- >serial ports coming from a UNIX based computer system that has either
- >locked up or panic'd.
- >
- >In my opinion, this circumstance is such that the DTE (the UNIX
- >computer system) is *not* ready to exchange data, so the DTR line
- >should not be true. My colleague believes that it is not important
- >that the modems attached to the dead computer continue to answer
- >incoming calls, and that since previous versions of the system
- >software have behaved in exactly the same way for half a dozen years
- >or more, that it's no big deal either way.
- >
-
- You're looking at a system in a crash condition so the results are simply not
- well defined - you can't tell or guarantee what will happen. However a panic'd
- system goes through some sort of shutdown procedure which, if it thinks it is
- safe to do so, might usefully drop DTR on all serial ports.
-
- >I'm looking for opinion as to what the *right* thing to do is and how
- >important it is to do the *right* thing. I'm also looking for actual
- >data regarding computer systems from various vendors, and their
- >treatment of DTR in such a situation.
- >
-
- If the only process on a port aborts the port will be closed and DTR dropped.
- If the serial driver locks there's nothing you can do as you've completely
- lost control of the port. If the kernel crashes you've lost control of the
- entire system. What situations would your question be relavent to? How would
- you detect a dead computer?
-
- Don't worry too much about what vendors are doing - there is a general
- tendancy to mess up the serial port!
-
- Don't worry too much about adhering to every last letter of the spec. either.
- Do what serves the user best. If you can prevent the user being charged for
- a connection to a dead system then do so. Your question should be whether
- dropping DTR under the conditions you cite would break anything. I don't think
- so! Does it add anything? Yes! Is it implementable? Probably not!
-
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-