.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "ATINOUT" "1" "September 2013" "" "" . .SH "NAME" \fBatinout\fR \- Send AT commands to modem, capturing the response . .SH "SYNOPSIS" \fBatinout\fR \fIinput_file\fR|\fB\-\fR \fImodem_device\fR \fIoutput_file\fR|\fB\-\fR . .br \fBatinout\fR \fB\-\-version\fR . .br \fBatinout\fR \fB\-\-usage\fR . .br \fBatinout\fR \fB\-\-help\fR . .br . .SH "DESCRIPTION" \fBAtinout\fR reads a list of AT commands\. It sends those commands one by one to the modem, waiting for the final result code for the currently running command before continuing with the next command in the list\. The output from the commands is saved\. . .P Notice that \fBatinout\fR is strictly about sending AT commands only; it cannot be used for AT commands that expect additional input data (e\.g\. AT+CMGS etc)\. . .SH "FILES" \fBAtinout\fR expects \fIinput_file\fR to be a list of AT command to be run\. If the file name \fB\-\fR is used then standard input is read\. . .P Although the above states a list of AT commands it is actually not just a list of command but more generally a list of AT command lines\. However the rest of the man page will just refer to AT commands; running several commands in one command line offers no benefits, and if one of them fails you have no idea of which one failed\. So unless maybe for a single run on the command line (see EXAMPLES), I recommend against putting more than one command on each command line\. . .P And if the distinction between AT command and AT command line was not something you were deeply familiar with you should read the ITU V\.250 specification about AT commands\. In fact, unless you already have read V\.250 before, you absolutely should go to http://www\.itu\.int/rec/T\-REC\-V\.250\-200307\-I/en and do so right away\. . .P The modem is identified with \fImodem_device\fR (e\.g\. /dev/ttyS0 (COM1), /dev/ttyACM0 (USB phone serial interface), \.\.\.)\. No serial configuration (e\.g\. speed, parity) is done before opening the device\. . .P The responses from the AT commands are written to \fIoutput_file\fR, or standard output i the file name \fB\-\fR is given\. . .SH "OPTIONS" The following list of options are supported: . .TP \fB\-h\fR, \fB\-\-help\fR Prints explanation and gives an example on usage\. . .TP \fB\-\-usage\fR Prints information about arguments and options\. . .TP \fB\-\-version\fR Print version information\. If this is the only option given, also prints copyright/licensing information\. . .SH "EXAMPLES" Check that the modem is connected and alive\. . .IP "" 4 . .nf $ echo AT | atinout \- /dev/ttyACM0 \- AT OK $ . .fi . .IP "" 0 . .P Hang up any calls\. . .IP "" 4 . .nf $ echo ATH | atinout \- /dev/ttyACM0 \- ATH OK $ . .fi . .IP "" 0 . .P Query how many entries the phone book has for ME storage\. . .IP "" 4 . .nf $ echo \'AT+CPBS="ME"; +CPBR=?\' | atinout \- /dev/ttyACM0 \- AT+CPBS="ME"; +CPBR=? +CPBR: (1\-7000),80,62 OK $ . .fi . .IP "" 0 . .P Backup all phone numbers\. This will most likely not be the same as a full backup of all contact information, but at least the names and numbers are saved which is the most vital information\. . .IP "" 4 . .nf $ cat > save\-phonebooks <,,,,[,,[,[,]]] # No active calls $ echo AT+CLCC | atinout \- /dev/ttyACM0 \- AT+CLCC OK $ # One active call $ echo AT+CLCC | atinout \- /dev/ttyACM0 \- AT+CLCC +CLCC: 1,0,3,0,0,"0123456789",129,"",0 OK $ . .fi . .IP "" 0 . .SH "ENVIRONMENT" No environmental variables are used\. . .SH "BUGS" \fBAtinout\fR does not support reading response lines longer than 4095 characters\. . .P \fBAtinout\fR does not do any serial port configuration, it just opens the device as is\. . .SH "COPYRIGHT" Atinout is Copyright (C) 2013 Håkon Løvdal \fIhlovdal@users\.sourceforge\.net\fR . .SH "SEE ALSO" V\.250 (http://www\.itu\.int/rec/T\-REC\-V\.250\-200307\-I/en), 27\.007 (http://www\.3gpp\.org/ftp/Specs/html\-info/27007\.htm), 27\.005 (http://www\.3gpp\.org/ftp/Specs/html\-info/27005\.htm)