Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.*.swp
*.o
atinout
atinout.1
atinout.1.html
atinout.spec
120 changes: 120 additions & 0 deletions atinout.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "ATINOUT" "1" "July 2022" ""
.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 if 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 <<EOF
AT+CSCS="UTF\-8"
AT+CGMI
AT+CGMR
AT+CPBS="SM"
AT+CPBR=1,240
AT+CPBS="ME"
AT+CPBR=1,7000
EOF
$ atinout save\-phonebooks /dev/ttyACM0 phonebook_backup\.`date "+%Y\-%m\-%d_%H\-%M"`
$
.fi
.IP "" 0
.P
List current calls\. The information text format is (see 27\.007 for details):
.IP "" 4
.nf
+CLCC: <id1>,<dir>,<stat>,<mode>,<mpty>[,<number>,<type>[,<alpha>[,<priority>]]]

# 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)
235 changes: 235 additions & 0 deletions atinout.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.