Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to request GSM sim900 for new message ccs compiler pic

Status
Not open for further replies.

easy electronics

Member level 3
Member level 3
Joined
Mar 3, 2014
Messages
63
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
Activity points
485
how to request sim900d for new sms.(i want to check if any new sms is receives )
.
I am working on pic16f877a using CCS compiler
 

Send "AT+CNMI=2,1\r" once initially before entering while(1) loop. After issuing this AT Command if GSM modem receives SMS then it will send out response

+CMTI: "SM", x

where x is the SMS index in SIM. If memory is used then you get

+CMTI: "ME", x

You have to parse this response and extract x and depending upon the value of x you have to read the particular SMS using

"AT+CMGR=x\r" Command.
 

thanks for your answer but my situation is different.
i am reading GPS also .
so while reading gps if there is any new message i will miss it.
i want to ask gsm for any new sms.
is there any command for this .
 

If you use both GPS and GSM then you should use a MCU with 2 UARTs. If you don't want to read GPS all the time but only want to read it when SMS is received then you can connect GSM and GPS both to one UART using bi-lateral switch and then select GSM to be connected all the time to UART. If SMS is received then you can read the SMS. Now you can switch UART to GPS read the data and after valid data is received then switch UART back to GSM and send the GPS data through GSM/GPRS.

But it will be better to use PIC18F46K22 which has 2 UARTs.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top