Section 3 : Running a Server

Q311: [Sun] How do I get HylaFAX to use RTS/CTS on a Sun serial port?


? Got something to say about this answer? Hit the question mark to invoke the mailer and send your comments to the HylaFAQ maintainers.

Q.
How do I get FlexFAX to use RTS/CTS on a Sun serial port?

I have been following the list for the last month or so and notice a lot of Sun - ZyXEL users out there. I tried to get FlexFAX going with hardware flow control on the sun and was told by the list that this is not possible.

Does anyone know why? I have been talking to Sun here who said they used truefax software and "did not do anything special with flow control."

A.
Date: Sat, 17 Apr 93 16:47:45 EDT
From: bst%tt@CAM.ORG (Brent Townshend)
Subject: Sun RTS/CTS problems summarized.

I'd like to recap the current status of the SUN RTS/CTS flow control problems, and see if anyone has anything further to add. Perhaps these problems should go noted in a README file in the port/sun directory. I'm running SunOS 4.1.1 with a U1496E+ with 6.00 ROMS and FlexFAX beta 97. Here is the problem as I see it:

The Sun driver for the Sparcstation on-board zs serial port behaves somewhat differently than one may expect. If hardware flow control is requested by the host and carrier detect is not asserted by the modem then data from the modem to the Sun is discarded. Note that data from the host to the modem works fine under these conditions. Once carrier detect is asserted, RTS/CTS works as expected. The problem is that when flexfax awaits responses from its 'AT' commands, the replies are thrown away by the OS since Carrier Detect is not present.

One would think that the recent changes to FlexFAX in regards to setting the CLOCAL bit would fix this problem. However, it appears that the CLOCAL bit is having no effect.

As mentioned by Steven Grimm, and further verified by looking at the data sheets, the problem arises from the Zilog Z8530 chip used for serial communications. On that chip there is a single control bit which turns on automatic RTS/CTS handling. This same bit turns the CD input into a receiver enable. Thus if the hardware is set for RTS/CTS flow control, then input is discarded whenever CD is inactive. This explains why the OS can't do what we'd like when CLOCAL is set.

One fix for this is to set the modem to always assert CD using AT&C0. However, this will cause problems in disconnecting after a call is finished. Another fix is to use XON/XOFF flow control, but effective RTS/CTS would be better, especially for data connections.

I believe the only way we are going to get around this problem is if FlexFAX would allow independent flow-control selection for setup, data transfer, and FAX transfer. This would also help out handling for modems like the ZyXEL which always do Xon/Xoff flow control when sending faxes.

A.
Date: Wed, 17 Nov 93 22:07:42 CST
From:
katzung@katsun.chi.il.us (Brian Katzung)
To: flexfax@sgi.sgi.com
Subject: Bidirectional hardware flow control for Sun zs users!

An infamous and long-standing hardware flow control problem with Sun's built-in serial ports, which Sun customers have often been led to believe was insoluable, has at last been solved.

Sun has released a new jumbo tty patch 100513-04 for SunOS 4.1.2 and 4.1.3 that incorporates changes that I have developed for the ZS 8530 serial communications driver (which most notably affects the built-in serial ports) to support bidirectional hardware flow control.

My changes eliminate a problem in which the receiver is disabled if CRTSCTS mode is enabled but CD (carrier detect) is not present, and add support to lower RTS (request to send) when the input buffers are getting full and reassert it when the buffers drain.

If you are not running SunOS 4.1.2 or 4.1.3 but you have a software support contract with Sun and are interested in seeing this enhancement supported in the release you are running, I suggest you contact your Sun software support representative.

I would like to take this opportunity to thank Dr. R. P. C. Rodgers of the National Library of Medicine Lister Hill Center, Peter Glassenbury of the University of Canterbury, Christchurch, New Zealand, and Arborvitae Software, all of whom provided invaluable assistance.

A.
Starting with v2.3beta036 there is sufficient support in the configuration file escape code mechanism to workaround the Sun tty driver limitations regarding DCD and RTS/CTS. Specifically you can configure the fax server so that it will use RTS/CTS flow control only when carrier is known to be asserted. To do this set the modem up to initially use no flow control: ModemFlowControl: None # initially disable host-side flow control and then when carrier is known to be asserted, when dialing out or when receiving an incoming call, switch to use hardware flow control: # # Enable RTS/CTS on the host only after carrier is established. # ModemSendBeginCmd: "<rts>" ModemAnswerFaxBeginCmd: "<rts>" ModemAnswerDataBeginCmd:"<rts>" Consult the hylafax-config(4F) manual page for complete details.


 Back to FAQ Index FAQ Index  Next question in List Q312: How do I force HylaFAX to set the tty device to mode 664?
faq@hylafax.org. Last updated $Date: 2002/03/07 09:17:54 $.