Peripherals Administration
この本のみを検索
PDF 文書ファイルをダウンロードする

Connecting Devices to the Serial Port

B

This appendix provides general information about connecting equipment to serial ports and explains some of the terminology related to that information. For specific instructions on adding terminals or modems, see Chapter 1, "Terminals and Modems."

General Information About Serial Port Devices

A serial port sends a byte of information, bit-by-bit, over a single line. Some manufacturers' serial ports have RS-232-C cabling conventions, but use RS-423 communications signal conventions. You can attach modems, terminals, printers, plotters, or other peripheral serial devices that accept the RS-423 signaling to the serial port connectors on your machine.
Ports are generally wired as data terminal equipment (DTE). This means that the data transmit signal from the port is on pin 2 and the receive data from the peripheral is on pin 3.

Modems

Connect modems directly to the serial port. Modems are wired as data communications equipment (DCE) devices. A DCE device receives serial data from a DTE device on pin 2 and sends it down the telephone line. A DCE device receives telephone data and sends it out on pin 3 to a DTE device.

Other Peripherals

To connect a system directly to a terminal, printer, computer, or other DTE device, use a standard null modem cable that crosses lines 2 and 3, thereby enabling the proper signal connection at the other end.
Some serial interfaces require special additional wiring. For example, the MTI board requires pin 5 to be asserted. This requirement can be satisfied if the peripheral supplies an appropriate signal; otherwise, pin 4 and 5 can be connected at the MTI connector end of the cable. Check the documentation that came with the peripheral to see if any special wiring is needed.
Make sure the serial device is supported. Note that the Solaris 2.x environment contains drivers to support many devices. However, if you purchase a nonstandard device from a non-Sun manufacturer, you may need to obtain and add an appropriate serial driver from the manufacturer (see Chapter 5, "Device Drivers").

Connecting Terminals

Make sure you have an available serial port on your system. The number of serial ports varies from one system to another. Most systems provide at least two asynchronous serial ports, often controlled by the serial communications controller on the central processing unit board.
If all the existing serial ports are in use, and if you are not planning to disconnect any current peripheral devices to make a port available, you will need to add a new board to increase the number of serial ports. See the appropriate board installation guide for instructions.
When you do have a port available, connect the terminal to the system with a null modem cable. A basic null modem cable swaps lines 2 and 3 so that the proper transmit and receive signals are communicated between two DTE devices. Line 7 goes straight through, connecting pin 7 of the devices at each end of the null modem cable.

Connecting Modems

The Solaris 2.x environment supports many popular modems. Models that have been found to work especially well include: the Hayes(R) Smartmodem 1200(TM) and Telebit(TM) TrailBlazer(TM); and, the USRobotics(R) Courier 2400(TM). In this section, you'll find general advice for setting switches on each of these three models.

Note - See the documentation accompanying the modem for specific procedures on how to set the switches. If you have questions about the proper modem settings, contact the modem manufacturer.

Connecting Cables

Connect the modem to an open serial port on the system with an RS-232-C cable that has pins 2 through 8 and pin 20 wired straight through. You may also use a full 25-pin cable to connect the modem to the system. Make sure all the connections are secure.

Setting Modem Switches

The switch setting examples listed below work for use with tip and uucp. Always read the manufacturer's manual before attempting to adjust equipment.

Note - After changing the switch settings on any model, you must turn off power to the modem, wait a few seconds, and then turn on power again.

