[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ACK char issue

From: Dro Ghazarian
Subject: Re: ACK char issue
Date: Thu, 20 Aug 2020 10:54:43 -0700

I forgot to mention that as an example if we turnoff the bell sound by setting vbell in screenrc, my incoming packet would not receive the bell character anymore, which means that the screen terminal is not printing out the bell character. if vbell is removed , then I can see the bell character in my incoming packets. Since ACK is part of serial handshaking protocols I am assuming there might be a way to set the screen terminal to let these characters come through by changing the stty settings or screenrc settings.


On Thu, Aug 20, 2020 at 10:04 AM Dro Ghazarian <> wrote:
Hi David,
screenlog.0 contains the ack characters, which if I cat -v the log file I'll see ^FX^F^M.  I know that if I pipe the output of printf to cat -v or redirect it a file it will have the ack character, but the incoming packet being logged by putty or any other ssh tool would not have the ack character. 

--The following is the incoming packet without attaching to screen, which is has the ack characters (highlighted):
Incoming packet #0x66, type 94 / 0x5e (SSH2_MSG_CHANNEL_DATA)
  00000000  00 00 01 00 00 00 00 26 0d 0a 06 58 06 0d 0a 72  .......&...X...r
  00000010  6f 6f 74 40 31 39 32 2e 31 36 38 2e 30 2e 32 30  oot@

--and the following after attaching to screen which has no ack.
Incoming packet #0x7b, type 94 / 0x5e (SSH2_MSG_CHANNEL_DATA)
  00000000  00 00 01 00 00 00 00 24 0d 0a 58 08 0a 72 6f 6f  .......$..X..roo
  00000010  74 40 31 39 32 2e 31 36 38 2e 30 2e 32 30 30 3a  t@

I am trying to understand the difference in the behavior. I believe the packet information directly corresponds to the content of the screen and it seems like screen it removing the non printable characters from the content of the terminal, whereas the standard terminal is not removing it. That is why I am thinking it could be a tty setting or screen configuration that might be the reason for the difference.

Thank you

On Thu, Aug 20, 2020 at 1:03 AM david kerns <> wrote:
if you do this:
screen -L
printf "\x6X\x6\n"

then look at the screenlog.0 file, does it contain your ACK ?

On Tue, Aug 18, 2020 at 11:47 PM Dro Ghazarian <> wrote:
  Hi David,
  Thank you for your quick reply.  I believe I did not explain the problem correctly.  I do not want to see the actual ACK character on the screen but rather being able to get the packet information that contains the ACK character. To demonstrate the issue, it can be done as the following.

1. from my windows machine I use putty to ssh to a linux machine.
2. Before connecting to the linux machine, I configure the putty to log all the SSH packets.
3. Once connected, I issue the following command printf "test\6\n"   , I am using this command to just demonstrate the issue, we do have our command processor that uses ACK as an acknowledgement of a received data
4. When I look at the incoming packet log I can see that I received the ACK character.  which is the following: 28 0d 0a 74 65 73 74 06 0d 0a  .......(..test..
5. From the same putty terminal I create a screen session by doing :  screen -dmS test
6. Then I connect to the session by:  screen -Rr test
7. issue the printf command again:  printf "test\6\n"
8. When looking at the incoming packets, the ACK character is missing:  27 0d 0a 74 65 73 74 0d 0a  .......'..test..
9. It appears that the screen is removing the ACK character and any other non printable character as a matter of fact.  standard characters such as bell (\7) and etc are not removed, so if I issue printf "test\7\n" I could hear the bell sound and the incoming packet will contain 07 chracter.
10. I have looked at the screen settings to configure the screenrc and also changing stty settings but I am not having any luck figuring out how to stop the screen from eating out the ACk character.

I would really appreciate your help

Thank you
Dro Ghazarian

On Fri, Aug 14, 2020 at 1:28 PM david kerns <> wrote:
ACK is a non-printable char ... if you run your app in a non screen window, I'd be surprised if you saw them.
Try running your app like this: app | cat -v
should print "^F" for every ACK ... independent of screen

On Fri, Aug 14, 2020 at 12:59 PM Dro Ghazarian <> wrote:
  I have been trying to use screen to run a process in detached mode.  Our process prints ACK characters to the screen, but unfortunately the screen is somehow removing non printable characters.  Other known characters such as bell would come through but not ACK. Is there a setting that I can change to let the screen handle ACK characters?

Thank you
Dro Ghazarian 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]