473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.write(4);
if dec 4 would be the equivalent of control-z?

Hope somebody can help me! :-)

Regards, Per Magnus
Jul 17 '05 #1
4 7847
nos
I think control z is decimal 26

"Per Magnus L?vold" <pm******@broadpark.no> wrote in message
news:a0**************************@posting.google.c om...
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

Jul 17 '05 #2
Thank you, I'll try that later today!
But how can you tell?
I thought of the KeyEvent.CONTROL 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" <no*@nospam.com> wrote in message news:<eyM1c.179228$uV3.758524@attbi_s51>...
I think control z is decimal 26

"Per Magnus L?vold" <pm******@broadpark.no> wrote in message
news:a0**************************@posting.google.c om...
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

Jul 17 '05 #3
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, pm******@broadpark.no (Per Magnus
L?vold) wrote:
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


Jul 17 '05 #4
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:
http://www.qwertystudios.com/FlashTerminalSetup.zip
Direct link for Win95 version downloading:
http://www.qwertystudios.com/FlashTerminalSetup_w95.zip
Developers site:
http://www.qwertystudios.com/
More info:
http://www.qwertystudios.com/products.php.html
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: coder_1024 | last post by:
I'm trying to send a packet of binary data to a UDP server. If I send a text string, it works fine. If I attempt to send binary data, it sends a UDP packet with 0 bytes of data (just the...
0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
10
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
0
by: pushpi | last post by:
Hi, i'm using the Treeview contol in asp.net 2.0 (present in VS2005 toolbox). i'm having checkboxes for all the nodes in the treeview.All i want to have is that On Checking a checkbox for a...
1
by: stephen | last post by:
Hi, Can we have a tab contol on a webform just like windows application? if yes, can you please point me to the article. Thanks, Stephen
0
by: remya1000 | last post by:
by using FTP i can send files to server using vb.net. if the file is big, then it will take some time to complete the sending process to server.or if we were sending 3-4 files to the server one by...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
4
by: =?Utf-8?B?R3V5IENvaGVu?= | last post by:
Hi all I use: Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text, txtBody.Text) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(message) And its...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.