Page 1 of 1
SBL2e X telnet disconnection.
Posted: Sat Jan 22, 2011 11:14 pm
by jcdammeyer
Is there a way for the application connected to the RS232 side to know when the telnet connection has been terminated?
I can time out the RS232 software on the project so that after timeout a password is needed again but that could leave a window where someone could dial into the active system.
Thanks
Re: SBL2e X telnet disconnection.
Posted: Sun Jan 23, 2011 9:36 am
by Chris Ruff
Are you talking about a modem connected to the serial port?
are you talking about telnet via port 23?
are you talking about unsecured telnet?
are you talking about a telnet-style text exchange command interface using a modem?
I am not sure what you are asking.
Chris
Re: SBL2e X telnet disconnection.
Posted: Sun Jan 23, 2011 10:22 am
by rnixon
In the manual there is a description of the #SYS AT command that returns IDLE or CONNECTED. So it looks like you could poll it to check. Haven't used this one myself.
Re: SBL2e X telnet disconnection.
Posted: Sun Jan 23, 2011 9:07 pm
by jcdammeyer
Chris Ruff wrote:Are you talking about a modem connected to the serial port?
No
Chris Ruff wrote:
are you talking about telnet via port 23?
Yes.
Chris Ruff wrote:
are you talking about unsecured telnet?
No Idea what an unsecured telnet is.
Chris Ruff wrote:
are you talking about a telnet-style text exchange command interface using a modem?
no.
Chris Ruff wrote:
I am not sure what you are asking.
Chris
End product connected to RS232 side. Router connected to Ethernet side. IP # is 192.168.1.104.
I can use Firefox or EI to bring up the configuration page and change parameters like:
Timeout & disconnect after this many seconds of inactivity: 120
Allow new connection if existing connection has been idle for this many seconds: 120
--------------------------------------------------------------------------------
I can telnet from a DOS window (VISTA) as in:
C:> telnet 192.168.1.104 23
At this point I get the command prompt from my application as if I had used hyperterm and a COM port.
I have two problems.
1. If there is no activity I get a Telnet message that the connection has terminated. After that I can't log into it again. It just refuses connections. I have to click on Save Parameters in the WEB page to get it to allow connections again.
2. If it does timeout because a user has shut down their telnet session how does my applicaton know that it's gone? The manual doesn't say anyting about RTS, CTS. Or DTR. What happens to those signals when the connection is terminated?
I can't continually send it AT commands to see if it's still there. That would disrupt a user who is talking to it from the Ethernet side.
John
Re: SBL2e X telnet disconnection.
Posted: Mon Jan 24, 2011 9:09 am
by Chris Ruff
"AT" commands are modem commands. Hence my confusion.
Handshaking lines for RS-232 are not connected to Telnet sessions in any manner.
I do think there is a problem that after Telnet times out in the NB module, NB doesn't start listening again for a Telnet (port 23) socket connection request. That is either a configuration item on your webpage or a bug in the NB code.
If you are attached to the Telnet port and you close your DOS box, the NB module will not know that you have gone away. IT SHOULD timeout at some point and start re-listening for another Telnet connection attempt.
Chris
Re: SBL2e X telnet disconnection.
Posted: Mon Jan 24, 2011 10:43 am
by rnixon
End product connected to RS232 side. Router connected to Ethernet side. IP # is 192.168.1.104.
I can use Firefox or EI to bring up the configuration page and change parameters like:
Timeout & disconnect after this many seconds of inactivity: 120
Allow new connection if existing connection has been idle for this many seconds: 120
I would not set those equal - it doesn't make sense. If you have disconnected, then someone new can always connect. The override should be shorter than the timeout.
--------------------------------------------------------------------------------
I can telnet from a DOS window (VISTA) as in:
C:> telnet 192.168.1.104 23
At this point I get the command prompt from my application as if I had used hyperterm and a COM port.
I have two problems.
1. If there is no activity I get a Telnet message that the connection has terminated. After that I can't log into it again. It just refuses connections. I have to click on Save Parameters in the WEB page to get it to allow connections again.
Obviously you should be able to reconnect. Something odd is happening.
2. If it does timeout because a user has shut down their telnet session how does my applicaton know that it's gone? The manual doesn't say anyting about RTS, CTS. Or DTR. What happens to those signals when the connection is terminated?
The serial query is the only way. But from your description it seems like the network side is the "master" that sends commands to the device. The hardware handshake lines are not used.
I can't continually send it AT commands to see if it's still there. That would disrupt a user who is talking to it from the Ethernet side.
John[/quote]
Re: SBL2e X telnet disconnection.
Posted: Mon Jan 24, 2011 12:36 pm
by rnixon
I take the last part back. On the Serial config page you can use the DTR signal of Uart 0 to indicate TCP connection on/off.