473,325 Members | 2,872 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,325 software developers and data experts.

how to send ctrl-Z in C language - modem interfacing

hi,i m interfacing gsm modem to my microcontroller.i need to send sms
through it.
i am using AT commands for that.the command to send sms (AT+ CMGS)
terminates with
ctrl-Z.now in my program i hav tried all ways to send ctrl-Z at end of
my sms.but it takes this as
a character or string only.also i tried with ascii value of ctrl-Z but
of no use.

i am able to see the transmitted commands on hyper-terminal through
serial interface & also on serail window while debugging.
the commands are as follows with 2ms delay between each of them.

AT , AT+CMGF = 1, AT+CMGS = mobile no. , "message to be sent " ctrl-Z /
26 / ^Z
plz suggest some way.suggestions are also invited if you suspect some
other problem

Aug 30 '06 #1
2 15877
abhay wrote:
hi,i m interfacing gsm modem to my microcontroller.i need to send sms
through it.
i am using AT commands for that.the command to send sms (AT+ CMGS)
terminates with
ctrl-Z.now in my program i hav tried all ways to send ctrl-Z at end of
my sms.but it takes this as
a character or string only.also i tried with ascii value of ctrl-Z but
of no use.
fprintf (stream, "whatever\032");
fflush (stream); /* or use setvbuf() after fopen() */

--
Eric Sosman
es*****@acm-dot-org.invalid
Aug 30 '06 #2
Eric Sosman <es*****@acm-dot-org.invalidwrote:
abhay wrote:
hi,i m interfacing gsm modem to my microcontroller.i need to send sms
through it.
i am using AT commands for that.the command to send sms (AT+ CMGS)
terminates with
ctrl-Z.now in my program i hav tried all ways to send ctrl-Z at end of
my sms.but it takes this as
a character or string only.also i tried with ascii value of ctrl-Z but
of no use.

fprintf (stream, "whatever\032");
fflush (stream); /* or use setvbuf() after fopen() */
And, critically, do this on a binary stream, not on a text stream.

Richard
Aug 30 '06 #3

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

Similar topics

9
by: Miky | last post by:
Hi, I need to send Ctrl-PgUp (or Ctrl-PgDown) to the active application but when I use SendKeys.Send("^{PGUP}"), the program understands it as just PageUp. How may I solve it? Thanks in...
3
by: Str Noetika | last post by:
Hi, How can I send ctrl keys (like ctrl A, ctrl C) from a VB application to another existing application (like word, excel...) ? I tried to send postmessages like...
2
by: ThomasG | last post by:
Hi, i've got a main (win-)application which starts a consoleapp to do some work: Dim psi As New ProcessStartInfo psi.UseShellExecute = False psi.CreateNoWindow = True...
4
by: F.C. | last post by:
Hi code gurus ! I'm creating a front end for a DOS application using VB .Net. I launch this DOS app using System.Diagnostics.Process : myProcess.StartInfo.FileName = "myapp.exe"...
0
by: B Loggins | last post by:
Hi everyone, thanks in advance fo any help on this issue. I'm trying to "wrap" cmd.exe. That is, I'm redirecting StandardInput and StandardOutput for a cmd.exe process and I'm sending StdOut to...
3
by: William Stacey [MVP] | last post by:
How do you send Ctrl-C to a standard input stream? Just sending 03 does not work. -- William Stacey
0
by: misbahCU | last post by:
I am trying to make a script so that it can automate the basic functionality of the router like the logins and the password recovery. For this i am required to send the Ctrl+z, i tried using the...
3
by: zlf | last post by:
Hello I'm writing testcase for my console application. One testcase requires to test press Ctrl+C while the application is running. How to send Ctrl+C while running application through...
3
by: Blip | last post by:
Hello - I'm trying to wite these control characters to the serial port w/o success. I've tried sp.Write((Keys.ControlKey & Keys.X).ToString()); sp.Write((Keys.Control & Keys.X).ToString()); ...
6
DOSrelic
by: DOSrelic | last post by:
Cos I got the right window but nothing is copied to the Clipboard altho text is highlighted! Here is a little snippet from the method: internal void getHighlightedText() { // why can it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.