Keil Logo Arm Logo

Interfacing of GSM modem with 8051 microcontroller

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
venkatesh mane
Posted
17-Oct-2006 08:06 GMT
Toolset
C51
New! Interfacing of GSM modem with 8051 microcontroller

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.

Read-Only
Author
Andy Neil
Posted
17-Oct-2006 09:08 GMT
Toolset
C51
New! Far too vague a question!

"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

Read-Only
Author
venkatesh mane
Posted
17-Oct-2006 09:48 GMT
Toolset
C51
New! RE: Far too vague a question!

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.

Read-Only
Author
Andy Neil
Posted
17-Oct-2006 10:45 GMT
Toolset
C51
New! Over Optimistic

"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?

Read-Only
Author
erik malund
Posted
17-Oct-2006 13:59 GMT
Toolset
C51
New! RE: Over Optimistic

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.

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

Read-Only
Author
Andy Neil
Posted
17-Oct-2006 16:05 GMT
Toolset
C51
New! RE: Over Optimistic

"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...

Read-Only
Author
Drew Davis
Posted
17-Oct-2006 18:31 GMT
Toolset
C51
New! RE: Over Optimistic

Once more somebody is under the impression that "testing" proves diddlysquat.

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.

Read-Only
Author
erik malund
Posted
17-Oct-2006 20:02 GMT
Toolset
C51
New! RE: Over Optimistic

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

Erik

Read-Only
Author
venkatesh mane
Posted
24-Oct-2006 07:00 GMT
Toolset
C51
New! RE: Over Optimistic

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.

Read-Only
Author
Andy Neil
Posted
24-Oct-2006 10:31 GMT
Toolset
C51
New! I dunno

"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 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?

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.

Read-Only
Author
venkatesh mane
Posted
24-Oct-2006 10:50 GMT
Toolset
C51
New! RE: I dunno

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.

Read-Only
Author
hoysala n s
Posted
14-Dec-2006 19:48 GMT
Toolset
C51
New! RE: I dunno

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

Read-Only
Author
Andy Neil
Posted
14-Dec-2006 20:01 GMT
Toolset
C51
New! Don't cheat your course!

"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!

Read-Only
Author
Susanti Nervik
Posted
11-Mar-2007 18:29 GMT
Toolset
C51
New! RE: Don't cheat your course!

I agree with you Andy. How dare you to ask for the code?? Get up and do some work.

Read-Only
Author
he rajan
Posted
24-Oct-2006 07:05 GMT
Toolset
C51
New! RE: Over Optimistic

"b) the other end was very forgiving"

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?

Read-Only
Author
Sandy M
Posted
17-Jan-2007 08:56 GMT
Toolset
C51
New! RE: Far too vague a question!

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

Read-Only
Author
Andy Neil
Posted
17-Jan-2007 12:31 GMT
Toolset
C51
New! Starters...

"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...

Read-Only
Author
gaurang sheth
Posted
31-Oct-2006 17:15 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

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.

Read-Only
Author
erik malund
Posted
31-Oct-2006 18:10 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

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?????

Erik

Read-Only
Author
Urip Wisnuardi
Posted
2-Nov-2006 16:28 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

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

Read-Only
Author
anupam dubey
Posted
6-Dec-2006 10:01 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

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....

Read-Only
Author
Andy Neil
Posted
6-Dec-2006 14:09 GMT
Toolset
C51
New! Nonsense!

" if you r connecting a modem with your 89s51 then u require is direct wire interface no max232 conversion"
No!!
This is completely false!

If you are using a (GSM) modem then it will use a true RS232 interface and will require an RS232 transceiver (MAX232, etc)

If, however, you are using some sort of embedded GSM module, then it may just use logic-level signals.
But you must check the datasheet to confirm this - some modules use non-standard logic voltage levels...!

Read-Only
Author
anupam dubey
Posted
7-Dec-2006 07:50 GMT
Toolset
C51
New! RE: Nonsense!

but with a sense,
i have tried several modems the person is failing to get results just bcoz he is terribly confused with null modem usart architecture. moreover i can bid that more than 70% modems are ttl compactible with 8051..
like wavecomm
ok with you understandings i just want to help him out not you.
best way to get knowledge is to teach somebody nor to discourage like that you have done..

Read-Only
Author
erik malund
Posted
7-Dec-2006 13:16 GMT
Toolset
C51
New! RE: Nonsense!

first you write 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..

Of course the fact that you use Stupid Monkey S*** should automatically make anyone dismiss what you write, but when you state something as an "universal truth" you may mislead someone.

then when corrected, you continue, still using Stupid Monkey S***, i can bid that more than 70% modems are ttl compactible with 8051.. so what do you actually mean besides "I have no idea whatsoever what I am babbeling about"

Most (I know of no other, but as opposed to you I do not do generalizations when I do not know) modems are made for PC use and thus will have standard RS-232 interface

Erik

Note
This message was edited because of rude or abusive language.

