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
i am trying to control the operation through the mobile wirelessly through sms and nt through the hyper terminal
you will control some operations using SMS right? Then how you will read received SMS(containing control operation) to GSM from the mobile? So try out some commands to read SMS as I have sent it in previous post, then start reading for that same SMS and control devices
ok thanks i will try it but do i have to send the at command as an sms
do i have to send the at command as an sms NO send simple control message from mobile to GSM and read the same using GSM module(using "AT+CMGR=no." command) then do the operation depends on message content
got it i will try accordingly.
View all questions in Keil forum