diff --git a/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml b/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml index dcad7a2e10..a2515918f5 100644 --- a/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml @@ -11,6 +11,7 @@ Synopsis serial communications + &unix; has always had support for serial communications. In fact, the very first &unix; machines relied on serial lines for user input and output. Things have changed a lot from the days when the average @@ -19,25 +20,41 @@ which FreeBSD uses serial communications. After reading this chapter, you will know: + - How to connect terminals to your FreeBSD - system. - How to use a modem to dial out to remote - hosts. - How to allow remote users to login to your - system with a modem. - How to boot your system from a serial - console. + + How to connect terminals to your FreeBSD + system. + + + How to use a modem to dial out to remote + hosts. + + + How to allow remote users to login to your + system with a modem. + + + How to boot your system from a serial console. + Before reading this chapter, you should: + - Know how to configure and install a new kernel (). - Understand &unix; permissions and processes (). - Have access to the technical manual for the - serial hardware (modem or multi-port card) that you would like - to use with FreeBSD. + + Know how to configure and install a new kernel (). + + + Understand &unix; permissions and processes (). + + + Have access to the technical manual for the serial hardware + (modem or multi-port card) that you would like to use with + FreeBSD. + @@ -72,7 +89,7 @@ DCE DCE - Data Communications Equipment — your modem + Data Communications Equipment — your modem @@ -97,8 +114,8 @@ Cables and Ports To connect a modem or terminal to your FreeBSD system, you - will need a serial port on your computer and the proper cable to connect - to your serial device. If you are already familiar with your + will need a serial port on your computer and the proper cable to + connect to your serial device. If you are already familiar with your hardware and the cable it requires, you can safely skip this section. @@ -107,8 +124,8 @@ There are several different kinds of serial cables. The two most common types for our purposes are null-modem cables - and standard (straight) RS-232 cables. The documentation - for your hardware should describe the type of cable + and standard (straight) RS-232 cables. The + documentation for your hardware should describe the type of cable required. @@ -117,19 +134,22 @@ null-modem cable - A null-modem cable passes some signals, such as Signal - Ground, straight through, but switches other signals. For - example, the Transmitted Data pin on one end goes to the - Received Data pin on the other end. + + A null-modem cable passes some signals, such as + Signal Ground, straight through, but switches other + signals. For example, the Transmitted Data pin on + one end goes to the Received Data pin on the other + end. You can also construct your own null-modem cable for use with - terminals (e.g., for quality purposes). This table shows the RS-232C - signals and the pin - numbers on a DB-25 connector. Note that the standard also calls for a - straight-through pin 1 to pin 1 Protective Ground - line, but it is often omitted. Some terminals work OK using only - pins 2, 3 and 7, while others require different configurations than - the examples shown below. + terminals (e.g., for quality purposes). This table shows the + RS-232C signals + and the pin numbers on a DB-25 connector. Note that the standard + also calls for a straight-through pin 1 to pin 1 + Protective Ground line, but it is often + omitted. Some terminals work OK using only pins 2, 3 and 7, + while others require different configurations than the examples + shown below. DB-25 to DB-25 Null-Modem Cable @@ -421,11 +441,11 @@ RS-232C cablesA standard serial cable passes all of the RS-232C signals - straight through. That is, the Transmitted Data pin on one - end of the cable goes to the Transmitted Data pin on the - other end. This is the type of cable to use to connect a modem to your - FreeBSD system, and is also appropriate for some - terminals. + straight through. That is, the Transmitted Data + pin on one end of the cable goes to the + Transmitted Data pin on the other end. This is + the type of cable to use to connect a modem to your FreeBSD + system, and is also appropriate for some terminals. @@ -445,8 +465,8 @@ your terminal and on the FreeBSD system.Most terminals will have DB-25 ports. Personal computers, - including PCs running FreeBSD, will have DB-25 or DB-9 ports. If you - have a multiport serial card for your PC, you may have RJ-12 or + including PCs running FreeBSD, will have DB-25 or DB-9 ports. If + you have a multiport serial card for your PC, you may have RJ-12 or RJ-45 ports.See the documentation that accompanied the hardware for @@ -770,9 +790,9 @@ sio3: type 16550A Note that device numbers in &os; start from zero and not one (like they do, for instance in &ms-dos;-derived systems). - This means that what &ms-dos;-based systems - call COM1 is - usually /dev/cuad0 in &os;. + This means that what &ms-dos;-based systems call + COM1 is usually + /dev/cuad0 in &os;. @@ -864,11 +884,11 @@ sio3: type 16550A The /etc/ttys file lists all of the ports on your FreeBSD system where you want to allow logins. For example, - the first virtual console ttyv0 has an entry in - this file. You can log in on the console using this entry. This - file also contains entries for the other virtual consoles, serial ports, - and pseudo-ttys. For a hardwired terminal, just list the serial - port's /dev entry without the + the first virtual console ttyv0 has an entry + in this file. You can log in on the console using this entry. This + file also contains entries for the other virtual consoles, serial + ports, and pseudo-ttys. For a hardwired terminal, just list the + serial port's /dev entry without the /dev part (for example, /dev/ttyv0 would be listed as ttyv0). @@ -907,8 +927,8 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure the terminal special file as it is found in /dev. - + The second field is the command to execute for this line, which is usually &man.getty.8;. getty initializes and opens the @@ -940,13 +960,11 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure match. For our example, the Wyse-50 uses no parity and - connects at 38400 bps. The 286 PC uses no parity and - connects at 19200 bps. - + connects at 38400 bps. The 286 PC uses no parity + and connects at 19200 bps. - The third field is the type of terminal usually connected to that tty line. For dial-up ports, unknown or @@ -961,7 +979,6 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure terminal type while the 286 PC running Procomm will be set to emulate at VT-100. - @@ -1097,7 +1114,8 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure - Characters Appear Doubled; the Password Appears When Typed + Characters Appear Doubled; the Password Appears When + Typed Switch the terminal (or the terminal emulation software) from half duplex or local echo to @@ -1214,8 +1232,8 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure FreeBSD needs the RTS and CTS signals for flow control at speeds above - 2400 bps, the CD signal to detect when a call has - been answered or the line has been hung up, and the + 2400 bps, the CD signal to detect when a + call has been answered or the line has been hung up, and the DTR signal to reset the modem after a session is complete. Some cables are wired without all of the needed signals, so if you have problems, such as a login session not going away when @@ -1297,23 +1315,23 @@ ttyd5 "/usr/libexec/getty std.19200" vt100 on insecure Lastly, you can place port initialization commands in the /etc/rc.d/serial script. - There are two schools of thought regarding dial-up modems on &unix;. - One group likes to configure their modems and systems so that no matter - at what speed a remote user dials in, the local computer-to-modem - RS-232 interface runs at a locked speed. The benefit of this - configuration is that the remote user always sees a system login - prompt immediately. The downside is that the system does not know - what a user's true data rate is, so full-screen programs like Emacs - will not adjust their screen-painting methods to make their response - better for slower connections. + There are two schools of thought regarding dial-up modems on + &unix;. One group likes to configure their modems and systems so that + no matter at what speed a remote user dials in, the local + computer-to-modem RS-232 interface runs at a locked speed. The benefit + of this configuration is that the remote user always sees a system + login prompt immediately. The downside is that the system does not + know what a user's true data rate is, so full-screen programs like + Emacs will not adjust their screen-painting + methods to make their response better for slower connections. The other school configures their modems' RS-232 interface to vary its speed based on the remote user's connection speed. For example, - V.32bis (14.4 Kbps) connections to the modem might make the modem run - its RS-232 interface at 19.2 Kbps, while 2400 bps connections make the - modem's RS-232 interface run at 2400 bps. Because - getty does not understand any particular modem's - connection speed reporting, getty gives a + V.32bis (14.4 Kbps) connections to the modem might make the modem + run its RS-232 interface at 19.2 Kbps, while 2400 bps + connections make the modem's RS-232 interface run at 2400 bps. + Because getty does not understand any particular + modem's connection speed reporting, getty gives a login: message at an initial speed and watches the characters that come back in response. If the user sees junk, it is assumed that they know they should press the @@ -1391,19 +1409,21 @@ uq|V19200|High Speed Modem at 19200,8-bit:\ This will result in 8-bit, no parity connections. - The example above starts the communications rate at 19.2 Kbps - (for a V.32bis connection), then cycles through 9600 bps (for - V.32), 2400 bps, 1200 bps, 300 bps, and back to 19.2 Kbps. - Communications rate cycling is implemented with the - nx= (next table) capability. - Each of the lines uses a tc= (table - continuation) entry to pick up the rest of the - standard settings for a particular data rate. + The example above starts the communications rate at + 19.2 Kbps (for a V.32bis connection), then cycles through + 9600 bps (for V.32), 2400 bps, 1200 bps, + 300 bps, and back to 19.2 Kbps. Communications rate + cycling is implemented with the nx= + (next table) capability. Each of the lines uses + a tc= (table continuation) + entry to pick up the rest of the standard + settings for a particular data rate. If you have a 28.8 Kbps modem and/or you want to take - advantage of compression on a 14.4 Kbps modem, you need to use a - higher communications rate than 19.2 Kbps. Here is an example of - a gettytab entry starting a 57.6 Kbps: + advantage of compression on a 14.4 Kbps modem, you need to + use a higher communications rate than 19.2 Kbps. Here is an + example of a gettytab entry starting a + 57.6 Kbps: # # Additions for a V.32bis or V.34 Modem @@ -1486,8 +1506,8 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\ For a locked-speed configuration, your ttys entry needs to have a fixed-speed entry provided to getty. For a modem whose port - speed is locked at 19.2 Kbps, the ttys entry - might look like this: + speed is locked at 19.2 Kbps, the ttys + entry might look like this: ttyd0 "/usr/libexec/getty std.19200" dialup on @@ -1507,8 +1527,8 @@ vq|VH57600|Very High Speed Modem at 57600,8-bit:\ beginning auto-baud (sic) entry in /etc/gettytab. For example, if you added the above suggested entry for a matching-speed modem that starts at - 19.2 Kbps (the gettytab entry containing the - V19200 starting point), your + 19.2 Kbps (the gettytab entry containing + the V19200 starting point), your ttys entry might look like this: ttyd0 "/usr/libexec/getty V19200" dialup on @@ -1546,10 +1566,11 @@ stty -f /dev/cuad1.init crtscts If you have a modem whose parameters may be permanently set in non-volatile RAM, you will need to use a terminal program (such as - Telix under &ms-dos; or tip under FreeBSD) to set the - parameters. Connect to the modem using the same communications speed - as the initial speed getty will use and configure - the modem's non-volatile RAM to match these requirements: + Telix under &ms-dos; or + tip under FreeBSD) to set the parameters. Connect + to the modem using the same communications speed as the initial speed + getty will use and configure the modem's + non-volatile RAM to match these requirements: @@ -1596,9 +1617,9 @@ AT&C1&D2&H1&I0&R2&W settings in the modem, such as whether it will use V.42bis and/or MNP5 compression. - The &usrobotics; &sportster; 14,400 external modem also has some DIP switches - that need to be set; for other modems, perhaps you can use these - settings as an example: + The &usrobotics; &sportster; 14,400 external modem also has some + DIP switches that need to be set; for other modems, perhaps you can + use these settings as an example: @@ -1647,9 +1668,9 @@ AT&C1&D2&H1&I0&R2&W For a locked-speed configuration, you will need to configure the modem to maintain a constant modem-to-computer data rate independent - of the communications rate. On a &usrobotics; &sportster; 14,400 external - modem, these commands will lock the modem-to-computer data rate at - the speed used to issue the commands: + of the communications rate. On a &usrobotics; &sportster; 14,400 + external modem, these commands will lock the modem-to-computer data + rate at the speed used to issue the commands: ATZ AT&B1&W @@ -1660,10 +1681,10 @@ AT&B1&W For a variable-speed configuration, you will need to configure your modem to adjust its serial port data rate to match the incoming - call rate. On a &usrobotics; &sportster; 14,400 external modem, these commands - will lock the modem's error-corrected data rate to the speed used to - issue the commands, but allow the serial port rate to vary for - non-error-corrected connections: + call rate. On a &usrobotics; &sportster; 14,400 external modem, + these commands will lock the modem's error-corrected data rate to the + speed used to issue the commands, but allow the serial port rate to + vary for non-error-corrected connections: ATZ AT&B2&W @@ -1809,8 +1830,8 @@ AT&B2&W My Stock Hayes Modem Is Not Supported, What Can I Do? - Actually, the manual page for tip is out of date. - There is a generic Hayes dialer already built in. Just use + Actually, the manual page for tip is out of + date. There is a generic Hayes dialer already built in. Just use at=hayes in your /etc/remote file. @@ -1914,17 +1935,17 @@ tip57600|Dial any phone number at 57600 bps:\ cu1200, but go ahead and use whatever bps rate is appropriate with the br capability. tip thinks a good default is 1200 bps which is why it looks for a - tip1200 entry. You do not have to use 1200 bps, - though. + tip1200 entry. You do not have to use + 1200 bps, though. I Access a Number of Hosts Through a Terminal Server Rather than waiting until you are connected and typing - CONNECT host each time, use tip's - cm capability. For example, these entries in - /etc/remote: + CONNECT host each time, + use tip's cm capability. For example, these entries + in /etc/remote: pain|pain.deep13.com|Forrester's machine:\ :cm=CONNECT pain\n:tc=deep13: @@ -1934,8 +1955,9 @@ deep13:Gizmonics Institute terminal server:\ :dv=/dev/cuad2:br#38400:at=hayes:du:pa=none:pn=5551234: will let you type tip pain or tip - muffin to connect to the hosts pain or muffin, and - tip deep13 to get to the terminal server. + muffin to connect to the hosts pain or + muffin, and tip deep13 to get to + the terminal server. @@ -1979,7 +2001,8 @@ big-university 5551114 Once? - CtrlP is the default force character, used to tell + CtrlP + is the default force character, used to tell tip that the next character is literal data. You can set the force character to any other character with the ~s escape, which means set a @@ -2007,8 +2030,8 @@ big-university 5551114 servers. You can have the force character be whatever you want by - specifying the following in your $HOME/.tiprc - file: + specifying the following in your + $HOME/.tiprc file: force=single-char @@ -2116,9 +2139,9 @@ raisechar=^^ attached, and developers who want to debug the kernel or device drivers. - As described in , FreeBSD employs a three stage - bootstrap. The first two stages are in the boot block code which is - stored at the beginning of the FreeBSD slice on the boot disk. The + As described in , FreeBSD employs a three + stage bootstrap. The first two stages are in the boot block code which + is stored at the beginning of the FreeBSD slice on the boot disk. The boot block will then load and run the boot loader (/boot/loader) as the third stage code. @@ -2137,8 +2160,8 @@ raisechar=^^ - Connect the serial cable to COM1 and the controlling - terminal. + Connect the serial cable to COM1 and + the controlling terminal. @@ -2151,8 +2174,8 @@ raisechar=^^ Edit /etc/ttys and change off to on and dialup to vt100 for the - ttyd0 entry. Otherwise a password will not be - required to connect via the serial console, resulting in a + ttyd0 entry. Otherwise a password will + not be required to connect via the serial console, resulting in a potential security hole. @@ -2215,9 +2238,9 @@ raisechar=^^ This is because &ps2; mice share some hardware with the keyboard and leaving the mouse plugged in can fool the keyboard probe into thinking the keyboard is still there. It is said that a - Gateway 2000 Pentium 90 MHz system with an AMI BIOS that behaves - this way. In general, this is not a problem since the mouse is - not much good without the keyboard anyway. + Gateway 2000 Pentium 90 MHz system with an AMI BIOS that + behaves this way. In general, this is not a problem since the + mouse is not much good without the keyboard anyway. @@ -2341,9 +2364,9 @@ raisechar=^^ console configuration, both the video display and the serial port will become the console at the same time, regardless of the state of the option. - However, note that the dual console configuration takes effect - only during the boot block is running. Once the boot loader - gets control, the console specified by the + However, note that the dual console configuration takes + effect only during the boot block is running. Once the boot + loader gets control, the console specified by the option becomes the only console. @@ -2455,9 +2478,9 @@ Keyboard: no you may want to do so in order to make sure things are set up correctly. - Hit any key, other than Enter, at the console to - interrupt the boot process. The boot blocks will then prompt you - for further action. You should now see something like: + Hit any key, other than Enter, at the console + to interrupt the boot process. The boot blocks will then prompt + you for further action. You should now see something like:>> FreeBSD/i386 BOOT Default: 0:ad(0,a)/boot/loader @@ -2471,10 +2494,11 @@ boot:If you want the serial console but you do not see the prompt on the serial terminal, something is wrong with your settings. In - the meantime, you enter and hit Enter or Return - (if possible) to tell the boot block (and then the boot loader and - the kernel) to choose the serial port for the console. Once the - system is up, go back and check what went wrong. + the meantime, you enter and hit + Enter or Return (if possible) + to tell the boot block (and then the boot loader and the kernel) + to choose the serial port for the console. Once the system is + up, go back and check what went wrong. @@ -2693,7 +2717,8 @@ console="comconsole,vidconsole" - Get the kernel source. (See ) + Get the kernel source. (See ) @@ -2724,7 +2749,8 @@ console="comconsole,vidconsole" - Recompile and install the boot blocks and the boot loader: + Recompile and install the boot blocks and the boot + loader: &prompt.root; cd /sys/boot &prompt.root; make clean @@ -2771,13 +2797,13 @@ ttyd1 "/usr/libexec/getty std.9600" unknown off secure ttyd2 "/usr/libexec/getty std.9600" unknown off secure ttyd3 "/usr/libexec/getty std.9600" unknown off secure - ttyd0 through ttyd3 - corresponds to COM1 through - COM4. Change off to - on for the desired port. If you have changed the - speed of the serial port, you need to change - std.9600 to match the current setting, e.g. - std.19200. + ttyd0 through + ttyd3 corresponds to + COM1 through COM4. + Change off to on for the + desired port. If you have changed the speed of the serial port, + you need to change std.9600 to match the current + setting, e.g. std.19200. You may also want to change the terminal type from unknown to the actual type of your serial @@ -2869,8 +2895,9 @@ start while most systems will let you boot without a keyboard, there are quite a few that will not let you boot without a graphics adapter. Machines with AMI BIOSes can be configured to boot with no graphics - adapter installed simply by changing the graphics adapter setting in - the CMOS configuration to Not installed. + adapter installed simply by changing the + graphics adapter setting in the CMOS configuration to + Not installed. However, many machines do not support this option and will refuse to boot if you have no display hardware in the system. With these