I'm able to send AT commands to GSM modem,
but i am not able interface my 8051 to GSM model.
can i get sample inerfacing code for 8051 micro controller.
"I'm able to send AT commands to GSM modem"
How?
"but i am not able interface my 8051 to GSM model."
Why not? You've just said that you can send AT commands - so where's the problem?!
"can i get sample inerfacing code for 8051 micro controller."
Yes - There is an abundance all over the internet - just do the search!
But what makes you think it's a software problem? Are you sure that your hardware interface is correct?
Have you read the Manual for your GSM modem? Have you visited the manufacturer's website, and reviewed the available support materials - Application Notes, examples, reference designs, etc?
See also: http://www.keil.com/forum/docs/thread8510.asp
sorry for the incomplete details.
i am able to send the AT commands to GSM modem from HYPER TERMINAL of PC and modem is responding properly.
but I'm not able to send AT commands from 8051 microcontroller to modem.
Hardware is perfectly fine because when i interface the same microcontroller to pc i am able to read the AT commands into Hyper Terminal.
"Hardware is perfectly fine because when i interface the same microcontroller to pc i am able to read the AT commands into Hyper Terminal."
No, that does not guarantee that the hardware is perfectly fine! That simply demonstrates that it is good enough to get by with your particular PC.
Have you confirmed that your 8051 can both send commands to hypoterminal and receive responses from hypoterminal?
Are you usre that you are using the correct cable to connect your 8051 to the modem? It will need a different cable from the one you use to connect to the PC!
Do you have all the handshaking lines correct?
You need to adopt a methodical approach to debugging this - take one step at a time, so that you know exactly what does and does not work.
Have you tried running your 8051 code in the simulator, with the simulated serial IO directed to the PC's COM port, and the modem connectd to the COM port?
Once more somebody is under the impression that "testing" proves diddlysquat.
as Andy states, it ONLY show that a) you were lucky, b) the other end was very forgiving or c) you possibly have done it right.
Erik
"b) the other end was very forgiving"
Or, at least, the PC was more forgiving than the modem.
Note that modems tend to require certain of the control signals to be active, whereas PCs can easily be configured to ignore them all...
Just a case of poor test procedures, actually. Test plans can have bugs in them just like code. When you test, you need to make sure that you actually look at all of the important behavior, both positive (it does what I want) and negative (it doesn't do anything else). In this case, for example, good testing would have included test cases for the modem control signals. Put a scope on them and verify that they are set properly.
"Try it a couple of times and it looks like it works" is not testing.
Other means of validating the system, such as inspection and analysis, are also useful, and should be combined with testing. Each has its weak spots, which tend to overlap with the strengths of other approaches.
I have no beef whatsoever with "testing" I do it all the time.
What I have a beef with is that "it worked" qualifies as "testing" and a guarantee that everything is correct.
succesful testing does not prove the abscence of bugs, it ONLY proves the abscence of KNOWN bugs
Yes Mr.Andy, you are right.. We got to know that we have to use handshaking signals.We have written program for that but modem is not responding properly. Can you send some details regarding this? Thank you.
it is,
modems tend to require certain of the control signals to be active, whereas PCs can easily be configured to ignore them all...
what signals, Handshaking?
too basic a question , but what are the controls involved?
"modem is not responding properly"
In what way is it "not responding properly"? What precisely is "improper" about it?
How have you confirmed that it's the modem that is not responding "properly", rather than your code that is not sending the commands properly, and/or not handling the responses properly?
Have you fully checked your hardware - is the baud rate corect? Are all the control signals correct? Is the cable good? Are the voltage levels correct?
"Can you send some details regarding this?"
Details of what, exactly? You haven't even said what modem you're using, so how can anyone give you anything detailed without that basic knowledge?!
As I said before:
Have you run your code in the Keil Simulator, connected to your modem?
Again, You need to adopt a methodical approach to debugging this - take one step at a time, so that you know exactly what does and does not work.
Thank you MR. Andy, as you said, modem(WAVECOM) is responding properly. The problem was improper handshaking signals. Now we are sending DTR and RTS signal to modem, for which it is responding properly. Thank you for your support.
Please can u send me the code what you have solved for the interface for 8051 with gsm modem because i am facing same problem what you has posted . please send tha code. this is for my college project purpose
"please send tha code. this is for my college project"
Surely the whole point of a college project is to demonstrate that you can solve the problem yourself?
After reading this thread, you should have sufficient information & resources to enable you to complete your project.
If you have specific questions, then ask them - but don't just cheat your course by copying someone else's work!
Hi,
I am sending ATD command to GSM module. It gave me "NO CARRIER" and after this, when i tried it is giving "NO DIAL TONE"
what is meaning of this? but my hardware is working fine because i am able to read hardware details of GSM module and also i can read SIM ID number...
so, if i want to try ATD command, how can i proceed?
Thanks, Sandy
"I am sending ATD command to GSM module. It gave me 'NO CARRIER'"
That means that it did not successfully connect to the called party.
Did you dial the correct number? Did the called party answer? Is that number data-enabled? (some operators require a separate number for data calls; some do not permit data calls on some tarrifs - particularly pre-pay)
"after this, when i tried it is giving 'NO DIAL TONE'"
Presumably, this means that you have no service - check the modem manual for more specific details.
Also check the modem manual to see if it can give any extended and/or more informative error information.
"my hardware is working fine because i am able to read hardware details of GSM module and also i can read SIM ID number"
That shows that you are communicating with the module; it does not show that you have GSM service, nor that the calls you are attempting are permitted for the SIM that you are using on the Network that you are using...
I agree with you Andy. How dare you to ask for the code?? Get up and do some work.