Discussion:
How to send ctrl+c through hyperterminal session
(too old to reply)
c***@gmail.com
2008-08-08 21:48:46 UTC
Permalink
I have a command prompt session running via my debug machine (PC) and
my windows ce embedded board. I have a hyperterminal session running
and I want to send a ctrl+c command from the hyperterminal, how would
i do that. When I press ctrl+c in the hyperterminal window is displays
some odd character but I don't think it is sending a ctrl+c command
over to the embedder side.

Thanks
Paul G. Tobey [eMVP]
2008-08-11 16:29:25 UTC
Permalink
I think that it *is* sending Ctrl+C. It might depend on how Hyperterminal
is configured, but I think that ANSI or TTY configuration should be sending
precisely the character that you are typing. What makes you say that it's
not sending the right character?

Paul T.
Post by c***@gmail.com
I have a command prompt session running via my debug machine (PC) and
my windows ce embedded board. I have a hyperterminal session running
and I want to send a ctrl+c command from the hyperterminal, how would
i do that. When I press ctrl+c in the hyperterminal window is displays
some odd character but I don't think it is sending a ctrl+c command
over to the embedder side.
Thanks
c***@gmail.com
2008-08-11 20:48:49 UTC
Permalink
On Aug 11, 11:29 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
I think that it *is* sending Ctrl+C.  It might depend on how Hyperterminal
is configured, but I think that ANSI or TTY configuration should be sending
precisely the character that you are typing.  What makes you say that it's
not sending the right character?
Paul T.
Post by c***@gmail.com
I have a command prompt session running via my debug machine (PC) and
my windows ce embedded board. I have a hyperterminal session running
and I want to send a ctrl+c command from the hyperterminal, how would
i do that. When I press ctrl+c in the hyperterminal window is displays
some odd character but I don't think it is sending a ctrl+c command
over to the embedder side.
Thanks- Hide quoted text -
- Show quoted text -
Well just that I thought ctrl+c would end any application launched
from the cmd window that is running remotely from the device to the
hyperterminal
Paul G. Tobey [eMVP]
2008-08-11 21:25:25 UTC
Permalink
Nothing is assured. If it's a console program and if it's waiting at a
console I/O routine at the time that you press Ctrl+c, then I think it
should exit. There's no magic in Ctrl+c, however. It's not going to
terminate some long-running network I/O that your program might be doing or
stop file I/O because Ctrl+c occurred. It won't terminate a program that
doesn't check for it.

If it were me, I'd verify that Ctrl+c is getting sent by Hyperterminal (you
could do a capture of the text sent to your PC on another port from
Hyperterminal and then read the text file with a binary editor to see what
ASCII code is where you pressed Ctrl+c; it should be 0x03, of course). If
that all seems fine, I'd write a simple console program that uses whatever
I/O function you're using to read the incoming key data (getch() or
whatever), and see if that exits. I'd probably also try Ctrl+c, Enter, if
just Ctrl+c by itself didn't work.

Paul T.

<***@gmail.com> wrote in message news:7bf5dd54-1fb1-47ba-bc26-***@e53g2000hsa.googlegroups.com...
On Aug 11, 11:29 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
I think that it *is* sending Ctrl+C. It might depend on how Hyperterminal
is configured, but I think that ANSI or TTY configuration should be sending
precisely the character that you are typing. What makes you say that it's
not sending the right character?
Paul T.
Post by c***@gmail.com
I have a command prompt session running via my debug machine (PC) and
my windows ce embedded board. I have a hyperterminal session running
and I want to send a ctrl+c command from the hyperterminal, how would
i do that. When I press ctrl+c in the hyperterminal window is displays
some odd character but I don't think it is sending a ctrl+c command
over to the embedder side.
Thanks- Hide quoted text -
- Show quoted text -
Well just that I thought ctrl+c would end any application launched
from the cmd window that is running remotely from the device to the
hyperterminal
Helge Kruse
2008-08-12 06:46:14 UTC
Permalink
The Windows CE telnet service has very limited functionality in compare
with e Unix like telnet daemon. In the Unix world the daemon interprets
some special key codes. It can work in RAW or COOKED mode, where
characters are sent immediately to the application or some line editing
takes place and so forth. When the telnet daemon receives a Ctrl-C it
sends a signal SIGHUP (or SIGTERM, I am not sure) to the application
what causes it to terminate. In RAW mode the characters are sent
directly to the application that is responsible to interpret them
somehow. To control such daemons you will find a huge termio library
(in Unix systems).

In this vocabulary the Windows CE telnet service is always in raw mode.
There is no Ctrl-C command, since nobody interprets the characters and
sends any signal.

