SUMMARY: Serial port's "link down"

From: Suomi Mika ttl (
Date: Wed Aug 11 1993 - 12:59:52 CDT

Hello again Managers !

My question is:

> How I can reset Sun's serial port without booting Sun ?
> When from line came X-OFF with line carbage, port don't receive
> data more. That's OK, but because X-OFF is carbage character
> there never came X-ON character, so is port jammed for ever ?

If modem, printer or whatever is connected in port, send Xoff to
Sun's UART, UART must believe it and cannot arbitrary send data out
before it receive Xon from port.

Only way is reset UART, and release all streams which are attached in this
port. I have seen an assembly code for VAX, which do it, but that not
help in SPARC :-(

Detecting "jammed" port in C:

Bacause both open() and fopen() simply wait forever, when trying open jammed
port, there must use timeout mechanism:
open("/dev/ttya","rw"); // It will stop here.
perror("port:"); // but, return here when timeout, and
                                // show error code.

There are several things to do, when you notice "link down" problem.

1. Do not kill -9 process which attached in port. If you do it, there are
   no way anymore to release it. (Maybe ?)

2. If you can, send Xon manually into port. Not easy and mostly
   impossible to do.

3. Put terminal, (like Wyse) in port, and use "reset terminal" option in
   "setup" menu. This should send Xon to port.

5. If you take port directly, use C-kermit it's looks safe than tip or cu. is guide to set up tip correctly. Try find it with archie.

If any of these not help, then only way I know is reset Sun.

In Sun's manual you find this problem in: "System and Networking Admistration"
page 11-31, or Answerbook search "link down".
Mika Suomi /_ _/_ __/ / Turku Telephone Comppany
Tel: +358 21 621182 / / / / / /__ Linnankatu 4
Fax: +358 21 502615 /_/ /_/ /____/ 20100

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:06 CDT