This is Rebex log:
2022-11-30 17:14:05.257 INFO Telnet(1)[18] Info: Connecting to **.**.**.**:1990 using Telnet.
2022-11-30 17:14:05.257 INFO Telnet(1)[18] Info: Assembly: Rebex.Telnet R6.8 for .NET 4.0-4.8 (Trial)
2022-11-30 17:14:05.257 INFO Telnet(1)[18] Info: Platform: Windows 10.0.14393 64-bit; CLR: 4.0.30319.42000
2022-11-30 17:14:05.257 DEBUG Telnet(1)[18] Info: Culture: en; Windows-1252
2022-11-30 17:14:05.273 DEBUG Telnet(1)[18] Proxy: Connecting to **.**.**.**:1990 (no proxy).
2022-11-30 17:14:05.284 DEBUG Telnet(1)[18] Proxy: Connection established.
2022-11-30 17:14:05.289 DEBUG Telnet(1)[18] Info: Sending DO request option for: Echo (0x01).
2022-11-30 17:14:05.293 DEBUG Telnet(1)[18] Info: Sent 3 byte(s) of data.
2022-11-30 17:14:05.297 VERBOSE Telnet(1)[18] Info: Sent data:
0000 |FF-FD-01 | ...
2022-11-30 17:14:05.317 DEBUG VirtualTerminal(0)[18] Scripting: WaitFor((timeout: 60000 | (closed | received regex: '[Ll]ogin:'))) [Timeout=60000]
2022-11-30 17:14:05.330 VERBOSE VirtualTerminal(0)[18] Scripting: WaitFor: polling data for max 60000 ms.
2022-11-30 17:14:05.339 DEBUG Telnet(1)[18] Info: Received 21 byte(s) of data.
2022-11-30 17:14:05.339 VERBOSE Telnet(1)[18] Info: Received data:
0000 |53-53-48-2D-32-2E-30-2D 4F-70-65-6E-53-53-48-5F| SSH-2.0-OpenSSH_
0010 |36-2E-37-0D-0A | 6.7..
2022-11-30 17:14:05.345 VERBOSE VirtualTerminal(0)[18] Scripting: WaitFor: data received, reset last data received time stamp.
2022-11-30 17:14:05.345 VERBOSE VirtualTerminal(0)[18] Scripting: WaitFor: processing received data.
2022-11-30 17:14:05.392 VERBOSE VirtualTerminal(0)[18] Scripting: WaitFor: polling data for max 60000 ms.
2022-11-30 17:15:05.407 VERBOSE VirtualTerminal(0)[18] Scripting: WaitFor: no data received in 60000 ms.
2022-11-30 17:15:05.407 VERBOSE VirtualTerminal(0)[18] Scripting: WaitFor: last data received 60047 ms ago.
2022-11-30 17:15:05.407 VERBOSE VirtualTerminal(0)[18] Scripting: WaitFor: ScriptEvent.Timeout successfully evaluated.
2022-11-30 17:15:05.411 DEBUG VirtualTerminal(0)[18] Scripting: WaitFor finished with Success.
Matched script events: timeout: 60000, (timeout: 60000 | (closed | received regex: '[Ll]ogin:'))
This is my exact line of code where timeout coming:
ScriptMatch scriptMatchResult;
scriptMatchResult = virtualTerminal.Scripting.WaitFor(ScriptEvent.Timeout, ScriptEvent.Closed, ScriptEvent.FromRegex(prompt));
The same code, Commands are working for default port ,only for the Custom port commands are not executing and getting timeout error.
This is code for Virtual Terminal binding,
telnetClient = new Telnet(serverAddress, CustomPortNumber);
virtualTerminal = new VirtualTerminal(80, 50);
virtualTerminal.Scripting.HoldReceivedData = true;
virtualTerminal.Scripting.Timeout = scriptTaskTimeout;
virtualTerminal.Options.LocalEcho = false;
virtualTerminal.Disconnected += new EventHandler(OnDisconnectedHandler);
// virtualTerminal.DataReceived += new DataReceivedEventHandler(OnVTermDataReceivedHandler);
virtualTerminal.DataReceived += OnVTermDataReceivedHandler;
virtualTerminal.Options.LocalEcho = true;//this line added or not giving same timeout
virtualTerminal.Bind(telnetClient);
Please help .Thanks in advance