Hi,
I am observing error as "tclsh application has stopped working" in windows 7 machine when i execute telnet with expect. However it is working in windows XP machine.
It says "Tclsh Application has stopped working - Windows is checking for a solution to the problem..." After few seconds "Tclsh Application has stopped working - A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available".
Can anyone help me on this issue.
proc telnetAccess {IP Port} {
puts "\nConnecting to Com Port :$IP $Port"
set temp [exp_spawn telnet $IP $Port]
puts " temp: $temp\n"
set send_slow {1 .05}
set timeout 10
set device $spawn_id
puts "spawn id : $spawn_id "
exp_send -i $device -s -- "\r"
puts "after exp_send "
expect {
-i $device -re "Command Error(.*)CRS-A>" {
puts " command Output2:start $expect_out(buffer) \n"
break
}
-i $device -re "CRS-A>" {
puts " command Output3:start $expect_out(buffer) \n"
break
}
timeout {
puts "timeout occurs\n"
break
}
}
}
set ip 10.55.158.189
set port 2016
telnetAccess $ip $port
tclsh Version is 8.4.14.0
expect version is 5.43
Thanks,
Kirankumar Naidu K