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

Problem in writing code which performs GPRS support action.

I am trying to send data through GPRS via SIM300 modem. The logic of my program should be.
1) it should send the data till it receives "dieman" from the server.
2) the modem is such that after every command there is a reply.
3) all the communication takes place serially.

Firstly the GPRS commands as tried in hyperterminal

AT
OK
AT+CGATT=1
OK
AT+CGDCONT=1,"IP","airtelgprs.com"
OK
AT+CSTT="airtelgprs.com","",""
OK
AT+CIICR
OK
AT+CIFSR
212.22.22.22                  //EG OF AN IP ADDRESS
AT+CIPSTART="TCP",""80"">http://www.google.com","80"
OK

CONNECT OK
AT+CIPSEND
>THIS IS THE DATA I WANNA SEND             // YOU CAN SEND THE DATA VIA GPRS NOW
 [CTRL+Z]
SEND OK

this is what i want to implement in C in 8052. here OK are the response from the modem.

now i implemented the C version but my code is very inefficient. I could have ignored the response from the modem by simply inserting delays but i want my code such that if the reply from the modem is not "OK" it should transmit the command again.

Parents Reply Children
  • Why are you hijacking this thread with your unrelated question?

    "i am using SIM300 modules"

    Then you obviously have to read the SIM300 Manuals to find out how to use the specific features of those modules!

    The SIM300 is a SIMCOM product - this has absolutely nothing whatsoever to do with Keil or the 8051.

    For questions & support on SIMCOM products, you obviously need to contact SIMCOM (and/or your local distributor)

  • Also known as Finite State Machines; FSM

    And as Finite State Automata; FSA

    (Note that Automata is the plural of Automaton so one FSA would be a Finite State Automaton)