SBL2e X telnet disconnection.

Discussion to talk about software related topics only.
Post Reply
jcdammeyer
Posts: 5
Joined: Sat Jan 22, 2011 11:07 pm

SBL2e X telnet disconnection.

Post 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
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: SBL2e X telnet disconnection.

Post 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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SBL2e X telnet disconnection.

Post 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.
jcdammeyer
Posts: 5
Joined: Sat Jan 22, 2011 11:07 pm

Re: SBL2e X telnet disconnection.

Post 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
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: SBL2e X telnet disconnection.

Post 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
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SBL2e X telnet disconnection.

Post 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]
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SBL2e X telnet disconnection.

Post 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.
Post Reply