Regards,
Helge

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
Post by Paul G. Tobey [eMVP]
Nothing is assured. If it's a console program and if it's waiting at
a console I/O routine at the time that you press Ctrl+c, then I think
it should exit. There's no magic in Ctrl+c, however. It's not going
to terminate some long-running network I/O that your program might be
doing or stop file I/O because Ctrl+c occurred. It won't terminate a
program that doesn't check for it.
If it were me, I'd verify that Ctrl+c is getting sent by
Hyperterminal (you could do a capture of the text sent to your PC on
another port from Hyperterminal and then read the text file with a
binary editor to see what ASCII code is where you pressed Ctrl+c; it
should be 0x03, of course). If that all seems fine, I'd write a
simple console program that uses whatever I/O function you're using
to read the incoming key data (getch() or whatever), and see if that
exits. I'd probably also try Ctrl+c, Enter, if just Ctrl+c by itself
didn't work.
Paul T.
On Aug 11, 11:29 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
I think that it *is* sending Ctrl+C. It might depend on how
Hyperterminal
is configured, but I think that ANSI or TTY configuration should be sending
precisely the character that you are typing. What makes you say that it's
not sending the right character?
Paul T.
Post by c***@gmail.com
I have a command prompt session running via my debug machine (PC) and
my windows ce embedded board. I have a hyperterminal session running
and I want to send a ctrl+c command from the hyperterminal, how would
i do that. When I press ctrl+c in the hyperterminal window is displays
some odd character but I don't think it is sending a ctrl+c
command
over to the embedder side.
Thanks- Hide quoted text -
- Show quoted text -
Well just that I thought ctrl+c would end any application launched
from the cmd window that is running remotely from the device to the
hyperterminal
c***@gmail.com
2008-08-13 14:49:24 UTC
Permalink
Post by Helge Kruse
The Windows CE telnet service has very limited functionality in compare
with e Unix like telnet daemon. In the Unix world the daemon interprets
some special key codes. It can work in RAW or COOKED mode, where
characters are sent immediately to the application or some line editing
takes place and so forth. When the telnet daemon receives a Ctrl-C it
sends a signal SIGHUP (or SIGTERM, I am not sure) to the application
what causes it to terminate. In RAW mode the characters are sent
directly to the application that is responsible to interpret them
somehow. To control such daemons you will find a huge termio library
(in Unix systems).
In this vocabulary the Windows CE telnet service is always in raw mode.
There is no Ctrl-C command, since nobody interprets the characters and
sends any signal.
Regards,
Helge
Nothing is assured.  If it's a console program and if it's waiting at
a console I/O routine at the time that you press Ctrl+c, then I think
it should exit.  There's no magic in Ctrl+c, however.  It's not going
to terminate some long-running network I/O that your program might be
doing or stop file I/O because Ctrl+c occurred.  It won't terminate a
program that doesn't check for it.
If it were me, I'd verify that Ctrl+c is getting sent by
Hyperterminal (you could do a capture of the text sent to your PC on
another port from Hyperterminal and then read the text file with a
binary editor to see what ASCII code is where you pressed Ctrl+c; it
should be 0x03, of course).  If that all seems fine, I'd write a
simple console program that uses whatever I/O function you're using
to read the incoming key data (getch() or whatever), and see if that
exits.  I'd probably also try Ctrl+c, Enter, if just Ctrl+c by itself
didn't work.
Paul T.
On Aug 11, 11:29 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
I think that it *is* sending Ctrl+C. It might depend on how
Hyperterminal
is configured, but I think that ANSI or TTY configuration should be sending
precisely the character that you are typing. What makes you say that it's
not sending the right character?
Paul T.
Post by c***@gmail.com
I have a command prompt session running via my debug machine (PC) and
my windows ce embedded board. I have a hyperterminal session running
and I want to send a ctrl+c command from the hyperterminal, how would
i do that. When I press ctrl+c in the hyperterminal window is displays
some odd character but I don't think it is sending a ctrl+c command
over to the embedder side.
Thanks- Hide quoted text -
- Show quoted text -
Well just that I thought ctrl+c would end any application launched
from the cmd window that is running remotely from the device to the
hyperterminal- Hide quoted text -
- Show quoted text -
"There is no Ctrl-C command..." that is what I was thinking. So I
would need some other keyboard combination or special key to trap and
then terminate my application, that is running on the CE device?

Thanks for all the input
g***@skyproductions.com
2014-10-13 16:10:40 UTC
Permalink
Post by c***@gmail.com
I have a command prompt session running via my debug machine (PC) and
my windows ce embedded board. I have a hyperterminal session running
and I want to send a ctrl+c command from the hyperterminal, how would
i do that. When I press ctrl+c in the hyperterminal window is displays
some odd character but I don't think it is sending a ctrl+c command
over to the embedder side.
Thanks
I know this is an old post but I thought I would shed some light. I needed to control a projector through 232 and couldn't use hyperterminal in my end result. spent quite a while figuring it out. Panasonic said I had to use hyperterminal and gave me the "Use CTRL-C, CTRL-B" line. After a few means of translation, I was able to send a hex value of "02" for CTRL-B and "03" for CTRL-C. You can use binary converters to see what the binary codes are. I'm not sure if this is only specific to the application I'm using it for but this may help others make some progress.
Loading...