Talk over a communications line
qtalk [options] [system]
Neutrino
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 doesn'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 sees that information.
If you specify an init_string, it's emitted to the modem before anything else.
This protocol: | Does 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 |
and where command is the command that performs the file transfer. This command is run by the shell. The macro $MODEM is set to the pathname of the modem device and, in the case of a send, the macro $FILENAME is set to the filename to be transmitted.
You can disable qtalk's automatic invocation of a protocol by setting command to a null string (""). For example, the following disables 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 on “Invoking qcp and ZMODEM automatically.”
The other protocol lets you configure qtalk to use your own commands for sending and receiving files.
The qtalk utility lets QNX Neutrino 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 Neutrino users communicate and transfer files.
The qtalk utility sends any characters you type on the keyboard to the other system via the modem. Any characters received by the modem are displayed. In local echo mode, typed characters are echoed on the display as well as being sent over the modem.
The qtalk utility lets you define new defaults for anything that you can specify with command-line options. 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 any command-line options. The qtalk utility looks 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 recording of a qtalk session with the -l option:
qtalk -l /dev/par
or, if you want 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're shown some current settings and are 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 Neutrino systems default to the ASCII rubout character (7F hex). If you type:
qtalk -d 08
qtalk translates 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:
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 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 runs (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.
To specify any of the following commands, first press the command character (usually Ctrl-A).
If you enter a question mark (?) for the system name, the contents of both dialing directories (if they exist) are displayed and you're 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 acts on these characters instead of sending them straight to the modem:
Additional lines beneath the line that defines the system name and dialing string may contain additional qtalk command-line options to apply when talking to this system.
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 at slow speed.
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. 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.c
sends 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).
Call the system named 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 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"