Read-Only
Author
anupam dubey
Posted
7-Dec-2006 13:34 GMT
Toolset
C51
New! RE: Nonsense!

hell!
too much talk now!
i illustrated the thing with my mind,if there is a prob
u r nobdy to talk rubbish like this , i think u r sick
i never think of a guy like you. i think the administrator is sleepy here! bad bad very bad manners

Read-Only
Author
erik malund
Posted
7-Dec-2006 13:52 GMT
Toolset
C51
New! RE: Nonsense!

u r nobdy to talk rubbish like this , i think u r sick

Now, WHO is "talking rubbish" what else is 'u' 'r' etc English it is not

Erik

Read-Only
Author
Andy Neil
Posted
7-Dec-2006 21:53 GMT
Toolset
C51
New! RE: Nonsense!

"null modem usart architecture"

Null-Modems and U(S)ARTs are completely differnt issues.

"moreover i can bid that more than 70% modems are ttl compactible"
No. Again that is not correct

Again, you need to distinguish a true Modem from an embedded module:
A Modem will use RS232 levels and, therefore will require and RS232 Transceiver;
An embedded Module most probably will not use RS232 levels - and it may not even use standard logic levels.

Consider Wavecom, for example:
Their Fastrack is a Modem and it most certainly does use RS232 levels;
Their Integra is an embedded Module and it does not use RS232 levels

Remember also that an RS232 transceiver inverts the signal...

"i just want to help him out"

Giving him stuff that is blatantly wrong does not help him!
In fact, connecting RS232 levels direct to an 8051's pins could well damage them!

Read-Only
Author
loganayakam sivaraj
Posted
29-Dec-2006 05:31 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

gsm inter facing with 8051 microcontroller

Read-Only
Author
Andy Neil
Posted
31-Dec-2006 19:19 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

"gsm inter facing with 8051 microcontroller"

Yes, apart from the spurious space in "inter facing (sic)", that is the subject of this thread.

Was there a question you wished to ask, or a contribution you wished to make?

Read-Only
Author
John Hopf
Posted
16-Jan-2007 04:50 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Wow,

It sounds like we might actually have someone here who actually KNOWS something.

One thinks, I might add, is that can we try to keep this down to a dull roar?

We should not be trying to attack each other, but HELP each other !

Yes, we are all at different steps on this learning curve, but should remember to think of when we were at the bottom, and looking up and hoping someone would give us a hand.

All the best from John, Newport, RI, USA

Read-Only
Author
Susanti Nervik
Posted
11-Mar-2007 18:43 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Andy was right. People/students or anyone who try to get a "degree" should not cheat. By the way, I was confused too when someone could write a sentence but made no sense.

Read-Only
Author
sakthi r
Posted
14-Mar-2007 07:36 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

hi Venkatesh

Whether you got the code for interfacing 8051 with gsm modem.Y i am asking is,because i have the code.

Sakthi

Read-Only
Author
Venu Gopal
Posted
27-Mar-2007 08:04 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Hi Sakthi,

I would be interested in knowing how this actually works,

I would like to know the interfacing part b/w GSM modem and Micro controllers. I am new to this Embedded world, I would be happy if some one could help me in following the right path.

Cheers,

Venu.

Read-Only
Author
Andy Neil
Posted
27-Mar-2007 10:01 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

"I would like to know the interfacing part b/w GSM modem and Micro controllers"

As stated here many times already, the modem neither knows nor cares what is connected to its serial port.
It makes no difference to the modem whether it is connected to a microcontroller, a terminal, a PC, or anything.
All the modem knows is that it needs to receive AT commands as described in its Manual, and then it will react as described in its Manual.

So, obviously, the first thing you need to do is to read the modem's Manual!

Similarly, as far as the microcontroller is concerned, this is simply a matter of sending and receiving serial data.

All this has been discussed plenty of times here already - so follow the links already given in this thread, and do a search for "GSM Modem"

Read-Only
Author
Venu Gopal
Posted
27-Mar-2007 21:18 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Thanks Andy,

I need a startup and I can take it from here.

Cheers,

Venu.

Read-Only
Author
Wilfredo Molina
Posted
4-Jun-2007 23:12 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

I already intefaced a 8051 with a Sony Ericsson T126. I can send and receive information from/to both devices. I tooks around 3 months to figure and realize out all about the connection. I also interfaced the 8051 with an Ethernet controller to conect It to Internet. In other words, It is possible to connect the old MCS-51 with the real world but It costs time, money and tons of essay-error.

Read-Only
Author
abbas .
Posted
29-May-2007 06:49 GMT
Toolset
C51
New! Interfacing of GSM modem with 8051 microcontroller

Hi..I am facing the same problem as u did and the timegap is one year...I need help regarding the schematics of interfacing of the mobile phone with gps ofcourse uc is in there.Right now i have developed a vague sort of diagram but the problem is same that it is not working.Also this keil is new for me and i m trying to write a code for the transmission of gps strings from sms.Since you r already dome with this project i would be really thankful if u guide me in this way.

