Sending contol-z (^z) over serial interface

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Per Magnus L?vold

    Sending contol-z (^z) over serial interface

    Hi,
    I am working with a simple Java program which communicates over the
    serial port with a GSM modem.
    Using Hypertermial, I can send messages and need to press control-z to
    process the messages. I have created a PrintStream over the serial
    port, but I do not know how to send control-z from the program!

    I fin in another Google- thread that control-c equals decimal 3:
    But what is then the equivalent of control-z, and how should it be
    transmitted? Could I do:
    myPrintStream.w rite(4);
    if dec 4 would be the equivalent of control-z?

    Hope somebody can help me! :-)

    Regards, Per Magnus
  • nos

    #2
    Re: Sending contol-z (^z) over serial interface

    I think control z is decimal 26

    "Per Magnus L?vold" <pmlovold@broad park.no> wrote in message
    news:a0c31732.0 403040724.6a741 8b3@posting.goo gle.com...[color=blue]
    > Hi,
    > I am working with a simple Java program which communicates over the
    > serial port with a GSM modem.
    > Using Hypertermial, I can send messages and need to press control-z to
    > process the messages. I have created a PrintStream over the serial
    > port, but I do not know how to send control-z from the program!
    >
    > I fin in another Google- thread that control-c equals decimal 3:
    > But what is then the equivalent of control-z, and how should it be
    > transmitted? Could I do:
    > myPrintStream.w rite(4);
    > if dec 4 would be the equivalent of control-z?
    >
    > Hope somebody can help me! :-)
    >
    > Regards, Per Magnus[/color]


    Comment

    • Per Magnus L?vold

      #3
      Re: Sending contol-z (^z) over serial interface

      Thank you, I'll try that later today!
      But how can you tell?
      I thought of the KeyEvent.CONTRO L value, but that doesn't seem to
      work. And it seems as if control-c and control-z is represented as one
      single character.
      I would like to understand this. :-)

      Regards,
      Per Magnus

      "nos" <nos@nospam.com > wrote in message news:<eyM1c.179 228$uV3.758524@ attbi_s51>...[color=blue]
      > I think control z is decimal 26
      >
      > "Per Magnus L?vold" <pmlovold@broad park.no> wrote in message
      > news:a0c31732.0 403040724.6a741 8b3@posting.goo gle.com...[color=green]
      > > Hi,
      > > I am working with a simple Java program which communicates over the
      > > serial port with a GSM modem.
      > > Using Hypertermial, I can send messages and need to press control-z to
      > > process the messages. I have created a PrintStream over the serial
      > > port, but I do not know how to send control-z from the program!
      > >
      > > I fin in another Google- thread that control-c equals decimal 3:
      > > But what is then the equivalent of control-z, and how should it be
      > > transmitted? Could I do:
      > > myPrintStream.w rite(4);
      > > if dec 4 would be the equivalent of control-z?
      > >
      > > Hope somebody can help me! :-)
      > >
      > > Regards, Per Magnus[/color][/color]

      Comment

      • Thomas Lutz

        #4
        Re: Sending contol-z (^z) over serial interface

        When you press Ctrl - A in Hyperterminal, an ASCII 1 is sent out the
        serial port. When you Hit Ctrl - B, an ASCII 2 is sent. When you Hit
        Ctrl - C, an ASCII 3 is sent and so on...
        In other words, the position in the alphabet for the letter determines
        the character that gets sent.
        Since Z is the 26th letter in the alphabet, Ctrl - Z represents an
        ASCII 26 therefore you need to transmit an ASCII 26.


        On 4 Mar 2004 07:24:58 -0800, pmlovold@broadp ark.no (Per Magnus
        L?vold) wrote:
        [color=blue]
        >Hi,
        >I am working with a simple Java program which communicates over the
        >serial port with a GSM modem.
        >Using Hypertermial, I can send messages and need to press control-z to
        >process the messages. I have created a PrintStream over the serial
        >port, but I do not know how to send control-z from the program!
        >
        >I fin in another Google- thread that control-c equals decimal 3:
        >But what is then the equivalent of control-z, and how should it be
        >transmitted? Could I do:
        >myPrintStream. write(4);
        >if dec 4 would be the equivalent of control-z?
        >
        >Hope somebody can help me! :-)
        >
        >Regards, Per Magnus[/color]

        Comment

        • Konstantin

          #5
          Re: Sending contol-z (^z) over serial interface

          Why are you still using such unhandy thing as Hyper Terminal? Recently
          I've found an interesting program - Flash Terminal. It is really Hyper
          Terminal killer. With Flash Terminal you can chat and exchange files
          via modem (including v.90, ISDN, ADSL, GPRS) and null-modem
          simultaneously without Internet! You can exchange up to 255 files at
          once with unlimited transfer resuming after connection break. Program
          includes large amount of nice avatars.
          Direct link for downloading:

          Direct link for Win95 version downloading:

          Developers site:
          Here you can find information about our products. Speaking Notepad - naturally speaking text to voice and text to speech converter and microsoft notepad replacement. 1st Read It Aloud - read selected text from any application with one click. Vista Glance - instant searching utility, perfect Google Desktop and Windows Search replacement.

          More info:
          Here you can find information about our products. Speaking Notepad - naturally speaking text to voice na dtext to speech converter and microsoft notepad replacement. SunGlance - instant searching utility, perfect Google Desktop and Windows Search replacement. 1st Read It Aloud - read selected text from any application with one click.

          Comment

          Working...