Hi everyone in this forum.Again I come searching for help.On my first post I got direction on how I can write program to interface gsm modem to read and send sms. Now from different tutorials I learn different things in this forum and I wrote the following program using MikroC pro PIC.
but when I interface with physical hardware by using compim does not perform what I programmed please any one to correct me or give another alternative to this.
I appreciate your comments.................................
Welcome.
1. What is the GSM modem that you are using?
2. Are you sure that the baud rate is 9600??? How did you confirm it??
3. In order to get +CMTI notification you have to set the gsm module to get this notification using AT+CNMI command.
4. Instead of if statement everywhere, user strstr function to check the string that you get from the UART..
@manuva
in addition to the suggestions by kgshankar1980
please verify few other things also
1. try to communicate your GSM modem using PC ( hyperterminal or similar software) to check it is functioning properly
2. check whether your modem required full HW control ( if yes you can use null modem DB9 configuration at modem side)
3. check the voltage level your modem is working on ( you may need to use MAX232 if the modem is using standard electrical specifications)
ok thanks for contribution , but I'm doing this by using proteus simulation with only modem a physical hardware.So i think no need to use MAX232.And I going to use AT+CNMI to enable for new sms notification and strstr instead of if statement. And I will inform where I reached.
the modem works fine because when I load program to microcontroller for only sending sms I got the following results.
after few changes on my above posted program the following results I get.
It seems like there is a problem with AT commands to sent to the modem. Please help what to do.
actually what I need is to write a program to check for new incoming sms ,read it ,compare with my specified string and switch on LED in portb and send feedback to mobile phone.
Hi every one , thanks very for your suggestions in my post. And now I'm succesful done to write the code and simulated on proteus by using sim900a module interfaced in comport of my computer.
I into implementation on hardware , I made the circuit and I tested it works fine in case of receiving sms and performing the specified task. But now I wonder why it can't send back to me status sms while in simulation it does. Thanks........
I appreciate your reply......