detecting ANSI/AVATAR on remote computer 
Author Message
 detecting ANSI/AVATAR on remote computer

Hey!

        I'd greatly appreciate receiving any algorithms for detecting ANSI or
AVATAR on the remote computer. Thank you for your time,

        Gili Tzabari



Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer

Quote:


> >       I'd greatly appreciate receiving any algorithms for detecting ANSI or
> > AVATAR on the remote computer. Thank you for your time,

> ANSI detect is simple.  You send out #27'[6n' and you will get back #27'['
> Xpos, ';', Ypos, 'R'...  You need not parse the returned string for an
> ANSI check, but I suggest that you do.

> Avatar proper <choose your Avatar spec> does not AFAIK support remote
> detection.  However, if you have Avatar/ANSI support, you can fake it
> using a method suggested to me by Cott Lang, which is what he uses in
> Renegade BBS.  <I kick myself still for this one..>

> Remember I suggested parsing the response to the cursor position request?
> Well, save that and send #22, #8, Char(Xpos), Char (YPos)..  Remember that
> we are talking about the binary bytes here..  Now, do another ANSI cursor
> request...  Do they match what you got last time?  If so, great, you've
> got Avatar.  If not, well, Xpos should be 3 more than it was. before.

> <I'll entertain better Avatar detect ideas if any exist..>

More complete avatar terminals usually respond to ESC Z   with a AVT0 or
AVT1 I believe.   but the method you suggested is probably better as most
Avatar terminal emulators also support ANSI.


Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer


Quote:
>    I'd greatly appreciate receiving any algorithms for detecting ANSI or
> AVATAR on the remote computer. Thank you for your time,

ANSI detect is simple.  You send out #27'[6n' and you will get back #27'['
Xpos, ';', Ypos, 'R'...  You need not parse the returned string for an
ANSI check, but I suggest that you do.

Avatar proper <choose your Avatar spec> does not AFAIK support remote
detection.  However, if you have Avatar/ANSI support, you can fake it
using a method suggested to me by Cott Lang, which is what he uses in
Renegade BBS.  <I kick myself still for this one..>

Remember I suggested parsing the response to the cursor position request?
Well, save that and send #22, #8, Char(Xpos), Char (YPos)..  Remember that
we are talking about the binary bytes here..  Now, do another ANSI cursor
request...  Do they match what you got last time?  If so, great, you've
got Avatar.  If not, well, Xpos should be 3 more than it was. before.

<I'll entertain better Avatar detect ideas if any exist..>

           \|/           Peace can not exist without war, nor can war
       \\\\/|\////          exist without peace. Think about it...
        \\\\|////             ----------------------------------



Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer

Quote:

>    I'd greatly appreciate receiving any algorithms for detecting ANSI or
> AVATAR on the remote computer. Thank you for your time,

>    Gili Tzabari

Well your in luck.  I have wondered that for a long time, and have figured
it out for my comm program.  I only know how to detect ansi though.  This
is how it works.  

