Page 1 of 1

String sending for AT command

Posted: Mon Aug 25, 2014 1:22 pm
by MarkW
Hi there,

I need to send an AT command to a GSM module that is used to setup
gprs mode etc.
However, within the string constant i also need to send the quote char ( " )
which kind of messes with the string format requirements. You then land up
with quotes within quotes.....
I know one can send part of the string and then send a char and then the rest
of the string in a few commands, but is there a certain format expression or a way
to send the whole string one shot?

Thanx

Mark

Re: String sending for AT command

Posted: Tue Aug 26, 2014 9:13 am
by Benj
Hi Mark,

Adding a backslash before the quote in the string should work \", Same as with newlines \n and carriage returns \r.

e.g.

"ATD \"078877787787;\"\n\r"

Re: String sending for AT command

Posted: Thu Aug 28, 2014 11:32 am
by MarkW
Hi Ben,

Great.....thank you.

Makes things a bit simpler :D