Send and receive SMS via RS232 (ii)

Source: Internet
Author: User

Query SMS:

1 . Query all text messages with the same status

directive: At+cmgl=n

where n represents the number of 0-4.

0--unread text messages. Executes the command and then changes itself to read.

1--read SMS.

2--Draft.

3--SMS has been sent.

4--All

Return (example):

+cmgl:76,3,,20

0891683108200805f011620d91683194041338f50000ff0530972d8603

--Serial number

3--Status: Send

--PDU string length

2, query the specific serial number of SMS

directive: At+cmgr=n8

where n represents the ordinal

Return (example):

+cmgr:3,,20

0891683108200805f011620d91683195041338f50000ff0530972d8603

3--Status: Send

--PDU string length

Note: The PDU string length represents the length of the remaining code in the PDU that removes the SMS center part . For example , the PDU in the above PDUhasa length portion of 11620d91683195041338f50000ff0530972d8603, which is 20 characters. a byte.

Storage Pdu

Instructions:

AT+CMGW=[PDU length ] 8

>[PDU string ]

For example:

at+cmgw=208

>0891683108200805f011620d91683195041338f50000ff0530972d8603

Note that the input After PDU, press "Ctrl + Z" to terminate. The program uses 0x1A,0x1D as termination.

return:+cmgw:85

--Serial number

Send PDU String

1, send the input PDU string

Instructions:

AT+CMGS=[PDU length ] 8

>[PDU Code ]

2 . Send the PDU string with the specified serial number

Instructions:

at+cmss=[ serial number ] 8

Transfer from bbs.sendsms.cn


Send and receive SMS via RS232 (ii)

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.