Directly read SMS when it comes through GSM modem to PC via serial communication

I am using a SIM9000A GSM modem and connect it to my computer.

The problem is that whenever an SMS is received by my SIM card, I get the data below on my PC:

+ CMTI: "SM", 8

I want all incoming SMS messages to be read directly on PC and no further command need to be sent. Something like when an SMS comes in - the GSM modem should actually send SMS content to the serial port.

Below is the result obtained for CPMS enq.

AT + CPMS =?

+ CPMS: ("SM"), ("SM"), ("SM")

+3


source to share


1 answer


You can use the AT + CNMI command to tell the GSM modem to direct incoming messages to the serial port directly. Full command with parameters: AT + CNMI = 2,2,0,0,0



AT + CNMI = 2,1,0,0,0 sets the modem back to display mode only and AT + CNMI = 2,0,0,0,0 does not send any indication when a new message is received.

+2


source







All Articles