Read-Only
Author
Venugopal Bonthapalli
Posted
5-Jun-2007 00:23 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Hi Abbas,

Well I have just started and I being busy with other assignments don't have time. I would be able to start this might be affter 2 weeks from now.

Read-Only
Author
Abbas .
Posted
5-Jun-2007 21:32 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Thanx Venugopal, Well I will be very glad if u r able to help me out.I am working on this thing and now the problem is of the nand ic.When i will be connecting gsm modem and gps receiver with the uc i wil be needing the nand ic.How will i do this thing ,I am getting no idea about this .Plz help me out soon,I will b waiting....

Read-Only
Author
Per Westermark
Posted
5-Jun-2007 21:52 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

u?

r?

i?

What NAND IC?

plz?

b?

Read-Only
Author
Abbas .
Posted
6-Jun-2007 06:54 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Well as i have told u that gsm and gps will be interfaced thru uc.Since they can;t operate simultaneously so i am using nand operation so that i can use them but one at a time.First i will get data from gps and then switch to gsm to transmit it.That is wht i have thought till not.Tell me ur suggestion

Read-Only
Author
Andy Neil
Posted
6-Jun-2007 08:25 GMT
Toolset
None
New! Please write clearly & completely

"Tell me ur suggestion"

I suggest that you stop all this "ur" and other unnecessary abbreviation - as Per Westermark has hinted.

There is already a language barrier, and you are just confusing it further by over-abbreviating to the point of making your posts incomprehensible!

Please take the time to write your post in full, complete sentences using full, complete words.

The more effort you put into making your post clear and understandable, the more likely you are to get good help!

Read-Only
Author
Per Westermark
Posted
6-Jun-2007 08:36 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

i?

u?

thru?

ur?

So, instead of talking about multiplexing a serial port, you throw in the word NAND, and expect the rest of the world to understand what you where thinking?

Then you specifically write that you don't know how to use a NAND IC. Why suggest a specific solution you don't know how it works, instead of describing the problem you have and ask for tips on how to solve it?

NAND gates are very general and can solve quite a lot of things, but multiplexing a number of signals (RX, TX and an unknown number of handshake lines) while making sure that the signals are non-inverted might not be the best situation to learn about the use of NAND gates.

I really recommend that you look at normal MUX chips, containing a number of two-to-one MUXes. They are trivial to use and very cheap. You could almost say that they where specifically made for solving this kind of problem...

Read-Only
Author
Andy Neil
Posted
6-Jun-2007 09:47 GMT
Toolset
C51
New! RE: Interfacing of two serial devices with 8051 microcontroller

There are plenty of 8051 derivatives available with two UARTs - why not just use one of them?

http://www.keil.com/dd/search_parm.asp

Get your system working like this first, then think about adding the complication of multiplexing if you still think it's worth it...

Remember that GSM modems can send unsolicited messages - you will miss them if they happen while the multiplexer is switched to the GPS...
The converse may also be true of your GPS...

Read-Only
Author
Abbas .
Posted
7-Jun-2007 05:08 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

If you people are uncomfortable with the writing then I will try to improve it now. I am new to the field of microcontrollers and I am reading it from the book of Scott Mcknzie. So,I will not be needing NAND operation.Instead I can use the two UART of 8051. Can anybody suggest me the algorithm of the program.What I have thought is that first of all microcontroller will take a string from gps reciever and pick the string of lattitude and longitude.After that the microcontroller will send the AT commands to the GSM modem to send the lattitude and longitude as a sms.

Read-Only
Author
Per Westermark
Posted
7-Jun-2007 06:01 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

It seems like you already have the algorithm.

The only think that remains is the startup - to initialize the processor (I/O pins, serial ports, baudrate, interrupt handlers, time keeping...).

Read-Only
Author
Abbas .
Posted
8-Jun-2007 05:41 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

Yes,This is the idea which I have in my mind.But as I have told you that I am new to programming so I am facing alot of difficulty.If anybody can provide me a good keil tutorial other than available on this website or a good guideline so that I can continue my work.

Read-Only
Author
Venugopal Bonthapalli
Posted
14-Jul-2007 05:17 GMT
Toolset
C51
New! RE: Interfacing of GSM modem with 8051 microcontroller

HI Abbas,

Instead of trying to learn the architeture of 8051 mc. I would suggest you to try http://www.oopic.com. They have their own compiler and it is very easy to interface,

Best of Luck

Venu

Read-Only
Author
Andy Neil
Posted
14-Jul-2007 08:42 GMT
Toolset
None
New! Swings and roundabouts

"Instead of trying to learn the architeture of 8051 mc. I would suggest you to try http://www.oopic.com."

So then you'd just have to learn the architecture of the PIC, and all about this proprietary OO framework that they've built upon it!

And you'd still need exactly the same understanding of GSM modems!

Whatever you take, you need to understand it before you can use it!

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.