Next Previous Contents

7. Configuring the Serial Driver (high-level) "stty"

7.1 Introduction

This configuring is normally done by your communications program such as wvdial and it may do much of it without even letting you know what it's done. In olden days it was done with the stty utility. If you set something with stty, the communications program may change the setting so it's usually best to just let the communications program handle it. See What is stty ?

7.2 Hardware flow control (RTS/CTS)

See Flow Control for an explanation of it. You should always use hardware flow control if possible. Your communication program or "getty" should have an option for setting it (and if you're in luck it might be enabled by default). It needs to be set both inside your modem (by an init string or default) and in the device driver. Your communication program should set both of these (if you configure it right).

If none of the above will fully enable hardware flow control. Then you must do it yourself. For the modem, make sure that it's either done by the init string or is on by default. If you need to tell the device driver to do it is best done on startup by putting it in a file that runs at boot-time. See the subsection Boot-time Configuration You need to add the following to such a file for each serial port (example is ttyS2) you want to enable hardware flow control on:


 
stty crtscts < /dev/ttyS2 
or
stty -F /dev/ttyS2 crtscts

If you want to see if flow control is enabled do the following: In minicom (or the like) type AT&V to see how the modem is configured and look for &K3 which means hardware flow control. Then see if the device driver knows about it by typing: stty -F /dev/ttyS2 -a Look for "crtscts" (without a disabling minus sign).

7.3 Other Driver Settings (high level)

Besides flow control and speed, there is speed. See What Speed Should I Use with My Modem. There's also are parity and bits-per-byte settings. Normally the port is set by the communications program at 8N1 (8-bits per byte, No parity, and 1 stop bit). If you're running PPP then you must use 8N1. So if you get a complaint that it's not 8-bit clean then it's likely not 8N1 as it should be.


Next Previous Contents