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
SBL2e X telnet disconnection.
- Chris Ruff
- Posts: 222
- Joined: Thu Apr 24, 2008 4:09 pm
- Location: topsail island, nc
- Contact:
Re: SBL2e X telnet disconnection.
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
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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
Re: SBL2e X telnet disconnection.
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.
-
- Posts: 5
- Joined: Sat Jan 22, 2011 11:07 pm
Re: SBL2e X telnet disconnection.
NoChris Ruff wrote:Are you talking about a modem connected to the serial port?
Yes.Chris Ruff wrote: are you talking about telnet via port 23?
No Idea what an unsecured telnet is.Chris Ruff wrote: are you talking about unsecured telnet?
no.Chris Ruff wrote: are you talking about a telnet-style text exchange command interface using a modem?
End product connected to RS232 side. Router connected to Ethernet side. IP # is 192.168.1.104.Chris Ruff wrote: I am not sure what you are asking.
Chris
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
- Chris Ruff
- Posts: 222
- Joined: Thu Apr 24, 2008 4:09 pm
- Location: topsail island, nc
- Contact:
Re: SBL2e X telnet disconnection.
"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
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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
Re: SBL2e X telnet disconnection.
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.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.
Obviously you should be able to reconnect. Something odd is happening.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.
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.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[/quote]
Re: SBL2e X telnet disconnection.
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.