X-Git-Url: http://git.rot13.org/?p=huawei.git;a=blobdiff_plain;f=qcdm.pl;h=693e48dfa76b0150b7647c11351f9beef296f17c;hp=21a1673581dbadeb912944ac128e822a9d56988e;hb=47be57c9c075d029ca9b63bc93658fdc9c97112b;hpb=932883ea61826723d57f912fae6fa3938393f286 diff --git a/qcdm.pl b/qcdm.pl index 21a1673..693e48d 100755 --- a/qcdm.pl +++ b/qcdm.pl @@ -72,7 +72,11 @@ $port->read_char_time(3000); # 5 s char timeout $port->read_const_time(3000); # 1 s read timeout while ( my $drain = $port->input ) { - warn "# drain $drain\n# /drain\n"; + warn "# drain $drain\n"; + + $port->write('AT$QCDMG' . "\r"); + warn "DIAG mode: ", $port->read(2), $port->input; # OK+cr/lf + } my $diag = { @@ -97,9 +101,6 @@ my $diag = { warn "## using $device\n"; -#$port->write('AT$QCDMG'); -#warn "DIAG mode: ", $port->read(2), $port->input; # OK+cr/lf - sub as_hex { my @out; foreach my $str ( @_ ) {