Am 05.02.2021 um 01:57 schrieb Tony Nicholson:
> On Friday, February 5, 2021 at 10:47:40 AM UTC+11, Grant Taylor wrote:
>> On 2/4/21 2:35 PM, Tony Nicholson wrote:
>>> all it needs is an 8-bit clean bi-directional "serial" connection.
>>> TCP/IP connections via ssh (or Telnet) handle the flow-control and
>>> should be error-free (unlike the old modem days).
>> My experience is that the telnet protocol (proper) is not 8-bit clean.
>>
>> I've tried to run some things that need 8-bit clean connections a few
>> times and they have failed every time.
>
> Telnet normally intercepts a character (by default it is Ctrl-] under Linux or
> Ctrl-^ on OpenVMS) which it calls an escape character (and not to be
> confused with the ASCII ESC 01Bh) to do out-of-band mode changes
> and similate sending a BREAK etc. The protocol also allows option
The intercept character is not part of the RFC standard; you can well
write a Telnet handler that performs mode changes or OOB signalling
through another channel like a REST API or through cmdline settings. In
such a case there is no special handling, nor entering it twice, and a
CTRL-] is just another character, namely ASCII 0x1D or GS.
The mentioned Telnet clients need this escaping just for historical
reasons because there were no reliable OOB characters, outside the 8 bit
character set, that could be used. Some terminals had an "Attention", or
"Send" or "Interrupt" key which a OS terminal driver could detect and
send something like a signal to a process to have it switch its
online/offline modes. In (BSD) Unix with its wide support of different
terminals one could not rely on a existance of such a key; thus they
fell back to some seldomly used ASCII control code. BREAK on a terminal
does not work since it often just ties the RS-232 TXT line to low level.
In the mainframe world with its line/block mode terminals, usually such
a dedicated key existed, and today it would be possible to recognize
some CTRL-ALT-META-SHIFT-something for that function in order to avoid
the problem that CTRL-] needed to be typed twice.
-hl