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

ExperimenterUK
Sun Feb 04 2018, 09:38 PM
Hi Dave. Good to see you.
DavesGarage
Tue Jan 09 2018, 07:55 PM
It's been a few years since I poked around here - Hi all...
ExperimenterUK
Mon Jan 08 2018, 07:19 PM
Hi TPS. it's been a while..
۞ TPS ۞
Sun Jan 07 2018, 06:42 PM
hello
Thu Jan 04 2018, 01:50 PM
sayyad affrid
its AT89S52
Thu Jan 04 2018, 01:50 PM
sayyad affrid
sir, i want embedded c code for ultrasonic sensor having buzzer interfaced with AT9S52
Mon Dec 18 2017, 08:12 PM
zafir
i am making digital voltmeter using AT89C51, ADC and LCD 16x2,,, kindly someone please send me hex file in assembly language
Fri Dec 15 2017, 12:18 PM
mehari
can not find dhtxx.md file in proteus 8.0 can anybody help me please?
sahar7478
Fri Dec 08 2017, 12:47 PM
can i get gsm a6 library? can anybody help? tia
Faiqa
Sat Nov 25 2017, 08:32 AM
Can i get the code of Monitering and controlling of green house effect? ... Can anyone help me ?

Downloads

Comments

justotemon
Sat Feb 17 2018, 07:14 AM
nicolekristen
Fri Feb 16 2018, 12:19 PM
pavithrann
Wed Feb 14 2018, 04:46 PM
Tue Feb 13 2018, 03:18 PM
SDN1964
Sun Feb 11 2018, 12:00 PM
Nickynet
Sat Feb 10 2018, 11:02 PM
paulfjujo
Thu Feb 08 2018, 09:01 AM
holdthedoor264
Tue Feb 06 2018, 06:49 AM

Online

Guests: 57, Members: 0 ...

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

Members: 37963
Newest member: justotemon
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Feb 14 2018, 08:43 PM
>strange to don't define the way Write or Read..fo...
paulfjujo Avatar
Posted By paulfjujo
Wed Feb 14 2018, 02:25 PM
hello,Thank for your answer, but today i wrote thi...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 13 2018, 09:43 PM
Glad you sorted it.I'm sure you will remember if f...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 13 2018, 09:38 PM
>When i initialise UART_Init (9600); i get error=1...
Martinv Avatar
Posted By Martinv
Tue Feb 13 2018, 09:26 PM
Mmmm feel quite silly, but learned a lot. I must ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 13 2018, 08:07 PM
Can you zip and attach your full code.Using a seco...
paulfjujo Avatar
Posted By paulfjujo
Tue Feb 13 2018, 12:28 PM
hello,i tried this litle code with MikroC for 8051...
Martinv Avatar
Posted By Martinv
Tue Feb 13 2018, 09:22 AM
Thanks for the reply. The part of the main loop t...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 13 2018, 01:12 AM
Unless "READSMS" has some very long delays I doubt...
paulfjujo Avatar
Posted By paulfjujo
Sun Feb 11 2018, 06:52 PM
hello,The chip is probably locked.Why not build t...