UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CPIN = xxxx\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGF = 1\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGS=\"+41774004311\"\r\n");
delay_ms(500);
UART2_Write(10);
UART2_Write(13);
UART2_Write_text(" ba7abek Hasan test0\r\n");
UART2_Write(26); // Send CTRL + Z as end character

if (UART2_Data_Ready() == 1) {
// if data is received
UART2_Read_Text(rx2buff, "OK", 20); // reads text until 'OK' is found
UART1_Write_Text("msg SENT\r\n"); }
////////////////////////////

I write two times new line, is it ok, or not,
did any1 used it succefully AT command to send a SMS,

Greetings, Thanks in advance,"> UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CPIN = xxxx\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGF = 1\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGS=\"+41774004311\"\r\n");
delay_ms(500);
UART2_Write(10);
UART2_Write(13);
UART2_Write_text(" ba7abek Hasan test0\r\n");
UART2_Write(26); // Send CTRL + Z as end character

if (UART2_Data_Ready() == 1) {
// if data is received
UART2_Read_Text(rx2buff, "OK", 20); // reads text until 'OK' is found
UART1_Write_Text("msg SENT\r\n"); }
////////////////////////////

I write two times new line, is it ok, or not,
did any1 used it succefully AT command to send a SMS,

Greetings, Thanks in advance,"> UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CPIN = xxxx\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGF = 1\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGS=\"+41774004311\"\r\n");
delay_ms(500);
UART2_Write(10);
UART2_Write(13);
UART2_Write_text(" ba7abek Hasan test0\r\n");
UART2_Write(26); // Send CTRL + Z as end character

if (UART2_Data_Ready() == 1) {
// if data is received
UART2_Read_Text(rx2buff, "OK", 20); // reads text until 'OK' is found
UART1_Write_Text("msg SENT\r\n"); }
////////////////////////////

I write two times new line, is it ok, or not,
did any1 used it succefully AT command to send a SMS,

Greetings, Thanks in advance,">
Hello everyone,

I'm trying to send a SMS using easypic7 and sim900 gsm module,

1- how to send ctrl+z through mikroelektronika usart terminal for testing,

2- this code not working, even though i receive in the end OK from the sim900, but no sms received from the other phone

/////////////////////
UART2_Write_Text(" AT\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CPIN = xxxx\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGF = 1\r\n");
UART2_Write(10);
UART2_Write(13);
Delay_ms(1000);

UART2_Write_Text(" AT+CMGS=\"+41774004311\"\r\n");
delay_ms(500);
UART2_Write(10);
UART2_Write(13);
UART2_Write_text(" ba7abek Hasan test0\r\n");
UART2_Write(26); // Send CTRL + Z as end character

if (UART2_Data_Ready() == 1) {
// if data is received
UART2_Read_Text(rx2buff, "OK", 20); // reads text until 'OK' is found
UART1_Write_Text("msg SENT\r\n"); }
////////////////////////////

I write two times new line, is it ok, or not,
did any1 used it succefully AT command to send a SMS,

Greetings, Thanks in advance,


JLCPCB – Prototype 10 PCBs for $2 (For Any Color)

China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir