I've gotten a bit closer, but not quite there yet
#!/usr/bin/perl use strict; use Net::SSH2; my $ssh = Net::SSH2->new(); $ssh->connect('10.10.10.10') or die; if ($ssh->auth_password('zzz','xxx')) { $ssh->debug(1); my $chan = $ssh->channel(); $chan->shell(); print $chan "microcom /tmp/dev/mux1\n"; sleep(10); print $chan "AT+CSQ"; select(undef,undef,undef,3.0); my ($len, $buf); print $buf while ($len = $chan->read($buf,1)) > 0; $chan->close; } else { warn "auth failed.\n"; }
This one clearly shows me that the AT+CSQ is not passed on - when connecting to the modem, it will report "ERROR" after ~20 seconds of nothing going on. And it does just that. Any ideas on how to move on from here?
In reply to Re: Net:SSH::Expect and microcom?
by Anonymous Monk
in thread Net:SSH::Expect and microcom?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |