Joke Collection Website - Public benefit messages - Does SIM900A need to connect to the server before sending SMS?

Does SIM900A need to connect to the server before sending SMS?

First, AT+CNMI is used to set the new message indication. Send: at+cnmi = 2, 1, and set a new message prompt. When a new message is received and the SIM card is not full, the SIM900A module will return data to the serial port, such as+CMTI: "SM", 2, which means that the new message is received and stored in the location 2 of the SIM card.

Second, AT+CMGF is used to set the short message mode. SIM900A supports two modes, such as PDU mode and text mode. Send AT+CMGF= 1, which can be set to text mode.

Thirdly, AT+CSCS is used to set the TE character set. The default is the GSM 7-bit default character set. When sending plain English short messages, send AT+CSCS = "GSM "and set it as the default character set. When sending short messages in Chinese and English, you need to send: at+CSCS = "ucs2 "and set it to 16-bit universal 8-byte multi-coding character set.

Fourthly, AT+CSMP is used to set the text mode parameters of short messages. When sending Chinese SMS in UCS2 mode, you need to send AT+CSMP= 17, 167, 2, 25, and set the text mode parameters. AT+CMGR, used to read short messages. For example, if AT+CMGR= 1 is sent, you can read the short message stored in the location of SIM card 1.

Fifth, AT+CMGS is used to send short messages. Under the "GSM" character set, English characters of 180 bytes can be sent at most, and under the "UCS2" character set, 70 Chinese characters (including characters/numbers) can be sent at most. We will introduce this instruction in detail later.

Sixth: AT+CPMS, which is used to query/set the preferred message memory. By sending +CPMS? , you can query the maximum number of short messages supported by the current SIM card and how many short messages are currently stored. If returned: +CPMS: