Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
void gsm_send(unsigned char *ch3)
{
data_send(ch);
//data_res();
delay(100);
data_send(ch1);
delay(100);
//data_res();
data_send(ch2);
delay(100);
//data_res();
data_send(a);
data_send(ch9);
data_send(a);
data_send("\r\n");
delay(100);
data_send(ch3);
delay(100);
SBUF=0x1a;
while(TI==0);
TI=0;
}



sorry try with this edited function.use your delay function in above code.

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: 51

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top