SMS platform running environment implemented by the GSM module Windows and RedhatLiunx5

Source: Internet
Author: User
The serial port is used to communicate with the GSM module for data transmission (because the current notebook does not have a serial port, you can also use USB to serial port ). The GSM module uses the AT command. The At Command sends Text messages in three ways: Block, Text, and PDU. Block: Text is rarely used. It is generally used to send English (Chinese can also be sent, but some work needs to be done) PDU: used to send Chinese, which is generally used in China. (Most mobile phones Support) PDU used by the Project

The serial port is used to communicate with the GSM module for data transmission (because the current notebook does not have a serial port, you can also use USB to serial port ).

The GSM module uses the AT command.

The At Command sends Text messages in three ways: Block, Text, and PDU.

Block: rarely used

Text: generally used for sending English letters (Chinese characters can also be sent, but some work is required)

PDU: used to send Chinese characters. This mode is generally used in China. (Supported by most mobile phones)

The project uses the PDU mode to send text messages.

PDU format:

Step 1: AT + CMGF = 0/r

Step 2: AT + CMGS = number of bytes of the sent content

Step 3: Send content

For example, if you want to send a text message "hello" to a person whose mobile phone number is 15853288251

0011000D91685158238852F1000800044F60597D

Because it is in China, 0011000D91 is fixed.

685158238852F1 is the mobile phone number 15853288251.

00 08 00 is the set of the sending flag based on your own situation

04 indicates the number of bytes to be sent.

The content sent by 4F60597D is 'hao'

Note that after completing step 2, you need to wait for a while before proceeding to step 3. Otherwise, the message may fail. Waiting for a while is a preparation time for the serial port.

Pay attention to the operating system platform.

There is a difference between Windows and Liunx. When encoding the sent content, note that the memory storage methods of these two systems are different.

Windows: high to high, low to low

Liunx is the opposite. Otherwise, garbled content will be sent.

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.