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

8051 data receving From GSM

Hi, I am using the Wavecom Classic module. I am able to control this module using 8051 for sending the SMS. When I try to receive the Message from the Module, I am failing. I know all the AT commands. What I need is how I can recive the data coming from module. There is no serial error or buad rate error. B'cos it is working for sending SMS. If any boday have a small part of teh code to receive the OK at aleast from the Modem..please advise me. Thank you

Parents
  • If you send commands over the serial like this

    printf("AT\n");
    


    and wait fot the response like this:

    gets (buf, sizeof(buf)-1);
    


    buf will probably be empty and you will conclude you didn't receive anything.
    But this may be because the modem echoes back the '\n' (which ends the 'gets' operation) before sending the reply you are waiting for, e.g. "OK".

Reply
  • If you send commands over the serial like this

    printf("AT\n");
    


    and wait fot the response like this:

    gets (buf, sizeof(buf)-1);
    


    buf will probably be empty and you will conclude you didn't receive anything.
    But this may be because the modem echoes back the '\n' (which ends the 'gets' operation) before sending the reply you are waiting for, e.g. "OK".

Children