Hi
Using version 5.14
This works perfectly with 4.x
Connecting via ssh with the following script
[...]
#!/usr/bin/expect -f
set USER xxxxxxxxxxxxx
set PASSWD xxxxxxxxxxxxxxxx
set timeout 30
spawn /usr/bin/ssh $USER@[lrange $argv 0 0] "/interface wireless reg pr"
expect {
"Are you sure you want to continue connecting (yes/no)?" {
send "yes\n";
exp_continue;
}
-re "(p|P)assword:" {
send "$PASSWD\n";
}
timeout abort
}
expect
[...]
The script accepts three variables:
lrange: router IP address
$argv 0 0 minimum and maximum acceptable signal strength
The script then passes the info back to a Perl script.
If I run the Expect script from the command line I'm seeing the following results occasionally!
[...]
INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL... TX-RATE
0 (unknown) axxyy 00:0C:42:67:04:CA yes -68dBm... 24.0..
The interface returns unknown....but not always
This breaks my Perl script which needs the interface name to be present.
Any clues?
Thanks!