Discussion in "Project Doubts" started by    invincible    Feb 6, 2015.
Fri Feb 06 2015, 09:54 am
#1
i have dumped the code on sim 300 on hardware. but only welcome to gsm modem is getting displayed on the lcd.are there any other changes in the circuit .please help.i have connected male to male connected between gsm modem and pv51rd2 microcontroller.all hardware is working well.but only that message is getting printed.do we have to make any changes to the code other then the mobile number .please help. i am attaching the program of which i am creating a hex file.its the same program downloaded from the website. please tell if we have to make any changes.


[ Edited Fri Feb 06 2015, 09:56 am ]
Fri Feb 06 2015, 06:31 pm
#2
for debug purpose you can connect controller to PC and enter \r\n+CMTI: "SM",2\r\n
do you see controller sending commands to you? you should get a response like AT+CMGR=2. check it.

[Edit] when I say \r = carriage return
and \n = new line
\r = 0x0D, enter key
\n = 0x0A, shift enter (i think)


[ Edited Fri Feb 06 2015, 06:32 pm ]
Wed Feb 11 2015, 10:10 am
#3

sir i have connected the controller to the pc and checked it using hyperterminal i gave the command \r\n+CMTI: "SM",2\r\n as u told and i got the same response AT+CMGR=2 THEN ITS SHOWING AT+CMGD=1UNKNOWN NUMBER"() IS RECEIVED +AT+CMGD=9 on the hyper terminal.and also on the lcd its showing" MESSAGE FROM UNKOWN".i have hardcoded my friends number in the code and i am using my sim in the modem.and password is "1234".
can u please tell how to send the message from the number hardcoded in the program.is there any format with which we have to send the message or we can send any message and that message should display on lcd.we have connected male to male serial cable between controller and gsm modem as both are having same female slots .we have checked the cable also its working fine.are we making any mistake in the format with which we are sending message. please help.
plz reply soon

invincible



Connect your modem to PC and send sms, check if you are getting
+CMTI: "SM", number
If yes then send AT+CMGR=number command and copy response from there and post here. Notice board is very much dependent on format of response that comes from modem so if there is any change in format, then code needs to be changed. So as I said, please post response of at+cmgr command.
Wed Feb 11 2015, 05:29 pm
#4
+CMTI: "SM",2
AT+CMGR=2
+CMGR: "REC UNREAD","+9178297*****","********","15/02/11,17:22:20+22"
Hello

OK

this is the response i am getting after the message is sent. please reply soon..

[Edit by Admin to protect identity of person]


[ Edited Thu Feb 12 2015, 10:15 am ]
Thu Feb 12 2015, 10:35 am
#5
Thanks for this info... So there is a little change in response. See some modems give response with +91 and some give without +91 because this is dependent on service provider, but these days all service providers are delivering messages with +91. So make the following change in the code and see if that works.
 // in function read_no() change the following if condition
if(Mob_no[0]==msg_array[26]&&
	Mob_no[1]== msg_array[27]&&
	Mob_no[2]==msg_array[28]&&
	Mob_no[3]== msg_array[29]&&
	Mob_no[4]==msg_array[30]&&
	Mob_no[5]== msg_array[31]&&
	Mob_no[6]==msg_array[32]&&
	Mob_no[7]== msg_array[33]&&
	Mob_no[8]==msg_array[34]&&
	Mob_no[9]== msg_array[35])

what I did is changed mobile number array comparison should start after skipping +91. so there is a 3 byte addition from start of array. earlier comparison was from byte 23rd now 26th.
Thu Feb 12 2015, 10:38 am
#6
also make sure that mobile number should be defined without +91 (10 digit only) in your code:
unsigned char code Mob_no[]= "78297*****"; 
Fri Feb 13 2015, 11:26 am
#7
sir i have made changes in the program according to what u had posted. now it is displaying "Msg frm Unknown".even if i send the password or if i send any message it will display "Msg frm Unknown".The the number which i have used in the program is right i am sending from that number only.i have also also tried using "+91**********" and then changed the array comparison from 23 to 35.with or without using +91 it is displaying the same thing on lcd. please reply soon.
Mon Feb 16 2015, 10:36 am
#8
sir i have made changes in the program according to what u had posted. now it is displaying "Msg frm Unknown".even if i send the password or if i send any message it will display "Msg frm Unknown".The the number which i have used in the program is right i am sending from that number only.i have also also tried using "+91**********" and then changed the array comparison from 23 to 35.with or without using +91 it is displaying the same thing on lcd. please reply soon.
Mon Feb 16 2015, 09:43 pm
#9


sir i have made changes in the program according to what u had posted. now it is displaying "Msg frm Unknown".even if i send the password or if i send any message it will display "Msg frm Unknown".The the number which i have used in the program is right i am sending from that number only.i have also also tried using "+91**********" and then changed the array comparison from 23 to 35.with or without using +91 it is displaying the same thing on lcd. please reply soon.

invincible


As I count it, you should compare the number
to msg_array[24] up to msg_array[33]
without the +91.
Tue Feb 17 2015, 10:25 am
#10
Ajay sir, u ahve been helping us from the beggining... its coming "Msg frm Unknown".plz help. reply soon

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

RobertGug
Tue Jun 18 2024, 04:38 pm
Jasonabepe
Tue Jun 18 2024, 04:24 pm
Thomcyday
Tue Jun 18 2024, 08:38 am
WalterWib
Tue Jun 18 2024, 05:44 am
SialisshopWat
Mon Jun 17 2024, 09:22 pm
Thomasraima
Mon Jun 17 2024, 07:17 pm
EriksaLaf
Mon Jun 17 2024, 03:13 pm
Anthonyjinee
Mon Jun 17 2024, 06:23 am