Discussion in "Embedded GSM Development" started by    Alvanbert    Feb 10, 2012.
Mon Mar 26 2012, 09:49 PM
#51
I believe Alvanber is right.. adding a prefix and postfix to sms message makes it easy to read and extract it from modem. you can easily look for a special character to start storing and stop storing. saves a lot of buffer space for you.

Please share your work with everyone so its helpful for them to use it.
Mon Mar 26 2012, 10:16 PM
#52
@Ajay Below is the code am using to filter the message. The problem is it filters the message required and displays it which is ok. but still in case the lcd characters arent filled, it uses the remaining potion to diplay the whole message again..i.e with date and time. i want it to display only and only the filtered message so that if the message doesnt fill the lcd screen, the remaining part remains blank. Thanks

unsigned char *temp;
temp=msg;
do
msg++;
while(*msg!='#');
msg++;
do
*temp++=*msg++;
while(*msg!='#');
*temp='\0';
Tue Mar 27 2012, 09:31 AM
#53
make two functions first extract the message body from data time etc
after that if u want to filer out the message more than make another function

void read_text( unsigned char *msg,unsigned char *no)   // this function decode the message recieved from modem
{
/*
modem send message in this format
+CMGR: "REC READ" ,"+923335946231","10/10/23,14:29:33+04"
hello

OK
*/

unsigned char *temp;
temp=msg;
do
msg++;
while(*msg!=',');         //  reaching at no
msg++;                    // doing thid because service centre message not start from +
msg++;   
do
*no++=*msg++;
while(*msg!='"');         // reaching at time
*no='\0';
do
msg++;
while(*msg!='\n');
msg++;
do
*temp++=*msg++;
while(*msg!='\r');       // reaching at end of message
*temp='\0';
}


now no has user number
now msg has "hello" according to my example
now if u want to filter out more than make a 2nd function as u make above
Thu Mar 29 2012, 07:07 PM
#54
@Majoka i have realised my problem only comes about when i use lcd_data() function to print the message string but if i use the lcd_str() function its okay with the code u gave me.

The problem with using lcd_str(), i cant control where to display part of the string as i would have done with lcd_data() function because with the lcd_data () function i can use a for loop and display string through e.g lcd_data(msg1[i]).


Mon Dec 12 2016, 09:59 PM
#55
please what does this mean in the code in this forum
1 #define LCD_EN 0X80
2. #define LCD_RS 0X20
thanks
Tue Dec 13 2016, 08:55 AM
#56
#define LCD_EN 0X80
LCD enable pin is at bit 7 of whatever port it is connected to. e.g. If LCD is connected to P1 then as per macro LCD_EN is connected on P1.7

#define LCD_RS 0X20
similar to LCD en, LCD register select (RS) is connected on bit 5 of port. e.g. P1.5 if port P1.
 rodrider like this.

Get Social

Information

Powered by e107 Forum System

Conversation

Mon Jan 16 2017, 03:15 PM
Rutuja
How can we read notepad file using random acess file
Fri Jan 06 2017, 06:18 AM
muhammad Umar
i need cd4047 library file for protious please help me i s
ExperimenterUK
Wed Jan 04 2017, 09:01 PM
@Emin what is your site user name ?
Tue Jan 03 2017, 11:16 PM
Emin
Emin: I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Tue Jan 03 2017, 11:15 PM
Emin
I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Sun Jan 01 2017, 03:14 PM
Manoranjana Chary
Write an embedded program of increment and decrement in LCD connected to two keys of int1 and int0. Can u please send me the code for this as fast as possible because i need to submit it in college kindly
ExperimenterUK
Sat Dec 31 2016, 06:28 PM
Happy New Year everyone
ExperimenterUK
Sat Dec 31 2016, 06:27 PM
Please post questions in the forum, the chat box is for chat
Thu Dec 29 2016, 07:47 AM
drashti ranolia
can anyone help me for the microcontroller 8051 programming code for street lights that glow on vehicle movement using IR sensors ?
Tue Dec 27 2016, 11:45 AM
Shubhangi
Do we have to write lookup table for d6t thermal sensor?

Downloads

Comments

sarfrosh92
Sun Jan 15 2017, 09:18 AM
Deepakvaishu
Wed Jan 11 2017, 10:25 AM
rana_jee773
Sat Dec 10 2016, 11:22 AM
[email protected]
Thu Dec 08 2016, 11:02 AM
Jonathan.kei
Mon Nov 21 2016, 04:30 PM
AVRuser1
Sun Nov 20 2016, 06:07 PM
JaguarPaw
Thu Nov 17 2016, 07:44 PM
PeterJohn
Mon Nov 14 2016, 05:54 PM

Online

Guests: 28, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37796
Newest member: sarfrosh92
Forum Activity
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 08:31 AM
you are right ..I should not include '\' at t...
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 06:07 AM
No ,its not the null character, its just the '...
sankalp_s Avatar
Posted By sankalp_s
Sun Jan 15 2017, 07:55 PM
There is a fault in your Proteus design.If you loo...
sarfrosh92 Avatar
Posted By sarfrosh92
Sun Jan 15 2017, 10:04 AM
The 8051 Microcontroller (3rd Edition) by I. Scott...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 14 2017, 11:59 PM
The site editor may have removed the 0 from \0.Actually it should not be needed, sochar *phone_no[3 ]={"1234567890" ," 9087654321" ,"76676667676"}; //array of pointers should work.
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 14 2017, 11:54 PM
There is a fault in your Proteus design.If you loo...
sankalp_s Avatar
Posted By sankalp_s
Fri Jan 13 2017, 06:52 PM
Hi phill sir.. testButton1: ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Fri Jan 13 2017, 11:58 AM
suppose i have this arraychar *phone_no[3 ]={"1234...
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Jan 13 2017, 05:59 AM
You need to send AT command one by one to all the ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Wed Jan 11 2017, 10:47 AM
How to send the same message to multiple contacts ...