Last Updated on : 2024-06-04 09:17:25download
This topic describes the commands for the SMS service.
The module sends the received SMS message to the MCU and deletes this message when it confirms that the MCU receives it. This ensures that the SIM card has enough space to receive new messages.
If not specified, the default format of SMS transmission and reception is JSON.
The module sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03/0x04 |
Command | 1 | 0x71 |
Data length | 2 | 0x0002 + N |
Data | 2+N |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The MCU returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x71 |
Data length | 2 | 0x0003 |
Data | 3 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The SMS message reported to the cloud is in JSON format, in which n
represents the phone number, t
represents the date and time, and c
represents the message content. The encoding format of GB2312 is adopted.
If not specified, the default format of SMS transmission is JSON in protocol version 0x03
and hexadecimal in protocol version 0x04
.
The MCU sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03/0x04 |
Command | 1 | 0x71 |
Data length | 2 | 0x0002 + N |
Data | 2+N |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: Send a message with the content of Hello in Chinese.
55aa037100202401 7b226e223a223135383930393836373533222c2263223a22c4e3bac3227d A2
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x71 |
Data length | 2 | 0x0003 |
Data | 3 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: Send a message with the content of Hello in Chinese.
55aa00710003240101 99
Set the encoding of SMS transmission and reception. The EAU series module uses UTF-8 as its default encoding, while the CN series module uses CP936. The setting is stored in the volatile memory.
The MCU sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x71 |
Data length | 2 | 0x0003 |
Data | 3 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x71 |
Data length | 2 | 0x0003 |
Data | 3 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The MCU sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x71 |
Data length | 2 | 0x0003 |
Data | 3 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x71 |
Data length | 2 | 0x0003 |
Data | 3 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback