📄 vmcp.8
字号:
.\" Process this file with.\" groff -man -Tascii vmcp.8.\".TH VMCP 8 "14 July 1999" "Vmcp Version 0.6.1" "User Manuals".SH NAMEvmcp \- Voice Modem Control Program.SH SYNOPSIS.B vmcp[\fB-c \fIcommand\fR][\fB-d \fIdevice\fR][\fB-e\fR][\fB-g\fR][\fB-h\fR][\fB-i \fIin_file\fR][\fB-k\fR][\fB-l \fIlockfile\fR][\fB-o \fIout_file\fR][\fB-q\fR][\fB-s \fIesc_file\fR][\fB-t \fIsec\fR][\fB-w \fIwaitstring\fR][\fB-W \fIskipstring\fR][\fB-x \fIesc_string\fR][\fB-z \fI9600\fR | \fI19200\fR | \fI38400\fR | \fI57600\fR | \fI115200\fR | \fI230400\fR].SH DESCRIPTIONA simple way to drive a modem is through a program that allowsinteraction of the type \fIsend-string\fR, \fIwait-string\fR.A command string is sent to the modem and then the program waitsfor a specified answer from the modem itself..spFor voice operation we must add some functionalities becauseit is not possible to give a stream of digitized voice onthe command line and we must capture the incoming voice to afile too. Beside that we have to handle the \fIescaped chars\fRthat the modem embed in the voice stream when we are receivingvoice (to signal silence, DTMF tones, etc.), and those we sendto the modem when we are sending voice..spVoice Modem Control Porgram (\fIvmcp\fR) faces all the matters:.in +0.5i.ti -0.5i\fBi)\fR it can send to the modem a string specified on the command line.ti -0.5i\fBii)\fR it can send to the modem a binary file.ti -0.5i\fBiii)\fR it can capture data from the modem to a binary file, stripping escaped chars.ti -0.5i\fBiv)\fR it can capture escaped chars from the modem to a separate file.ti -0.5i\fBv)\fR exits on receiving a given string from the modem.ti -0.5i\fBvi)\fR exits on receiving a given escaped char from the modem.ti -0.5i\fBvii)\fR exits on timeout or keypress.SH OPTIONS.IP "\fB-c \fIcommand\fR"The specified command is sent to the modembefore sending the input file (\fI-i\fR option).String is parsed for escaped chars (see below).If string is prefixed with "AT" or "at", a pause of 2 msis executed before sending the command to the modem. Thisis required by some modem brands..IP "\fB-d \fIdevice\fR"Device at which the modem is connected to. If \fI-d\fR optionis not specified, \fIttyS0\fR is assumed. No leading \fI/dev/\fRrequired..IP "\fB-e\fR"Enable DLE-escaped characters handling. When \fIvmcp\fR receives aDLE char (10 hex) from the modem, it extracts the subsequent charand sends it to the escaped chars file (specified by the \fI-s\fRoption) instead of to the output file (\fI-o\fR option).If a duoble DLE is received, one is sent to the output file andthe other is dropped. Characters sent to the modem from the inputfile (\fI-i\fR option) are checked: if a DLE char is found, itis doubled..IP "\fB-g\fR"Debug option, turn on some message printing..IP "\fB-h\fR"Display a brief help..IP "\fB-i \fIin_file\fR"Send the specified binary file to the modem..IP "\fB-k\fR"Exit if ESC key is pressed. Do not use this option if \fIvmcp\fRis to be run in the background..IP "\fB-l \fIlockfile\fR"Make a lock-file with the specified pathname. Following FSSTND1.2 directives (Linux Filesystem Structure), it is recommended\fI/var/lock/LCK..ttyS\fRn, where n is replaced by a digit (0for the first serial line, 1 for the second...).The lock file is in HDB lockfile format: ten byte ASCII decimalnumber, with a trailing newline..IP "\fB-o \fIout_file\fR"Save output received from the modem to the specified filename.Default is \fI/dev/null\fR..IP "\fB-q\fR"Exit when input file (specified by the \fI-i\fR option) hassent entirely to the modem..IP "\fB-s \fIesc_file\fR"Save DLE\-escaped characters received from the modem to thespecified filename. Default is \fI/dev/null\fR.Option \fI-e\fR must be specified too..IP "\fB-t \fIsec\fR"Exit after a \fIsec\fR seconds timeout. If no \fI-t\fR option isspecified a default of 5 seconds is assumed. To disable timeout,specify zero (\fIvmcp\fR my waits forever)..IP "\fB-w \fIwaitstring\fR"Exit on receipt of specified string from the modem.String is parsed for escaped chars (see below)..IP "\fB-W \fIskipstring\fR"The specified string is skipped before starting to save data to the\fI-o\fR file. The program does not exit at this string.String is parsed for escaped chars (see below)..IP "\fB-x \fIesc_string\fR"Exit on receipt of a DLE\-escaped char contained in the specifiedstring..IP "\fB-z \fI9600\fR | \fI19200\fR | \fI38400\fR | \fI57600\fR | \fI115200\fR | \fI230400\fR"The serial line is set to raw mode, hardware control flags areset to \fIN\fRo parity, \fI8\fR datbits, \fI1\fR stop bit,\fIRTS/CTS\fR flow control enabled. \fIBaud\fR rate is set as specified..br\fIDTR\fR line is dropped for 3 seconds. Many modemsrespond to this signal (or can be instructed to do so) by resettingthemselves to a sane state. Using this option,the \fI-t\fR timeout value should be increased..brThe line is set with (among others) -hupcl and clocal options.In this way no hangup signal is sent when the process closesthe tty and modem control signals are disabled (we are interestedin talking to the modem, not to a remote system, so the connectionis local)..br.SH "ESCAPE CHARS"The strings following the \fI-c\fR, \fI-w\fR and \fI-W\fR options have acarriage return (chr 0Dh)appended by default. They are also parsed to dosome backslash conversion.The following backslash-escaped characters are enabled:.in +0.5i.ti -0.5i\fB\\c\fR suppress trailing carriage return.ti -0.5i\fB\\n\fR new line.ti -0.5i\fB\\r\fR carriage return.ti -0.5i\fB\\nnn\fR the character whose ASCII code is nnn (octal)..SH "EXIT STATUS"\fIVmcp\fR is intended to be used from shell scripts, its exitstatus reflects the result of operation. You can for exampletest it with the bash special parameter \fI$?\fR, which expandsto the status of the most recently executed command. Those arethe exit codes and their meanings:.IP \fB0\fRSuccessful result, \fIvmcp\fR received the string specified bythe \fI-w\fR option or the \fI-q\fR option was specified and theend of input file was reached..IP \fB1\-99\fRSuccessful result, \fIvmcp\fR recived an escaped char containedin the string specified by the \fI-x\fR option. The code indicatewhich one: 1 stands for the first, 2 for the second....IP \fB100\fRTimeout has expired..IP \fB101\fRESC key was pressed..IP \fB150\fROut of memory..IP \fB151\fRSyntax error..IP \fB152\fR\fIVmcp\fR was unable to open the communication device specified by the\fI-d\fR option.You must have read-write rights on this device..IP \fB153An error occurred opening the file(s) specified by the\fI-i\fR, \fI-o\fR or \fI-s\fR options..IP \fB154An error occurred writing to the communication device..IP \fB155An error occurred closing the communication device or some file..IP \fB156\fIVmcp\fR was unable to create the lock file specified by the \fI-l\fR option..IP \fB157An error occurred while setting stdin via \fBioctl\fR(2) function call..IP \fB158An error occurred creating the lock file..IP \fB159Unsupported baud rate specified by the \fI-z\fR option..IP "\fBGreather than 200"Exit on signal. Exit status = signal + 200..SH FILES.IP "\fB/dev/ttyS0\fR"Default device used to access the modem if \fI-d\fR option isnot specified..IP "\fB/dev/null\fR"Default destination for input, output and escaped-char files if\fI-i\fR, \fI-o\fR or \fI-s\fR options are not specified..IP "\fB/var/lock/LCK..ttyS\fRn"Suggested lock file to be created with the \fI-l\fR option..SH NOTESTo use \fIvmcp\fR the modem must be connected to the system bya full-wired serial cable because the program uses RTS, CTS andDTR signals. No problems with internal modems. .SH "SEE ALSO"\fBans\fR(8),\fBstty\fR(1L),\fBtermios\fR(2).SH AUTHORNiccolo Rigacci <fd131@cleveland.freenet.edu>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -