Telnet timeout

33 views
Skip to first unread message

Res Arf

unread,
Mar 28, 2013, 6:10:26 AM3/28/13
to solde...@googlegroups.com

After several minutes of inactivity I see the following message appear in my Microsoft Telnet terminal:

Connection to host lost.
Press any key to continue...

I can then reconnect back to the SolderCore board without any problem.

Is this timeout due to the Telnet client software or the SolderCore? 

CoreBASIC Wizard

unread,
Mar 28, 2013, 6:15:30 AM3/28/13
to solde...@googlegroups.com
That is the SolderCore.  The SolderCore will force closure of the socket after 5 minutes.  The code, in CoreBASIC, is:

  // Modify the defaults.
  (void)ctl_tcp_get_port_options(port, &options);

  // Five minutes before timing out and closing the connection.
  options.defaults.idle_socket_shutdown = 5*60;

  // I only ever want one active connection.
  options.max_connections = 1;

That's five minutes of inactivity on the port.  I could add something that allows you to modify the timeout value of the telnet connection, I guess.  Is it a problem?

Res Arf

unread,
Mar 28, 2013, 7:04:52 AM3/28/13
to solde...@googlegroups.com
Thanks for clarifying that. When I used PuTTY, after 5 minutes of inactivity the PuTTY client automatically closes!

This is not an issue for me but I guess it might be for others if they don't have regular traffic on that connection.

CoreBASIC Wizard

unread,
Mar 28, 2013, 7:07:52 AM3/28/13
to solde...@googlegroups.com


On Thursday, March 28, 2013 11:04:52 AM UTC, Res Arf wrote:
Thanks for clarifying that. When I used PuTTY, after 5 minutes of inactivity the PuTTY client automatically closes!

This is not an issue for me but I guess it might be for others if they don't have regular traffic on that connection.

If we keep the telnet session open forever, then no other session can be started as we have a single-user multi-tasking system.  I think closing the connection after five minutes of inactivity isn't such a bad thing.

Tom Morrison

unread,
Mar 20, 2014, 1:24:06 PM3/20/14
to solde...@googlegroups.com
For troubleshooting intermittent problems, it's nice to have the device running for an extended period of time posting data to the terminal session.  What I've found is that if you interact via Telnet, it aborts the running program.  What I'd like is in addition to "RUN" to have something like RUNNT which would disable the timeout for special situations as I described.  I agree, though, that a timeout is required for normal situations.

CoreBASIC Wizard

unread,
Mar 25, 2014, 11:42:15 AM3/25/14
to solde...@googlegroups.com
So, here we are.  :-)  Now, the sources for CoreBASIC are actually on the CrossWorks website.  You can go take a punt and load them up, compile CoreBASIC for a SolderCore or something else, and prototype what you want yourself!  Once satisfied, you might like to submit it for inclusion in the next SolderCore set of firmware!

-- Paul.
Reply all
Reply to author
Forward
0 new messages