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

Wed Feb 22 2017, 06:14 AM
ChollyMo
Indeed, on the LCD tutorial, many missing Tables and figures !!
Wed Feb 22 2017, 06:06 AM
ChollyMo
I don't see any Table 3. I'm using Chrome.
Fri Feb 03 2017, 05:56 AM
irfan shaikh
hi, i want interface WS2811 pixel led using NUVOTON N79E352, but i dont know how to code it. can anyone help me or provide me sample coding for interfacing WS2811 PIXEL LED. THNX
Thu Jan 19 2017, 08:42 PM
abhays
Hi...i have made a circuit for interfacing PT100 with LM358 whose temperature is shown on the LCD...But the temperature is not getting incresed slowly ..a small change directly increses the temp...can any one help me
Thu Jan 19 2017, 04:27 PM
roba
send me alarm clock simulation using proteus software
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..

Downloads

Comments

XuZiling
Wed Feb 22 2017, 02:40 AM
diwakar_96
Thu Feb 16 2017, 02:40 PM
Helia
Thu Feb 09 2017, 09:59 AM
fasihaftab
Sat Jan 28 2017, 08:58 AM
jmunjr
Tue Jan 17 2017, 06:25 PM
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

Online

Guests: 0, Members: ...

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

Members: 37801
Newest member: XuZiling
Forum Activity
XuZiling Avatar
Posted By XuZiling
Wed Feb 22 2017, 02:46 AM
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Feb 20 2017, 09:52 PM
The syntax should be like thisREC READ :"number w...
diwakar_96 Avatar
Posted By diwakar_96
Sat Feb 18 2017, 11:25 AM
Helia Avatar
Posted By Helia
Fri Feb 17 2017, 08:02 AM
The syntax should be like thisREC READ :"number w...
Helia Avatar
Posted By Helia
Fri Feb 17 2017, 04:20 AM
This is the proteus simulation and the code.. we a...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Feb 16 2017, 05:56 PM
HiThis is what we get on the lcd when we burn the ...
Helia Avatar
Posted By Helia
Thu Feb 16 2017, 04:37 PM
HiThis is what we get on the lcd when we burn the ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 14 2017, 06:11 PM
Thank you when we send a message the message is no...
Helia Avatar
Posted By Helia
Tue Feb 14 2017, 06:18 AM
Thank you when we send a message the message is no...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Feb 11 2017, 09:22 PM
I made a few changes to make programming easier.Re...