The following are tips for getting your host to be able to connect over the modem to
another computer. This is appropriate for establishing a terminal session with a remote
host.
This is useful to log onto a BBS.
This kind of connection can be extremely helpful to get a file on the Internet if you
have problems with PPP. If you need to FTP something and PPP is broken, use the terminal
session to FTP it. Then use zmodem to transfer it to your machine.
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.
The Hayes driver is not smart enough to recognize some of the advanced features of
newer modems--messages like BUSY, NO
DIALTONE, or CONNECT 115200 will just confuse it. You
should turn those messages off when you use tip (using ATX0&W).
Also, the dial timeout for tip is 60 seconds. Your modem
should use something less, or else tip will think there is a communication problem. Try
ATS7=45&W.
Make what is called a “direct” entry in your /etc/remote file. For example, if your modem is hooked up to the
first serial port, /dev/cuad0, then put in the following
line:
cuad0:dv=/dev/cuad0:br#19200:pa=none
Use the highest bps rate your modem supports in the br capability. Then, type tip cuad0 and you will be connected to your modem.
Or use cu as root with the
following command:
# cu -lline -sspeed
line is the serial port (e.g./dev/cuad0) and speed is the
speed (e.g.57600). When you are done entering the AT commands
type ~. to exit.
The @ sign in the phone number capability tells tip to look
in /etc/phones for a phone number. But the @ sign is also a special character in capability files like /etc/remote. Escape it with a backslash:
pn=\@
Put what is called a “generic” entry in your /etc/remote file. For example:
tip115200|Dial any phone number at 115200 bps:\
:dv=/dev/cuad0:br#115200:at=hayes:pa=none:du:
tip57600|Dial any phone number at 57600 bps:\
:dv=/dev/cuad0:br#57600:at=hayes:pa=none:du:
Then you can do things like:
# tip -115200 5551234
If you prefer cu over tip, use a
generic cu entry:
cu115200|Use cu to dial any number at 115200bps:\
:dv=/dev/cuad1:br#57600:at=hayes:pa=none:du:
and type:
# cu 5551234 -s 115200
Put in an entry for tip1200 or 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.
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:
pain|pain.deep13.com|Forrester's machine:\
:cm=CONNECT pain\n:tc=deep13:
muffin|muffin.deep13.com|Frank's machine:\
:cm=CONNECT muffin\n:tc=deep13:
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.
This is often a problem where a university has several modem lines and several
thousand students trying to use them.
Make an entry for your university in /etc/remote and use @ for the pn capability:
big-university:\
:pn=\@:tc=dialout
dialout:\
:dv=/dev/cuad3:br#9600:at=courier:du:pa=none:
Then, list the phone numbers for the university in /etc/phones:
big-university 5551111
big-university 5551112
big-university 5551113
big-university 5551114
tip will try each one in the listed order, then give up. If
you want to keep retrying, run tip in a while loop.
Ctrl+P 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 variable.”
Type ~sforce=single-char
followed by a newline. single-char is any single
character. If you leave out single-char, then the
force character is the nul character, which you can get by typing Ctrl+2 or Ctrl+Space. A pretty good value for single-char is Shift+Ctrl+6, which is only used on some terminal
servers.
You can have the force character be whatever you want by specifying the following in
your $HOME/.tiprc file:
force=single-char
You must have pressed Ctrl+A, tip's “raise character,” specially designed for people
with broken caps-lock keys. Use ~s as above and set the variable
raisechar to something reasonable. In fact, you can set it to
the same as the force character, if you never expect to use either of these features.
Here is a sample .tiprc file perfect for Emacs users who need to type Ctrl+2 and Ctrl+A a lot:
force=^^
raisechar=^^
The ^^ is Shift+Ctrl+6.
If you are talking to another UNIX® system, you can
send and receive files with ~p (put) and ~t (take). These commands run cat and echo on the remote system to accept and send files. The syntax
is:
~p local-file [remote-file]
~t remote-file [local-file]
There is no error checking, so you probably should use another protocol, like
zmodem.
To receive files, start the sending program on the remote end. Then, type ~C rz to begin receiving them locally.
To send files, start the receiving program on the remote end. Then, type ~C sz files to send them to the
remote system.