Mailing List Archive

console and telnet differences?
I'm trying to track down a bug somewhere. Or maybe I just overlooked
something.

console can talk to a server just fine. But when I connect with telnet
or a ruby script I'm writing (based loosely on the Console.pm which was
posted a while ago) things behave differently. After the preliminaries
(login, etc) stuff is handled and I see [Attached], from there on out,
any data I send to the server is sent properly, and then sent on to the
serial port... but nothing is sent to back to my client, even though
it's logged properly.

In case I'm not explaining it well, maybe a picture will do. With
console, the whole thing works. With telnet, B doesn't work.

+->--A-->--+ +-->--C-->--+
Telnet--+ |--conserver--| |--/dev/ttyS1
+-<--B--<--+ +--<--D--<--+

console's Interact() function seems to do something very different from
telnet.

I posted about this a couple weeks ago, and still haven't figured out
what's different about console that makes it work, when it doesn't with
telnet or a script.

Any suggestions?

--
Chris Riddoch
epistemological humility

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: console and telnet differences? [ In reply to ]
On Wed, 2006-03-22 at 10:31 -0700, Chris Riddoch wrote:
> console can talk to a server just fine. But when I connect with
> telnet
> or a ruby script I'm writing (based loosely on the Console.pm which
> was
> posted a while ago) things behave differently. After the
> preliminaries
> (login, etc) stuff is handled and I see [Attached], from there on out,
> any data I send to the server is sent properly, and then sent on to
> the
> serial port... but nothing is sent to back to my client, even though
> it's logged properly.

Console.pm is responsible for only making a connection. You'll need to
do a select() on STDIN and the socket returned by Console.pm. You'll
also need to place your tty in raw mode.


_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: console and telnet differences? [ In reply to ]
On Wed, Mar 22, 2006 at 10:31:22AM -0700, Chris Riddoch wrote:
> console can talk to a server just fine. But when I connect with telnet
> or a ruby script I'm writing (based loosely on the Console.pm which was
> posted a while ago) things behave differently. After the preliminaries
> (login, etc) stuff is handled and I see [Attached], from there on out,
> any data I send to the server is sent properly, and then sent on to the
> serial port... but nothing is sent to back to my client, even though
> it's logged properly.

it sounds like you aren't totally implementing the protocol used by the
client. at a certain 8.x release, the client must send the server a
'^Ec;' command, which tells the server to start sending console output
to the client. this was added so that the client could send various
escape sequences and read the result accurately (otherwise it could get
console output mixed in) after attaching to the console but before the
user gets to interact with it.

no, the protocol isn't fully documented. :-( the CallUp() routine in
console.c is where most of the "handshake" magic happens (i believe this
one thing i mentioned is really the only "gotcha" - otherwise it's
fairly straightfoward).

Bryan
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: console and telnet differences? [ In reply to ]
Also the Console.pm that I wrote was based on 7.X version not 8. Per
Brian and my discussions today a new module needs to be written for 8.X.
If anyone is up to the task it would be greatly appreciated.

On Thu, 2006-03-23 at 06:59 -0800, Bryan Stansell wrote:
> On Wed, Mar 22, 2006 at 10:31:22AM -0700, Chris Riddoch wrote:
> > console can talk to a server just fine. But when I connect with telnet
> > or a ruby script I'm writing (based loosely on the Console.pm which was
> > posted a while ago) things behave differently. After the preliminaries
> > (login, etc) stuff is handled and I see [Attached], from there on out,
> > any data I send to the server is sent properly, and then sent on to the
> > serial port... but nothing is sent to back to my client, even though
> > it's logged properly.
>
> it sounds like you aren't totally implementing the protocol used by the
> client. at a certain 8.x release, the client must send the server a
> '^Ec;' command, which tells the server to start sending console output
> to the client. this was added so that the client could send various
> escape sequences and read the result accurately (otherwise it could get
> console output mixed in) after attaching to the console but before the
> user gets to interact with it.
>
> no, the protocol isn't fully documented. :-( the CallUp() routine in
> console.c is where most of the "handshake" magic happens (i believe this
> one thing i mentioned is really the only "gotcha" - otherwise it's
> fairly straightfoward).
>
> Bryan
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users