[51] Problem in sending SMS through GSM module using 8051

Status
Not open for further replies.

thats what i am confused about.. now i will try
btw.. why u add that data res() ? what is its objective?
 

data_res() is the data receive function. which is not needed by you you want just send sms as of now.
 

data_res() is the data receive function. which is not needed by you you want just send sms as of now.

i followed your code and edited it as u suggested. once it worked but now it won't, please check if it working or not
 

Attachments

  • test3.txt
    1.5 KB · Views: 53

Code:
void gsm_send(unsigned char *ch3)
{
data_send("AT\r\n");
Delay_ms(150);

data_send("ATE0\r\n");
Delay_ms(150);

data_send("AT+CMGF=1\r\n");
Delay_ms(150);


data_send("AT+CMGS=\"+918283046191\"\r\n");

Delay_ms(150);

data_send(ch3);
Delay_ms(150);

SBUF=0x1a;
while(TI==0);
TI=0;
}

you can also do like above can edit code like you want.

what do you mean by once it worked and now it won't?

you are sending the sms just once so every time you power on the device it will send a single sms?

make sure your sim card have enough balance to send a more sms.
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…