Flow Control & Transfers By Chuck Prime, Sysop I BBS Symptoms -------- You most likely have a very simple flow control problem if you encounter: difficulty connecting; and/or difficulty doing anything after connecting; and/or suddenly being disconnected; and/or difficulty transferring files--lots of errors, esp. during uploads; and/or file transfers that suddenly abort. The Problem ----------- Your init string and com program settings are either set to different types of flow control, or are set together, but to a type that your computer or modem or cable was not built to support. The majority of computers, modems, cables, and com programs support RTS/CTS and XON/XOFF (but not simultaneously, of course). I find that a lot of init strings are set to RTS/CTS, while the com programs are set to XON/XOFF. The Quick Fix for Whoever Doesn't Want to Read Any Further ---------------------------------------------------------- Regardless of whether you use RTS/CTS or XON/XOFF: 1: your computer, modem, modem cable, and com program all must be built and/or written to support whichever type of flow control you want or need to use. 2: the type of flow control specified in your modem init string AND com program must be set to match each other as well as the type of modem, modem cable, and computer you are using. If your computer or cable only supports RTS/CTS, then change *BOTH* your modem init string *AND* your com program settings to RTS/CTS. If your computer or cable only supports XON/XOFF, then change *BOTH* your modem init string *AND* your com program settings to XON/XOFF. If you need help doing this, post about it in the Technology's Last Stand forum, or consult the respective manuals or manufacturers. For those of you who didn't quite follow the above, explanations follow. Flow Control Defined -------------------- "Flow control" is how your modem and computer handle data flowing between them. From your modem's perspective, almost all data is incoming: either from your computer, or from another modem that you are connected to over the phone line. Your modem-to-computer speed is often different than your modem-to-other-modem speed. Your modem might receive data from that other modem faster or slower than your computer can get it from your modem, or you might send data to that other modem faster or slower than your computer can send it to your modem. Modems have memory buffers to hold incoming data from either your computer or that other modem, and most of them have the built-in ability to communicate with both your computer and that other modem. Modems have to tell computers and other modems to stop sending data when their memory buffers are full. They also have to tell computers and other modems when their memory buffers are empty and they are ready to receive data again. That is flow control. Your particular settings for it are only relevant to YOUR system: it does not matter what kind of flow control is used by anybody else that you call. The only thing that matters is whether each of you has your own flow control configured properly. Types of Flow Control --------------------- RTS/CTS (aka "hardware handshaking") is dependent on certain pins in the modem cable without regard for the contents of the actual datastream. Pin 4 is RTS, and pin 5 is CTS. The STATUS of PINS indicates whether the computer or modem should start or stop sending data. XON/XOFF (aka "software handshaking") is dependent on certain "control characters" in the datastream itself. XON (Control-Q) is sent to start sending data, and XOFF (Control-S) is sent to stop sending data. The TYPE of CHARACTER indicates whether the computer or modem should start or stop sending data. Obviously, if your modem is using one type of flow control and your com program is using the other, you are going to have problems. The different components of your system wouldn't be all looking for the same data in the same places. You can only use one type of flow control at a time, and your use of either must be internally consistent, as described in the "Quick Fix..." section above. What You Should Worry About --------------------------- To set it up so that all your components ARE internally consistent, these are the things you have to worry about, which determine whether you are using--or can use--either RTS/CTS or XON/XOFF flow control: 1: Your computer. Most computers support either RTS/CTS or XON/XOFF. Exceptions: the Mac Plus, Classic, and LC do not support RTS/CTS. To set up flow control: use what your computer supports, or buy a better computer. 2: Your modem: all 9600+ and/or error correcting modems support either RTS/CTS or XON/XOFF. Exceptions: older 2400- modems without error correction. To set up flow control: your modem requires an "initialization string", which is a set of commands called "AT Commands" (aka "Hayes Commands"). They tell your modem what to do, including whether to use RTS/CTS or XON/XOFF. Init strings are ugly and seemingly random little alphanumeric orgies that tend to look like ATS0=0Q0V0E0M0S2=1X1&C1W2. Your com program will allow you to set up an init string that it will initialize the mode with when you boot the program (or at other times). Not all modems us the same commands that others do, so it is best to consult the manual manufacturer for the proper command to issue to your modem for the type of flow control you want or need. 3: Your modem cable: most modem cables support either RTS/CTS or XON/XOFF. Exceptions: custom cables for weirdo modems or Mac bbses are designed for one or the other. This board uses XON/XOFF on such a cable. To set up flow control: use whatever the cable supports, or get a cable that supports what you want or need. Consult your modem's manual or manufacturer, as most modems come with a cable when you buy them. 4: Your com program: most com programs support either RTS/CTS or XON/XOFF. Exceptions: none that I know of. If you use one, switch to something better. To set up flow control: somewhere in your program's dialog boxes or menus there will be a section for "flow control" or "connection settings" or "handshaking" or something similar. Most likely, the names of the actual flow control options will be very similar to the names I have used here: "RTS/CTS" or "hardware handshaking", and "XON/XOFF" or "software handshaking" or "software flow control". Consult the program's manual. I hope this has helped you to solve any problems you might be having, and that it has enlightened rather than confused.