tanyajajodia
Junior Member level 1
avr at commands
i need to compare the SMS received with predefined stored strings. the phone connected to an Atmel 8535, which reads that SMS through AT commands. was just confused over how to go about implementing it..
can i store the read message from the UDR directly into a string and also have the predefined message in string format. then can just comparing the two strings give the correct result??
also when was trying to send a message from the MC. the program i was trying is as follows:
is this code correct? do i need to add in anything? or is anything not really required?
really need to get thru this... would be of great help. thanx...
i need to compare the SMS received with predefined stored strings. the phone connected to an Atmel 8535, which reads that SMS through AT commands. was just confused over how to go about implementing it..
can i store the read message from the UDR directly into a string and also have the predefined message in string format. then can just comparing the two strings give the correct result??
also when was trying to send a message from the MC. the program i was trying is as follows:
Code:
#include<90s8535.h>
#include<stdio.h>
#include<delay.h>
unsigned char str1[] = "AT";
unsigned char str2[] = "AT+CMGS=25";
unsigned char str3[] = "079119890202456401000B819078004371F400040C486F772061726520796F753F";
void main(void)
{
UBRR=0x33;
UCR=0x18;
puts(str1); //AT
putchar(0x0D); //Enter
putchar(0x0A); //Line feed
delay_ms(3000);
puts(str2); //AT+CMGS=25
putchar(0x0D);
putchar(0x0A);
delay_ms(3000);
puts(str3); //Message in PDU format
putchar(0x1A); //Control-z
}
is this code correct? do i need to add in anything? or is anything not really required?
really need to get thru this... would be of great help. thanx...