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.
hey there..i m working on a project where we need 2 interface a GSM modem with PC thru data cable for sending SMS using AT commands. Bt v r unable 2 prepare a source code for it. Pls send us ur suggestions 4 d same.
lrn 2 wrt & mb ans wl cm
If you are too lazy ro type all letters in a word, I could respond by giving you what you need with every statement abbreviated to the extent of being unusable, because why should I not be too lazy to type it all.
anyhow what does GSM to PC have to do with Keil?????
I wrote AT-commands to send DTMF signals through GSM modem.there is schematic diagram how to connect 8051 to GSM modem (Wavecom wismo) on http://www.taptronics.com
Urip
deare friend, i think there is a prob with your rs232 -to TTl gateway , if you r connecting a modem with your 89s51 then u require is direct wire interface nomax232 conversion takes place...bcoz with PC it does.. do this 1.make a simple attention with 89s51. 2. interconnect an lcd to display to check incoming strings. 3. always check global interrupts priority levels. 4.Then send a at with switch if you get ok in ur lcd then this means handshaking cleared....