From: Dobrica Pavlinusic Date: Sun, 29 Jan 2012 12:49:53 +0000 (+0100) Subject: specify port at command line X-Git-Url: http://git.rot13.org/?p=huawei.git;a=commitdiff_plain;h=49d19023d9b7c2f085c5f8dfe331db919431610f;hp=a9d46f9399516b6a48cb12bffd812024a802a264 specify port at command line --- diff --git a/qcdm.pl b/qcdm.pl index 693e48d..03b20e2 100755 --- a/qcdm.pl +++ b/qcdm.pl @@ -53,7 +53,7 @@ sub crc { -my $device = $ENV{DEVICE} || '/dev/ttyUSB2'; # last device! control port! +my $device = shift @ARGV || $ENV{DEVICE} || '/dev/ttyUSB2'; # last device! control port! my $port = Device::SerialPort->new( $device ) || die "$device: $!"; $port->baudrate(115200) || die "fail $device baudrate";