projects
/
huawei.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
47be57c
)
query Huawei and ZTE specific AT commands
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 29 Jan 2012 12:46:35 +0000
(13:46 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 29 Jan 2012 12:46:35 +0000
(13:46 +0100)
at-chat.pl
patch
|
blob
|
history
diff --git
a/at-chat.pl
b/at-chat.pl
index
37fa988
..
a9a8756
100755
(executable)
--- a/
at-chat.pl
+++ b/
at-chat.pl
@@
-56,7
+56,9
@@
c 'ATZ' => 'reset';
c 'ATI' => 'info';
c 'ATI' => 'info';
-c 'AT+CGMI' => 'manufacturer';
+c 'AT+CPIN?' => 'SIM pin';
+
+my $manufacturer = c 'AT+CGMI' => 'manufacturer';
c 'AT+CGMM' => 'model';
c 'AT+CGMM' => 'model';
@@
-74,6
+76,10
@@
c 'AT+CNUM' => 'MSISDN';
c 'AT+CLCK=?' => 'facility lock';
c 'AT+CLCK=?' => 'facility lock';
+if ( $manufacturer =~ m/Huawei/i ) {
+
+print "# Huawei\n";
+
c 'AT^HWVER' => 'hardware version';
c 'AT^CVOICE?' => 'is voice enabled?';
c 'AT^HWVER' => 'hardware version';
c 'AT^CVOICE?' => 'is voice enabled?';
@@
-82,6
+88,17
@@
c 'AT^DDSETEX=?' => 'voice output';
c 'AT^SYSINFO' => 'sys info';
c 'AT^SYSINFO' => 'sys info';
+} elsif ( $manufacturer =~ m/ZTE/i ) {
+
+print "# ZTE\n";
+
+c 'AT+GMR' => 'revision';
+
+c 'AT+GCI?' => '?';
+
+c 'AT+ZOPRT?' => '?';
+
+}
$port->close || die "can't close port $!";
$port->close || die "can't close port $!";