Thanks, but it doesnt work. I am experiencing some very odd behaviour with the suggested snipped.
When run manually, the AT command returns to OK within 500ms. Since the RegEx would match and it still times out, I believe it safe to conclude that it still doesnt pass in the AT command.
More important is the fact that no matter what timeout I set, it throws the warning after ~2 seconds. I've set 50 seconds in the example below:
and the output I get from the above:print "Before timeout: " . localtime() . "\n"; my $timeout = 50; $exp->expect($timeout, [qr/^OK$/ => sub { print "Success!\n"; }], [qr/^ERROR$/ => sub { print "Failure!\n"; }]) or warn "Timeout!"; print "After timeout: " . localtime() . "\n";
Before timeout: Tue Nov 8 03:31:02 2011 Timeout! at getdbm.pl line 18. After timeout: Tue Nov 8 03:31:04 2011
Am I experiencing a bug here, or am I (still) an idiot?
In reply to Re^2: Net:SSH::Expect and microcom?
by Anonymous Monk
in thread Net:SSH::Expect and microcom?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |