Q24 Auto SMS messaging using AT comamnd in C program


#1

Hello,

I want to send out SMS messaging using AT command in a C program. The program is tested working on SIMCOM module, but it failed to send out SMS from WaveCOM Q24 automotive module.

I tried to similate the problem using Hyperterminal or minicom. The Wavecom Q24 module always return “Error” reply when I input the AT+CMGS command in one complete line. Can anyone help me on this problem?

OK
AT+CMGF=1
OK
AT+CMGS=“xxxxxxxx”\r"TEST"\x1A

ERROR

The C program:

char buffer[256];
char *phone_number=“xxxxxxx”;

sprintf(buffer,“AT+CMGS=”%s"\rabc%c", phone_number, 26);
write(fd, buffer, strlen(buffer));

Does anybody solve this problem before?

Thank you.

Regards,
TS


#2

You need to wait for the “>” prompt before you send the message content!


#3

Thank you.


#4

We are also having this problem. Our difference is that we are using the Terminal Emulator from the Target Monitoring Tool.
Whenever we type

at+cmgs="+19795400744"

we see

ERROR

Does anyone know what the problem is here??
Thanks


#5

first you should type at command
AT+CMGF=1


#6

If you wanmt to know what is tha error just activate error display by giving command “AT+CMEE=1” after this try to send the SMS you get ERROR: with number By using that number you can solve the problem you are facing.


#7

If you want to know what is that error,
just activate error display by giving command “AT+CMEE=1”
after this try to send the SMS you get ERROR: with number
By using that number you can solve the problem you are facing.

Try and reply the answer…