Discussion in "Embedded GSM Development" started by    pakvainim    Mar 19, 2009.
Thu Mar 26 2009, 01:15 pm
#31


so to set baud rate the very first command we need to send is "AT+IPR=xxxx " right? But i m confused 'coz i read that initially we should only send "AT" command, to check the module, and we should get "OK" back in reply.....so now i m confused whether i should use simple "AT" command or "AT+IPR=xxxx"

pakvainim


No you don't have to start with "AT", it is just a quick way to confirm the modem is working,
it does nothing.

Of course the baud rate is already set when the modem switches on, you only need to use
"AT+IPR=xxxx " if you want to change it.
Also you need to know the modems current baud rate to be able to
send "AT+IPR=xxxx " .

Please avoid using bold type unless there is something you need to emphasize.
 pakvainim like this.
Mon Mar 30 2009, 11:31 am
#32
I checked my GSM Module.. We also tried to send SMS and called other no. n received cal through hyper terminall...everything is working perfectly fine....Now i want to burn the program 4 it on the microcontroller... so what should i write in the printf statement for CMGS in KEIL Software???

thnks in advance :-)
Tue Mar 31 2009, 01:39 pm
#33
you have to write exactly the same thing you did on hyper terminal its like you are emulating hyperterminal and you on controller.

so printf statement for sending sms would look like this..

printf("AT+CMGS=\"+1234567890\"\r");
printf("this is my message text");
UartSendByte(0x1A); //you have to write some simple byte sending function too coz 0x1A or controlZ is not a displayable character.

//check your mobile inbox :)
 pakvainim like this.
Tue Mar 31 2009, 02:02 pm
#34
okk i will try that and will let u know...
Tue Mar 31 2009, 02:07 pm
#35
and for sending UART byte do i need to add nethng else in my program or directly write UartSendByte(0x1A); ??
Tue Mar 31 2009, 02:08 pm
#36
I m sorry
it was UartSendByte(0x1A);
Tue Mar 31 2009, 02:15 pm
#37
void UartSendByte(unsigned char dat){
    while(!TI);
    TI=0;
    SBUF=dat;
}


add this function..
Tue Mar 31 2009, 02:16 pm
#38
void main()

{


printf("AT\r\n");
printf("AT+CMGF=1\r\n");
delay(1*2000);
printf("AT+CMGS=\"+1234567890\"\r");
delay(1*2000);
printf("Hello\r");
delay(1*2000);
UartSendByte(0x1A);
delay(1*2000);
}
void delay(unsigned int ms)
{ unsigned int i;
while(ms--)
{
for (i=0; i<DELAY; i++); /* For 1 ms */
}

}


What else do i need to change in this??
Plz reply..




Tue Mar 31 2009, 02:25 pm
#39
ok i vl add that function.. thnx a lot..
Wed Apr 01 2009, 04:50 pm
#40
I tried thea program but it is giving something else only on the Hyperterminal... Dint even get message in my inbox:-( Please help me out...

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

ChrisLub
Tue Apr 23 2024, 05:21 pm
Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm
Infewow
Sun Apr 21 2024, 06:30 pm
HumanTak
Sun Apr 21 2024, 12:26 pm