how read an SMS containing 450 words.

Status
Not open for further replies.

bikashh

Full Member level 5
Joined
Nov 28, 2009
Messages
264
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
india
Activity points
3,132
Dear all,
i am trying to read an sms containing more than 450 characters.
I know in a location i can store 160 character.

thanks in advance
 

read consecutive memory locations which sums upto 450characters

---------- Post added at 19:50 ---------- Previous post was at 19:50 ----------

where are you storing eeprom or SIM memory?
 

but how to implement this.because 450 characters means 3 locations and each location is updated after every 5 to 10 sec.
 

You will send the AT-Command that reads the SMS from a specific location three times and, each time you read, store the message read in an array of 160 elements. Finally, concatenates the three arrays together.
 

do you mean to say,i should read the 1st location only.that too 3 time

thanks for your help.
 
Last edited:

Read the first location, then the second then the third. Each time you will read only a single location.
 
also is timing to read location so important.in between receving messages can i read that location.
Thanks
 

No, timing is not so important. But, you have to make sure that the location you are trying to read is occupied by a message otherwise, an error will result.
One important point, if you are going to receive a multi-location message, you have to make sure that your phone has enough locations for this message.

Hope this helps.
 

what i am doing is saving the 1st location and than keep on receving the remaining message.but at last mhen i read the saved location i don't get anything
 

what i am doing is saving the 1st location and than keep on receving the remaining message.but at last mhen i read the saved location i don't get anything

As a start, try the following:
1- Free the phone from all stored message. That is, take a backup from all the messages stored on the phone.
2- Now, since you have an empty phone, you will not have a problem in determining the location of the message.
3- Send yourself a message(450 characters). Since your phone is empty, then the message will be stored starting from location "1".
Thus, the message should be stored in the locations "1", "2" and, "3"

Hope this helps.
 

but the reception of whole message would take atleast 15-20 second and if i read inbetween the whole message gets corrupted.should i wait for this much time and then read.

Thanks for your time
 

Yes, you should wait till the whole message is received. So, you can wait for a minute before reading the message.
Note: Due to some network failures, a message my be received incomplete. In this case the message may be corrupted or missing some required information. Thus, you may need to add acknowledgment system or something like a CRC check.
 

thanks for your continious reply...

while testing,if i read the 1st location my terminal shows the whole message.
+CMTI: "SM",1
+CMTI: "SM",2
+CMTI: "SM",3
at+cmgr=1
+CMGR: "REC READ","+919975633922",,"10/12/08,15:54:35+22"
The American Standard Code for Information Interchange is a standard seven-bit code that was proposed by ANSI (American National Standards Institute) in 1963, and finalized in 1968. Other sources also credit much of the work on ASCII to work done in 1965 by Robert W. Bemer. ASCII was established to achieve compatibility between various types of data processing equipment.#
OK
I am not reading all the locations because i am getting whole message if i read the 1st location
but later when i code it doesnot show as above
at+cmgr=1
+CMGR: "REC READ","+919975633922",,"10/12/08,15:54:35+22"

in the above code i am detecting # to verify the message.
 

Where did you type the above code (the one that worked)? I mean, did you use the "Hyper Terminal"? or you managed to implement this in your controller?
 

I typed the above code in hyper terminal using my testing kit.

but after implimentation in actual device i get
at+cmgr=1
+CMGR: "REC READ","+919975633922",,"10/12/08,15:54:35+22"

---------- Post added at 12:16 ---------- Previous post was at 12:14 ----------

but at the same time the code works fine if i receive a message of lingth less than 160 character
 

OK, try to read starting from location "2" then, from location "3" and see what you will get.
Also, can you send me the code you use for sending the "AT-Command"?
 

i am not able to short out
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…