Talk over communications line (QNX)
qtalk [options] [system]
The qtalk utility reads any data emitted by the modem during this delay period and displays the data on your screen before the command is started.
If you use -x without this option, qtalk won't wait to start the command. As a result, if the modem emits any information once qtalk has emitted the dialing string, you have no way of predicting whether qtalk or the command will see that information.
If you specify an init_string, it will be emitted to the modem before anything else.
If the modem is defined in the modem pool file /etc/config/qtalk.modems, the init_string may be overridden by an init_string defined in the entry for the selected modem. The init_string defined closest to the actual naming of the selected device always supersedes other init_strings (for more information, see the discussion on modem pools).
This protocol: | Will do a: |
---|---|
qcp_se | qcp send |
qcp_re | qcp receive |
zmodem_se | ZMODEM send |
zmodem_re | ZMODEM receive |
other_se | other send |
other_re | other receive |
You can disable qtalk's automatic invocation of a protocol by setting command to a null string (""). For example, the following would disable automatic ZMODEM receive:
qtalk -o zmodem_re=""For information on default protocol commands or for more information on automatic invocation of protocols, see the section entitled "Invoking qcp and ZMODEM automatically" in the body of the utility description.
The other protocol lets you configure qtalk to use your own commands for sending and receiving files.
See also the description of the T command in the Commands section.
The qtalk utility lets QNX users communicate with other computers via a serial line that's usually connected to a modem. The destination may be another host computer, in which case qtalk lets you use your computer as a terminal. The qtalk utility also lets two QNX users communicate and transfer files.
The qtalk utility sends any characters you type on the keyboard to the other system via the serial port. Any characters received through the port are displayed. In local echo mode, typed characters are echoed on the display as well as being sent out the serial port.
The qtalk utility lets you to define new defaults for anything that can be specified by command-line options. You define these settings by creating or modifying a system (in the global and/or your personal dialing directory) called defaults. The first thing qtalk does is to look up the defaults dialing entry and process it, before looking at the command-line options that have been supplied. So, the qtalk utility will look for defaults first in $HOME/.qtalk and, if not found there, then in /etc/config/qtalk. This allows new system-wide defaults to be set by a system administrator, while leaving individual users free to create their own default behavior for qtalk.
Command-line options defined in the defaults system are applied before the options specified in the actual command line. Thus you can override the settings in your defaults system with command-line options.
The -s command-line option doesn't change how qtalk searches for the defaults system. |
You can log a qtalk session with the -l option:
qtalk -l /dev/par
or, if you wanted the log to go to the file /tmp/logfile:
qtalk -l /tmp/logfile
You can use a special command character to set special modes and options while you're within the qtalk environment. This special character defaults to Ctrl-A (^A) unless you change it with the -c option when you invoke qtalk. When you enter the command character, you will be shown some current settings and will be prompted to enter a command. If you enter the command character twice, a single command character is echoed to the modem. This allows you to send the command character to the remote system if you need to.
You'll find the -d hh option useful when communicating with computers that have a rubout character different from the one you're used to. Many systems use the Backspace key (08 hex) to erase a character. QNX systems default to the ASCII rubout character (7F hex). If you type:
qtalk -d 08
qtalk will translate your Rubout key into backspace automatically.
Using very high-speed modems, or producing a log on slow printers or floppy disks, may cause some characters to be lost. To prevent characters from being lost in these cases, you can enable input flow control prior to invoking qtalk (see stty). This works only if the machine sending the data supports flow control of its output.
The qtalk utility lets you transfer files through either of two methods. You invoke the simpler method with the w (write) and l (log) commands to transfer text files to or from another system. No error checking is performed, however, so you should use this method only when communication lines are good (i.e. direct connect lines or reliable modem connections), or when the other system does not support any of the file transfer methods available from qtalk.
To send a file to a host using write, you should first make the host capable of receiving a stream of text. You could do this with an editor or the cat utility. You can then use the write command to send the file.
To receive a file from a remote host using the l (log) command, first turn on logging to the desired file (with the l command), then enter a command into the remote system to make it display the file (e.g. cat filename on a UNIX type system.)
The second method, involves the s (send) and r (receive) commands, providing access to more sophisticated protocols that include error checking and retransmission when transferring files to other systems.
The qtalk utility attempts to detect qcp and zmodem file transfers when qtalk is on the receiving end. If it detects one of these, qtalk automatically invokes the appropriate receive command for the protocols being used. You can disable this behavior; see the -o option.
When a qcp or zmodem transfer is detected, or when the receive command is given, qtalk will run (through a shell) one of the protocol_re commands.
The corresponding protocol_se commands (to send a file) are invoked only when the send command is given; never automatically.
Here are the default protocol commands:
qcp_re="qcp $MODEM re" qcp_se="qcp $MODEM se $FILENAME" zmodem_re="rz <$MODEM >$MODEM" zmodem_se="sz $FILENAME <$MODEM >$MODEM" other_re="" other_se=""
You can't automatically enable the other_re protocol. To invoke other_re or other_se, choose send or receive from the command menu when the current file transfer protocol has been set to other.
The qtalk utility provides a modem pool facility that serves as a shorthand for specifying multiple modems (otherwise done by specifying multiple -m options). For example, if a modem pool named hst was set up which included the modems //1/dev/ser1, //2/dev/ser1, //2/dev/ser2 and //30/dev/ser2, then instead of having to type:
qtalk -m //1/dev/ser1 -m //2/dev/ser1 -m //2/dev/ser2 -m//30/dev/ser2
you could simply type:
qtalk -m hst
The qtalk utility tries each device in each pool until it finds a device that's unused (i.e. no other process has the device open). When it finds an unused device, qtalk will do the following, in order:
You define modem pools in the /etc/config/qtalk.modems file. Here's the format of this file:
poolname modem[,init_string]... [ <whitespace> modem[,init_string]]... ...
where:
If modem is a modem device (e.g. //3/dev/ser2) and the entry for that device contains an init_string, qtalk will, upon selecting that device, emit the string to the device and then emit any other communication to the device.
If modem is a modem pool (e.g. hst), qtalk will use the first available modem device in that pool. If the selected modem entry contains an init_string, that string will be emitted. If the selected entry doesn't contain an init_string, but the line that references the modem pool does contain an init_string, that string will be emitted.
You can specify multiple modem definitions, separated by whitespace. You may continue onto the next line by starting it with one or more space or tab characters. If the next line doesn't begin with whitespace, it will be regarded as a new pool definition, not a continuation of the previous one.
If you specify an init_string, you can't insert whitespace between the modem, the comma, and the init_string. Also, if the init_string contains any spaces or tabs, you must enclose it in quotes. |
Here's an example entry in the /etc/config/qtalk.modems file:
hst //1/dev/ser1 //2/dev/ser1 //2/dev/ser2 //30/dev/ser2,"" resethst hst,"^~~~ATZ"
This example defines two pools: one (hst) a simple pool of modems; the other (resethst) a pool that has the same modems but with an init_string of "^~~~ATZ". Note that one modem in the hst pool, //30/dev/ser2, has an empty init_string (i.e. "").
Any modems accessed through the hst pool won't have an init_string emitted to the device. But if those same modems are accessed through a reference to the resethst pool, all but //30/dev/ser2 will have the "^~~~ATZ" init_string emitted to the device.
The presence of the empty init_string ("") ensures that no init_string will be sent to //30/dev/ser2 regardless of whether the modem was accessed via the hst pool or the resethst pool. This happens because the init_string closest in the pool hierarchy to the actual naming of the device always supersedes any other init_strings.
As an alternative to defining the resethst pool, you could either name the "^~~~ATZ" init_string for each modem in the hst pool, or you could specify the init_string with the -m option (-m hst,"^~~~ATZ" does the same as -m resethst).
In init_strings (as well as dialing strings, described below), you can specify any of the following characters; qtalk will act on these characters instead of sending them straight to the modem:
To specify any of the following commands, you first press the command character (usually Ctrl-A).
If you enter a question mark (?) for the system name, you'll see the contents of both dialing directories (if they exist) and you'll be prompted again for a system name. To abort the dialing command and return to normal communications mode, press Enter without entering a name.
Dialing is implemented by looking up the system name -- which can also be specified on the command line when qtalk is invoked -- first in your $HOME/.qtalk file, then in the /etc/config/qtalk file. These files share the same format:
system_name [dialing_string] [ <whitespace> command-line_options] ...In these files, you must specify the system name at the very left of the line with no whitespace before it. The dialing string is optional (this string contains commands to be sent to the modem before you're given interactive control). If you specify a dialing string, you must separate it from the system name by spaces or tabs, or both.
In dialing strings, you can specify any of the following characters; qtalk will act on these characters instead of sending them straight to the modem:
If you specify these additional lines, begin each one with at least one tab or space character. Note that a single command-line option can't span multiple lines. You can, however, place just one option per line.
You can use l to take "snapshots" of data from a host computer.
When the currently selected protocol is qcp, you can send more than one file by specifying the x=index_file option when qtalk asks for the file to send. This file contains a list of files to send, one per line. You can also specify more than one filename, separated by spaces.
The qcp utility lets you follow the name of the file to send with the name of the destination file. You separate the two filenames with a comma. This is also true for filenames within an index file (option x=). For example:
Send file(s)? file1 main.c,new_main.csends the file file1 as file1 and the file main.c with the name new_main.c. If you don't specify a new name, qtalk creates a file with the same name as the file that is sent.
Files received by qtalk using the qcp protocol have the same attributes and date as the file on the sending machine.
Most transfer protocols require that the modem port be configured for 8-bit data (Use the -b option to set the serial port to 8 data bits; also see the stty command).
The T command lets you switch the terminal emulation used by the console that qtalk is running on. Make sure that the device qtalk is running on supports the specified protocol.
You can specify one of the following terminal types:
This type: | Is useful for: |
---|---|
ansi | communicating with systems that support ANSI or VT100 type terminals. It uses ISO Latin-1 supplemental characters (default mode of Dev.ansi console driver). |
pcansi | communicating with a DOS BBS. This type uses the IBM PC supplemental character set. |
qnx | communicating between QNX systems. |
qnxs | communicating with QNX2 systems that have been set up to run with a qnxs terminal. |
You may abort writing to the modem at any time by pressing any key.
The ZMODEM utilities rz and sz also implement XMODEM and YMODEM. |
Call the system "home":
qtalk home
Communicate with a machine that doesn't echo (half duplex) and expects an ASCII backspace (08 hex) to delete characters.
qtalk -e -d 08
Communicate with another system and print a hardcopy record.
qtalk -l /dev/par
Use the /dev/ser2 serial port on node 2.
qtalk -m //2/dev/ser2
Use the qcp -n option for qcp receives (i.e. receive only files that are newer than existing files).
qtalk -o qcp_re="qcp $MODEM re -n"