projects
/
huawei.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
86f97ad
)
don't modify echo ATE0
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 29 Jan 2012 12:05:45 +0000
(13:05 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 29 Jan 2012 12:05:45 +0000
(13:05 +0100)
at-chat.pl
patch
|
blob
|
history
diff --git
a/at-chat.pl
b/at-chat.pl
index
7157a30
..
0fc9411
100755
(executable)
--- a/
at-chat.pl
+++ b/
at-chat.pl
@@
-35,7
+35,9
@@
sub c {
print STDERR ">>> $cmd >>> $message\n";
$port->write("$cmd\r");
# $port->write_done(1); # flush
print STDERR ">>> $cmd >>> $message\n";
$port->write("$cmd\r");
# $port->write_done(1); # flush
- $port->write_drain;
+# $port->write_drain;
+ $port->read( length($cmd) + 1 ); # slurp echo
+
my $ret = $port->read(1);
again:
while ( my $c = $port->input ) {
my $ret = $port->read(1);
again:
while ( my $c = $port->input ) {
@@
-49,9
+51,9
@@
again:
return $ret;
}
return $ret;
}
-c 'ATE0' => 'echo off';
-
#
c 'ATZ' => 'reset';
-#
+
#
c 'ATE0' => 'echo off';
+c 'ATZ' => 'reset';
+
c 'ATI' => 'info';
c 'AT+CGMI' => 'manufacturer';
c 'ATI' => 'info';
c 'AT+CGMI' => 'manufacturer';