From 9952172f4e84cc1fe59a84052e3c20658c89bf4b Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 27 Jan 2012 21:39:04 +0100 Subject: [PATCH] enter in diag mode automatically --- qcdm.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 ( @_ ) { -- 2.20.1