Say you are running a bbs, and another person is calling in.
The bbs sends the user   ESC[6n
When the user gets this, it should send back ESC[x;yR  
                                                         x;y being the
cursor position

That's IT!  I've tried it with RENEGADE, WWIV, PCB, and WILDCAT.  I know
it's right...



Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer

Quote:

> > Remember I suggested parsing the response to the cursor position request?
> > Well, save that and send #22, #8, Char(Xpos), Char (YPos)..  Remember that
> > we are talking about the binary bytes here..  Now, do another ANSI cursor
> > request...  Do they match what you got last time?  If so, great, you've
> > got Avatar.  If not, well, Xpos should be 3 more than it was. before.

> > <I'll entertain better Avatar detect ideas if any exist..>

> More complete avatar terminals usually respond to ESC Z   with a AVT0 or
> AVT1 I believe.   but the method you suggested is probably better as most
> Avatar terminal emulators also support ANSI.

I'll remember that in my Avatar emulators...  I also sent that to Patrick
Spence for possible inclusion in Renegade.

           \|/           Peace can not exist without war, nor can war
       \\\\/|\////          exist without peace. Think about it...
        \\\\|////             ----------------------------------



Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer

Quote:

>         I'd greatly appreciate receiving any algorithms for detecting ANSI or
> AVATAR on the remote computer. Thank you for your time,

To detect ANSI, you should send the sequence #27'[6n' (esc-[6n).  If
the terminal has ANSI, it will send back a cursor position report.  I
don't recall the exact form of this, but it is something line #27'['
(something here)'R'.  The middle has the coordinates of the cursor,
but I forget how it's formatted.

To detect for avatar, just send a cursor movement sequence in avatar
(say, move left), and send the ANSI detection sequence again.  If the
cursor moved, the terminal has avatar.


         Home Page: http://www.contrib.andrew.cmu.edu/~kyleo/kyle.html
Illusion Home Page: http://www.contrib.andrew.cmu.edu/~kyleo/illusion.html



Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer

Quote:


>>       I'd greatly appreciate receiving any algorithms for detecting ANSI or
>> AVATAR on the remote computer. Thank you for your time,

> ANSI detect is simple.  You send out #27'[6n' and you will get back #27'['
> Xpos, ';', Ypos, 'R'...  You need not parse the returned string for an
> ANSI check, but I suggest that you do.

Yes, one of the better ways of detecting screen length is to issue a
form feed, then 40 or 50 CR/LF pairs. Then send the <esc>[6n. If
there's a returned value, it will be <esc>0;<screen length>R. If the
returned values are suspicious (Ypos greater than the number of CR/LF
pairs sent, or Ypos non-zero) then assume that the remote doesn't
support ANSI. If the Ypos is *equal* to the number of CR/LFs sent, then
the person may have a screen longer than you allowed for (many VGA
cards support a 132x60 text mode)

Quote:
> Avatar proper <choose your Avatar spec>

Avatar actually *has* an FTSC spec!

--
Leonard Erickson (aka Shadow)




Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer

Quote:

> > Avatar proper <choose your Avatar spec>

> Avatar actually *has* an FTSC spec!

But the spec doesn't <AFAIK> support detection of remote Avatar...  I've
been told Esc-Z works on most implementations..

           \|/           Peace can not exist without war, nor can war
       \\\\/|\////          exist without peace. Think about it...
        \\\\|////             ----------------------------------



Wed, 18 Jun 1902 08:00:00 GMT  
 detecting ANSI/AVATAR on remote computer

Quote:



> >>       I'd greatly appreciate receiving any algorithms for detecting ANSI or
> >> AVATAR on the remote computer. Thank you for your time,

> > ANSI detect is simple.  You send out #27'[6n' and you will get back #27'['
> > Xpos, ';', Ypos, 'R'...  You need not parse the returned string for an
> > ANSI check, but I suggest that you do.

> Yes, one of the better ways of detecting screen length is to issue a
> form feed, then 40 or 50 CR/LF pairs. Then send the <esc>[6n. If
> there's a returned value, it will be <esc>0;<screen length>R. If the
> returned values are suspicious (Ypos greater than the number of CR/LF
> pairs sent, or Ypos non-zero) then assume that the remote doesn't
> support ANSI. If the Ypos is *equal* to the number of CR/LFs sent, then
> the person may have a screen longer than you allowed for (many VGA
> cards support a 132x60 text mode)

Why not just send ESC [150B   ESC [150C     its much shorter and should
also give the bottom left of the screen.


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. detecting ANSI/AVATAR on remote comp

2. !!! Dial-up Remote Access from notebook or Standalone Computer

3. Window command: Remote computer

4. how remote are remote servers?

5. I need source for showing AVATAR

6. PASCAL/C program that WORK ON SOME COMPUTER(486) but not all computers

7. Computer ---->Computer

8. ascii - Ansi

9. ASCII Dos to ASCII Ansi

10. Difference between ascii ANSI and Paradox ascii

11. the draw [ANSi]

12. the draw [ANSi]

 

 
Powered by phpBB® Forum Software