Send and receive SMS via RS232 (iii)

Source: Internet
Author: User

Receive SMS

There are two ways to receive incoming SMS: polling terminal; using events

polling terminals can be used on a regular basis The at+cmgl=0 instruction reads the unread fetch instruction. The method is simple, but many times do not work hard, inefficient, generally not recommended. The following is the main explanation of event law:

Instructions:

At+cnmi=<mode>,<mt>,<bm>,<ds>,<brf>

Parameters:

Mode:

0--cache in terminal

1--Send directly to TE

Mt:

0--Receive new SMS does not return event

1--if the received SMS is stored in ME, the returned

+cmti:<mem>,<index>

2--In addition to Class2 SMS, the new SMS is sent directly to the terminal, which returns:

+cmt:<length><cr><lf><pdu>

3--CLASS3 SMS is returned using the mt=2 method, and other types are returned using the Mt=1 method.

BM:

0--cell broadcast does not notify

2--new cell broadcast notification, return

+cbm:<length><cr><lf><pdu>

3-- cell broadcast notification in CLASS3 format, using bm=2 format

DS:

0--Status report not notified

1--New status report notification, return:

+cds:<length><cr><lf><pdu>

2--returns if the new status report is stored to ME:

+cdsi:<mem>,<index>

BRF:

1--Always 1

Cases:

generally we use at+cnmi=1,1,0,2,1

When a new SMS message is received, the terminal returns:

+cmti:me,5

New status Report:

+cdsi:me,6

The program can determine the return value and use the At+cmgr instruction returns new to SMS.

Transfer from bbs.sendsms.cn


Send and receive SMS via RS232 (iii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.