SMS development 1

Source: Internet
Author: User
SMS Communication and CMS errors
1. How to establish communication with the GSM Modem
2. Do not communicate with the GSM Modem normally or there is always garbled code on the simulation terminal.
3. How to know the error code
4. After a short message is sent, the system receives the error message + CMS error 512
5. After a short message is sent, the system receives the error message + CMS error 513.
6. After a short message is sent, the system receives the error message + CMS error 514.
7. After a short message is sent, the system receives the error message + CMS error 515.
8. How can I know that the short message you sent has been delivered to the destination number?
9. How to send short Chinese messages
10. How to Create a voice call
11. How to create a data call
12. How to display the caller's phone number when the GSM modem is called
13. When the GSM modem is called, how can we identify whether the caller initiates a voice, data, or fax call?
14. When the GSM modem is called, how to make it automatically respond or fail to respond automatically
15. How to directly read or write short messages without using the SIM card

1. How to establish communication with the GSM Modem
You can use terminal simulation software such as Windows Super Terminal or Pcomm to directly connect the computer serial port to the serial port of the GSM Modem using a cable.

2. Do not communicate with the GSM Modem normally or there is always garbled code on the simulation terminal.
Check whether your serial port is properly connected. The serial port leads of the Computer correspond to those of the GSM Modem. The same communication rate should be set for the GSM Modem and the simulation terminal.
However, when you use the GSM Modem for the first time, set it to the communication rate (9600bps), 8-Bit Data bit, no comparison bit, and 1-bit stop bit) on the simulation terminal.

3. If you want to get the error code number after an error, set the GSM Modem as follows:
At + cmee = 1

4. After a short message is sent, the system receives the error message + CMS error 512
It indicates that when sending a short message, your GSM Modem receives a new short message, and the short message is rejected. You need to resend the short message.

5. After a short message is sent, the system receives the error message + CMS error 513.
You have encountered one of the following problems:
A) Your GSM Modem has lost its wireless link connection;
B) within 28 seconds after the short message is sent, your GSM Modem does not receive the receipt confirmation from the short message center + cmgs: <sequence number> 〉;
C) Your GSM Modem does not receive the confirmation sent by the base station within 42 seconds after the control channel command for sending the short message is established 〉.

6. After a short message is sent, the system receives the error message + CMS error 514.
You have encountered one of the following problems:
A) The number of the short message center you set is incorrect;
B) The target number to be delivered by the short message is incorrect;
C) Your short message is rejected by the short message center (generally because the destination number does not exist or the destination number is disabled ).

7. After a short message is sent, the system receives the error message + CMS error 515.
This error occurs if your GSM Modem accepts new commands during initialization or during command execution. You must wait until initialization or command execution is complete.

8. How can I know that the short message you sent has been delivered to the destination number?
A) sent in text format
When you send short messages in text format, your GSM Modem must make the following settings:
At + CSMP = 49, <x> 〉
At + cnmi = <x>, 1, <x> 〉
<X> indicates the appropriate parameter you have selected based on your needs.
After sending a short message, you will receive one of the following two types of confirmation from the short message center:
+ CDS: <x>, <sequence number>, "phone number", "sending time", "receiving time", 0
Or:
+ CDS: <x>, <sequence number>, "phone number", "sending time", "receiving time", 48
The last number in the confirmation indicates the transmission status of the short message. (0 indicates that the destination number has been delivered, 48 indicates that the destination number cannot be delivered)
B) sending in PDU format
When you send short messages in PDU format, your GSM Modem must make the following settings:
At + cnmi = <x>, 1, <x> 〉
<X> indicates the appropriate parameter you have selected based on your needs.
In the short message in PDU format that you want to send, you must set the first byte after the short message center number to 31
After sending the short message, you will receive the following confirmation from the short message center:
+ CDS: <length> 00 <PDU format validation information> 〉
Note: In the confirmation of received PDU format, the sequence number and transmission status mark both exist in hexadecimal notation, you can convert it to a decimal number without putting it upside down before conversion.

9. How to send short Chinese messages
To send short Chinese messages using the existing GSM Modem, you must first convert the short Chinese messages to a 16-bit Unicode code.
A) text transmission
When you send Unicode-encoded short messages in text format, you must set your GSM Modem:
At + CSMP = <x>, 8
<X> indicates the appropriate parameter you have selected based on your needs.
Then, you can send the converted Unicode-encoded short Chinese message by sending a common text short message.
B) Sending using PDU
You only need to set the second byte after the destination number string to 08 in the short message in your PDU format.
The new Unicode-encoded short message is sent as the content sent from the PDU.

10. How to Create a voice call
Send the command ATD <phone number> to the serial port of the GSM Modem. <press enter> make sure that the phone number is a voice number rather than a fax or data number.

11. How to create a data call
Set your GSM Modem as follows:
At + IPR = 9600
At + IFC = 2, 2
At + cbst = 0, 0, 1
Send the command ATD to the serial port of the GSM Modem <phone number> <press enter> 〉
You must confirm that the phone number is a data number, not a fax or Voice number, and that your SIM card has activated the data communication service.

12. How to display the caller's phone number when the GSM modem is called
Set your GSM Modem as follows:
At + clip = 1

13. When the GSM modem is called, how can we identify whether the caller initiates a voice, data, or fax call?
Set your GSM Modem as follows:
At + CRC = 1

14. When the GSM modem is called, how to make it automatically respond or fail to respond automatically
If you want your GSM Modem to automatically respond, set your GSM Modem as follows:
Ats0 = <n> N is an integer that represents the number of times the GSM Modem rings. That is, the GSM Modem automatically responds after N rings.
If you want your GSM Modem to fail to respond automatically, set your GSM Modem as follows:
Ats0 = 0

15. How to directly read or write short messages without using the SIM card
Because the SIM card only has 10 thousand to 0.1 million read/write times and 10-15 short message storage space, it also takes some time to complete short message read/write on the SIM card. These factors affect many applications. These applications need to exchange a large amount of data through the GSM network. To ensure the smooth process, SIM cards need to complete a large number of read, write, and delete operations, the life cycle of the SIM card will soon reach. In addition, it takes more time for the SIM card to complete these tasks than the outside world. To solve these problems, it is necessary to make some software settings on the terminal so that short messages do not read and write through the SIM card.
The following describes how to use this method to exchange data between the falcom A2 series and the data terminal mt4002 without a SIM card. This method can also be used with two mt4002.
A) The RTS signal from the terminal on the serial port can be used to indicate whether the data switching time slot is busy. The serial port is ready to receive data.
B) if both parties can receive and send short messages, the same command and constant must be set for both parties.
At the receiving end, set the command at + cnmi to 2, 2, 0, 0
On the sender side, set the command at + CSMP = 17,167, 0,240 (when sending in PDU format, 240 is changed to the string DCS (F0 ))
C) when the program finds the format of the Short Message prefix + CMT followed by the transmitted data, it immediately captures the short message and delivers it to the original address.
D) If CSMP = 17,167, 0,240 is not set on the sending end, the captured short message should have a prefix + cmti. At this time, use the command at + cmgr = n to read and distribute it to the original address, then run the at + cmgd = n command to delete the short message to ensure that the SIM card has enough space.

 

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.