gsm notice board
[ Edited Fri Feb 06 2015, 09:56 am ]
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 ]
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 sooninvincible
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.
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 ]
// 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.
unsigned char code Mob_no[]= "78297*****";
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.