Tip and /etc/remote

You may hate tip and love kermit or pcomm. I understand. But, do this next procedure via tip to keep it simple, OK?

Decide which serial port you want to use. (One with no cable already plugged in is often a good bet.) The port will be labeled A, B, A/B or could even be C or higher.

If you use one labeled A/B and have no Y-type splitter cable plugged into it, you'll have access only to port A. With the splitter, you'll get ports A and B on separate sockets f the splitter cable. The pinout of the splitter cable can be found at the following URL.

http://www.stokely.com/unix.serial.port.resources/A-B-Ycablepinout.html

The Sun serial port device driver splits each physical port into two logical devices, /dev/term/a or /dev/term/b for incoming transmission, and /dev/cua/a or /dev/cua/b for outgoing transmission.

The speed referred to in this section is the DTE or computer-to-modem speed. It is not the modem-to-modem speed. A 14400 bps modem may have a 19200 bps DTE speed.

Make sure you have your serial port permissions right. UUCP should own the outgoing side, and root should own the incoming side.

  1. Execute these commands as root, substituting your port name (a, b, c, or d) where needed.

    prompt# chown uucp /dev/cua/a; chgrp tty /dev/cua/a
    prompt# chown root /dev/term/a; chgrp tty /dev/term/a
    						
  2. Edit the tip configuration file, /etc/remote, and find the entry beginning with hardwire:. This entry is the one you use to program the modem and is not usually used for dialing out directly, unless you enjoy AT commands. (If this is the second modem you're adding, clone the entire hardwire entry and label the new entry hardwire2.) Change it from an entry like the following

    hardwire:
         :dv=/dev/????/?:br#????:el=^C^S^Q^U^D:ie=%$:oe=^D:
    

    to one set to your port (like /dev/cua/a) and baud rate (like 9600).

    hardwire:
        :dv=/dev/cua/a:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
    
  3. Run tip.

    1. Now, use your edited hardwire entry from /etc/remote, type tip hardwire (or tip hardwire2), and press Return.

      You should see connected.

    2. Type ATE1V1 and press Return.

      (This will work for all Hayes-compatible modems, even cheapies.) You should see OK. Congratulations! You're talking with the modem!

    3. Now, issue the appropriate AT commands to program the modem.

      (See “Basic Modem Programming” .)

    4. Don't forget to write the new settings out to the modem's NonVolatile RAM.

    If you don't see OK, you are not communicating with the modem. See if the modem is plugged in, verify the baud rate of the modem and the hardwire entry in /etc/remote, and verify the modem cable.

  4. Exit tip by pressing Return ~.

    (This means to type three separate keys, one at a time, of Return, tilde, period.)

    This step also exits rlogin, so if you're running tip through an rlogin, make that Return ~~. (Return, tilde, tilde, period) or you'll exit only rlogin.

NOTE

Never run tip from a cmdtool. Use a shelltool, xterm, or some other window without scrollbars. The scrollbars can confuse tip's Return processing.

There are exceptions to this caveat, but if you never run tip in a scrollbar-type window, you won't have to remember all the ways it does and does not work.


The cuaa entry (in the /etc/remote example below) allows you to type tip cuaa and talk directly to a modem on port A at 19200 bps, using 7 bits, even parity.

The cuab entry (in the example below) allows you to type tip cuab and talk directly to a modem on port A at 9600 bps, using 8 bits, no parity.

tip some_phone_number looks for the tip0 entry and uses that definition to dial some_phone_number. (In the /etc/remote example below, it uses tip0, which points to UNIX-19200, which sets up a dial-up 19200 bps, 7 bits, even parity, Hayes-compatible modem. UNIX-19200 points to diala, which references /dev/cua/a. Convoluted, eh?)

tip mysystem (below) looks up the mysystem entry and dials the number 14155551234 via a 19200 bps, 7 bits, no parity connection on /dev/cua/a.

/etc/remote Example

The following sample /etc/remote file is set up for:

  • Port a, 19200 bps, Hayes-compatible modem, 7 bits, even parity. (It's 7E1 because there is no p8 entry.)

  • Port b, 9600 bps, Hayes-compatible modem, 8 bits, no parity. (It's 8N1 because there is a p8 entry.)

See the remote(4) manual page for all the possible options.

cuaa:dv=/dev/cua/a:br#19200:
cuab:dv=/dev/cua/b:p8:br#9600
mysystem:pn=14155551234:tc=UNIX-19200:
hardwire:
        :dv=/dev/cua/b:p8:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
tip0|tip19200:tc=UNIX-19200:
tip9600:tc=UNIX-9600:
UNIX-9600:
        :el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#9600:tc=dialb:
UNIX-19200:
        :el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#19200:tc=diala:
diala:
        :dv=/dev/cua/a:
dialb:
        :p8:dv=/dev/cua/b:

The attributes are listed in Table 131.

Table 131. etc/remote Attributes
Attribute Description
dv Device to use for the TTY.
du Make a call flag (dial-up).
pn Phone numbers (@ =>'s search phones file; possibly taken from PHONES environment variable).
at ACU type.
ie Input EOF marks (default is NULL).
oe Output EOF string (default is NULL).
cu Call unit (default is dv).
br Baud rate (default is 300).
tc Continue a capability.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.3.136