can any one help me with the code for the gsm modem interfacing with 8051
Before going to the program please understand the GSM module, hope you know that it works with AT commands Try these commands on GSM module by connecting to PC's hyperterminal
Examples>>
TO CHQ GAIN - AT+CSQ=? TO CHK NETWORK - AT+COPS=?
Examples for send and receive SMS
For sending SMS in text Mode:
AT+CMGF=1 press enter AT+CMGS=”mobile number” press enter Once The AT commands is given’ >’ prompt will be displayed on the screen. Type the message to sent via SMS. After this, press ctrl+Z to send the SMS. If the SMS sending is successful, “ok” will be displayed along with the message number.
For reading SMS in the text mode: AT+CMGF=1 Press enter AT+CMGR= no. Number (no.) is the message index number stored in the sim card. For new SMS, URC will be received on the screen as +CMTI: SM ‘no’. Use this number in the AT+CMGR number to read the message. Voice call Initiating outgoing call: ATD+ mobile number; press enter For disconnecting the active call: ATH press enter For receiving incoming call: ATA press enter
The OK just indicates that the AT Command was accepted by the modem - it does not indicate succesful transmission of the message!
The message is not confirmed as sent until you subsequently receive the Message Reference (MR) number.
But the OP's project is receiving the message - not sending it.
You do realise, don't you, that there are dozens - possibly even hundreds - of projects already published on the internet which do exactly this?
Did you spend any time researching prior art?
www.lmgtfy.com
i tried it but am not able to get any code
Oh dear - so you might actually have to get down and write some of your own, then...?!
View all questions in Keil forum