Looking at the front of a properly installed modem, you should see TR light up when the modem is not in use. If auto-answer is enabled (switch #5), AA should also be lit. The lights should be lit or blinking when the modem is in use.

Example 1 - Hayes Smartmodem 1200

The proper switch settings follow. There is only one switch panel on the Hayes Smartmodem 1200 modem; down is On and up is Off.
  • Switch 1--up for hardware data terminal ready
  • Switch 2--down for numeric result codes
  • Switch 3--down to send result codes
  • Switch 4--down to not echo commands
  • Switch 5--up to answer incoming calls
  • Switch 6--up for hardware carrier detect
  • Switch 7--up for connection to RJ11 modular jack
  • Switch 8--down to enable command recognition

Example 2 - USRobotics Courier 2400

The proper switch settings follow. There are two switch panels on the USRobotics Courier 2400 modem: a 10-switch panel and a single ''Quad'' switch panel. On the USRobotics modem, down is On and up is Off.
  • Switch 1--up for hardware data terminal ready
  • Switch 2-- down for numeric result codes
  • Switch 3--down to send result codes
  • Switch 4--down to not echo commands
  • Switch 5--up to answer incoming calls
  • Switch 6--up for hardware carrier detect
  • Switch 7--up for connection to RJ11 modular jack
  • Switch 8--down to enable command recognition
  • Switch 9--down to not disconnect with +++
  • Switch 10--up for feature not used
  • ''Quad'' switch--up
  • Pins 2 and 3 wired straight through

Example 3 - Telebit TrailBlazer

The TrailBlazer modem must have internal registers set to work properly with cu and uucp. The first time the system is connected to the modem, you must enter the following setup sequence to use the TrailBlazer:

  AT &F Q6 S51=254 S52=2 S53=1 S54=3 S58=0 S111=30 &W  

Note that the above sequence may be slightly different from the one shown in the TrailBlazer documentation. You should read the TrailBlazer documentation fully to make sure the sequence is right for your system.

Settings for Other Modems

Hayes-compatible modems that use the Hayes AT command set may work with cu and uucp software. Configure the modem to:
  • Use hardware data terminal ready (DTR). That is, when the system drops DTR (for example, when someone logs off) the modem should hang up.
  • Use hardware carrier detect (CD). That is, the modem only raises the CD line when there is an active carrier signal on the phone connection. When carrier drops, either due to the other end of the connection being terminated or the phone connection being broken, the system will be notified and act appropriately. The CD signal is also used for coordinating dial-in and dial-out use on a single serial port and modem.
  • Respond with numeric result codes.
  • Send result codes.
  • Not echo commands.

Debugging Hints

If you encounter problems with your new hardware, check the cabling and connections first.
Verify that the new device accepts the RS-423 communications protocol, and consult the manufacturer's manual to make sure the device has been installed properly.
Are the system and the new device set up for compatible communication? Many systems default to the following signal parameters:
  • Seven data bits
  • Even parity
  • 9600 baud rate
  • Flow control enabled (XON/XOFF)
Check which control signals the other equipment expects.
Next, check the condition of the cable. Sometimes a cable becomes damaged, resulting in signals being flipped randomly. A line may receive when it should transmit, or the reverse.
To check for cable problems it is helpful to have a breakout box. A breakout box plugs into the RS-232-C cable, providing a patch panel that allows you to connect any pin to any other pin(s); it will often contain light-emitting diodes, which display the presence or absence of a signal on each pin. These tools can be purchased through most computer hardware suppliers.
Even the most routine installation can sometimes hit unexpected snags. If something does not appear to be working properly, try the following:
  • Check that all devices (modems, terminals, and computer) are properly turned on.
  • If you cannot access a port, and find a process running on it when you type the ps command, then make sure you have pin 8 connected in your cable. If that does not work, check that your device driver is configured properly to set the correct flag for the line to Off.
  • Sometimes even when both the hardware and software are correct, the device driver gets into a state where it will not let the alternate port be opened. You must do a kill -1 1 to notify init and reset the flags on the device driver.
  • If you get a can't synchronize with hayes error message when using a Hayes-compatible modem, check internal and external modem switch settings, and check the cable connection. Turn the modem off and then on again if necessary.
  • If you get a can't synchronize with ventel error message when using a Hayes-compatible modem, look in the /etc/remote file and make sure you have changed at=ventel to at=hayes.
  • The message all ports busy may mean that the port is actually busy running a dial-in user or the data carrier detect (DCD) signal is being asserted by the modem. You can do a ps to see what is running. You should check that you have properly set up the carrier detect signal from the modem as well.
  • Check the /var/spool and /var/spool/locks directories. If no process is currently using the serial port, there may be a leftover lock file. It will have a name like LCK.cua0. If you change any modem switch, unplug the modem and turn its power off. Then, after waiting several seconds, turn on the modem's power again.