Discussion in "8051 Discussion Forum" started by    9780id    May 27, 2013.
Fri Jun 07 2013, 04:24 pm
#31
for(count=0;count<15;count++)
does 15 means 15 characters?the one that make me confused is in that reference no AT+CMGR is used to read sms.
how come it can read the message?
I am still confused
Fri Jun 07 2013, 04:26 pm
#32
when I connect modem and PC and give command AT+CMGR=1 for example then the hyperterminal will response:
+CMGR: "REC READ", "[mobile number]", ,"[date]"
[message]
so how that following code can replace AT+CMGR function?
Sat Jun 08 2013, 11:05 am
#33
you did not see my reply properly.. code waits till \n which is at the end of +CMGR line after that new line starts.. which is your sms text. so no need to replace CMGR anywhere. hope you get it now
Sun Jun 09 2013, 01:35 pm
#34
hi ajay, i used this number +62852131xxxxx..
it is 14 digits included the + sign.I got confused in this part
if(Pass_array[0]==msg_array[59]&&
	Pass_array[1]== msg_array[60]&&
	Pass_array[2]==msg_array[61]&&
	Pass_array[3]== msg_array[62])
	{
		display_msg();
	}

why this part is considered wrong?
is my array placement already right?how can I determine the start of the array?
thanks ajay
Mon Jun 10 2013, 02:18 pm
#35
finally my code works now.
the array I got from trial and error
one question,is it possible to delete sms using sms command?
so for example i sent DELETE to my circuit, will it be able to execute delete message using AT+CMGD=1,4? (for delete all message)
thank you
Mon Jun 17 2013, 04:15 pm
#36
@ 9780id
AT+CMGD is used for deleting sms
AT+CMGD=1,4? (for delete all message) will works for deleting sms locations seperated by commas
another command to delete all sms is

AT+CMGDA="DEL ALL"

Mon Jun 17 2013, 09:13 pm
#37
hi majoka, thanks for the information
I will try tomorrow and will report you the result then
thank you in advance
Tue Jun 18 2013, 10:39 am
#38
@9780id, there is a loss of data on forum, You might see some of replies are missing. Please do share your updates with us.
Thu Jun 20 2013, 08:00 pm
#39
@ajay i thought it was my bad connection since your post is lost and it is very hard to load this forum.lol
my tried the code to delete the sms but it won't work so my project is run now,but it can only respond well until the 9th sms because when the 10th sms be read the array between the message and programmed command is mismatch.
any solution for this?
and one more thing, my little brother ask me about this and really annoy me
he asked why I used an uncommon modem connector which he mean is a serial rather than USB?since it is more commonly used..
I can not answer that
Fri Jun 21 2013, 11:11 am
#40
I am not sure why delete SMS is not working with you. you do get sms location number to read from via +CMTI response from modem, so after sms read you can simple send AT+CMGD=[number] it will delete that particular message you've read. hopefully you never reach 9th one then

Regarding USB modem, you can use them but you need USB host controller on your microcontroller. Its hard to find smaller controllers with USB host functionality. and with 8051 its very difficult. PIC controller does have host capabilities as far as I remember and support on USB is good.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am