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 Nov 08 2017, 01:35 PM
Anirudh jain
I want to burn code in atmel 89s51 24pc 0329 but cannot get the connection with the burner. Can somebody provide me with the circuit diagram for connecting controller to burner. I'm using usb burner
Thu Nov 02 2017, 11:44 AM
karpal
write a program to exchange the content of b register with external RAM address 02CFH help me
Wed Nov 01 2017, 05:47 PM
sanae
i am using the DHT11 but i'm getting some errors in the simulate the programe in proteus 8 professional,: 1)cannot find model file 'DHTXX.MDF'.2)simulation failed due to netlist linker error(s).
Fri Sep 29 2017, 02:45 AM
Maaz
i am doing the same project on verilog please contact me [email protected]
Wed Sep 20 2017, 12:36 AM
Ted
In a missing pulse detector using a 555 timer connected as a monostable vibrator with a PNP transistor,how does the positve input pulse turn on the PNP transistor?
Sun Sep 03 2017, 02:29 PM
martymarty
How do I connect an <NOKIA 1100 LCD > to an atmega328P ?
poojab51296
Sun Aug 20 2017, 10:23 AM
i am intending to interface sd card with STM32F4 and want to write a file in sd card using SPI protocol but using HAL only. Can anyone help me PLEASE!!!!
poojab51296
Sun Aug 20 2017, 10:22 AM
hello
rawat742
Fri Aug 18 2017, 11:37 AM
hi @ angel patel i will attach a file i hope it will be helpfull for you
ExperimenterUK
Mon Aug 14 2017, 09:57 PM
@ angel patel... just log in and post your problem

Downloads

Comments

PANDIKOTESWARARAO
Mon Nov 20 2017, 07:40 PM
Hemantika
Sun Nov 19 2017, 07:34 PM
Wed Nov 15 2017, 10:46 AM
Ansh12
Sat Nov 11 2017, 03:43 AM
AngelGT93
Fri Nov 10 2017, 06:53 AM
JardCrocker
Wed Nov 08 2017, 05:27 PM
vivitern
Tue Nov 07 2017, 09:08 AM
catrons
Sat Nov 04 2017, 10:46 PM

Online

Guests: 47, Members: 0 ...

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

Members: 37918
Newest member: PANDIKOTESWARARAO
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Nov 20 2017, 10:18 PM
Here is a version of the tutorial that reads a key...
Ansh12 Avatar
Posted By Ansh12
Mon Nov 20 2017, 02:15 AM
As a starting point, can you tell us how much of t...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Nov 19 2017, 08:35 PM
As a starting point, can you tell us how much of t...
Ansh12 Avatar
Posted By Ansh12
Fri Nov 17 2017, 04:07 AM
I am looking keypad interfacing program. I was rea...
JardCrocker Avatar
Posted By JardCrocker
Wed Nov 08 2017, 05:29 PM
Hi...i am a new user here. I was also facing the s...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Nov 07 2017, 07:13 PM
> It employs a fairly advanced technique to detect...
vivitern Avatar
Posted By vivitern
Tue Nov 07 2017, 09:33 AM
I own a used Clavia ddrum4 SE drum module. It empl...
bvdb Avatar
Posted By bvdb
Wed Oct 18 2017, 01:50 AM
I purchased the RKitL51 8051 C compiler from Raiso...
ExperimenterUK Avatar
Posted By ExperimenterUK
Mon Oct 16 2017, 11:44 PM
That looks complicated.Is 8051_BLK a standard 80...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Oct 15 2017, 07:29 PM
According to this, gmail should support POP3.https...