This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GSM modem interfacing with 89c51

I am able to send msg through GSM modem.
But i am not able to read msg.
Somebody plz help me.

Parents
  • Well, I guess that's not actually true:

    You could (also) have processor-specific faults in each implementation.

    It should be obvious that the first thing you need to do is to get reliable serial comms working - sending and receiving characters.

    Once you have reliable serial comms working, you can then move on to use that for sending & receiving AT Commands & Responses - which are, after all, just sequences of characters.

    The low-level detail of getting serial comms working will be chip-specific, but you could provide a common interface so that the higher-level code can be the same for both processors...

Reply
  • Well, I guess that's not actually true:

    You could (also) have processor-specific faults in each implementation.

    It should be obvious that the first thing you need to do is to get reliable serial comms working - sending and receiving characters.

    Once you have reliable serial comms working, you can then move on to use that for sending & receiving AT Commands & Responses - which are, after all, just sequences of characters.

    The low-level detail of getting serial comms working will be chip-specific, but you could provide a common interface so that the higher-level code can be the same for both processors...

Children
  • "but you could provide a common interface"

    Yes, it's quite common to implement a low-level layer with send/receive support and making use of two ring-buffers of configurable size. Optionally with support for reporting a timeout if no data is received within a given time period or (in case the link uses handshake) if no data has been possible to send for a while.

    Even better is to have the receive driver support a configurable record-termination character allowing you to call a get-record function that returns a full record (text line), or timeouted partial data or a "check again later - still receiving data", or finally a "buffer full without termination character".