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

scaneraNom
Sat May 04 2024, 02:21 am
gtaletrzua
Fri May 03 2024, 10:55 am
Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am