473,775 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 17 '05 #1
4 7862
nos
I think control z is decimal 26

"Per Magnus L?vold" <pm******@broad park.no> wrote in message
news:a0******** *************** ***@posting.goo gle.com...
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

Jul 17 '05 #2
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" <no*@nospam.com > wrote in message news:<eyM1c.179 228$uV3.758524@ attbi_s51>...
I think control z is decimal 26

"Per Magnus L?vold" <pm******@broad park.no> wrote in message
news:a0******** *************** ***@posting.goo gle.com...
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

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******@broadp ark.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
14540
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 headers). I can see this because I'm running Ethereal and watching the packets. I'm defining the packets as shown below: $text_msg = "Hello, world\r\n"; $binary_msg = chr(0x01).chr(0x02).chr(0x03).chr(0x00).chr(0xA0); $binary_msg_size = 5;
0
522
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 import mimetypes import os,string
10
4987
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 working with we put these mailshots in the bcc field of the mails. This can sometimes cause a problem as we are getting alot of mails bounced back. I would like to write a script to have these emails sent out individually using the to: field of the...
3
4638
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 and then fires a datareceived event. Within the waitingloop there is a timeout function, but I want the the 'last-time-socket-used' variable set when the socket is finished sending. When I send by System.Net.Sockets.Socket.Send(buffer()) (<--this...
3
3620
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 smtpMail.Send("from@here.com", to@there.com, "Message subject", "Message Body") I'm sending it to my own email address on a different server using a dummy
0
1251
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 parent node ,the checkboxes for all the child nodes must get checked---this functionality should be implemented on the client side,using javascript. can i postback the page every time i check a checkbox?
1
1191
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
1866
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 one,then whethere we can show the progress of each file sending to server in progress bar. so that the FTP clients can see the progress of file sending to the server. any idea how we can do this to show the progress of each file sending. if we...
9
3469
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 oSMTP.Send(oMailMessage) (in this line I am getting the above err)
4
2403
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 working fine. However I was wondering if there is a way to confirm that the email was sent. The send method does not return anything....
0
9622
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9916
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7464
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4017
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2853
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.