外文翻译--GSM模块收发中文短消息的关键技术(2)

2018-11-23 21:05

(DCE).Device by sending AT commands to control the mobile station, and with the GSM network to interact.Through the AT command to make calls, text messaging, phone book, data operations, such as the replenishment of the operational aspects of control. Singlechip Send this article by AT commands to control the GSM module to receive and send mobile phone short message.

Commonly used SMS related AT commands and explanations such as listed in Table 1.

1.3 Message resumption model

At present, the receive and send SMS messages commonly used model has two main: Text (text) mode and PDU (Protocol Data Unit, Protocol Data Unit) mode. (1) Text Mode

Text mode is text-only mode, you can use different character sets. The mode of information transmission and reception of the coding is relatively simple, but the domestic mobile phone does not support Text mode to send and receive Chinese characters characters mobile phone short message. In this paper, encoding conversion realize the GSM module in the Text mode to send and receive Chinese text messages. (2) PDU mode

PDU Mode Supported by all mobile phone, you can send the message in both English and Chinese. PDU mode using three kinds of encoding, respectively, are 7, 8 and UCS2 encoding, respectively, used for sending ordinary ASC Ⅱ characters, data messages and Unicode characters. GSM07.05 agreement in accordance with the provisions of mobile phone text messages in Chinese characters are encoded using Unicode code.

Such as set out in Table 2, PDU mode draw some horizontal line followed by short message center number, send text messages to mobile numbers and send the message date and time. Its code will express the actual data for the 22 reversed, for

example, the actual short message center number should be \Message content \Unicode characters are \Other specific description see references.

After studying the comparison showed that the message to extract information including cell phone numbers, time and message content. In Text mode, time and date are the ASCII code, can be directly read, just the content part of the Unicode code characters into GB codes; PDU mode in addition to Chinese character encoding conversion, the need to number, the time portion code 22 to reverse the conversion to get the correct information. Therefore, in system design will be set to Text mode GSM module, but also simplify the program design.

2 Unicode code conversion code to the GB2312

Because of Unicode encoding and no-one correspondence between the GB2312 encoding conversion of the linear relationship between the MCU control code conversion can only look-up table method, therefore, necessary Unicode code and set up between the GB code conversion control. Chinese Simplified Chinese characters, 7 464, representing a 2-byte characters, the table required 29 856 (7 464 × 4) of storage space. This design choice P89V51RD-type single-chip, the chip provided by 1 KB RAM memory to meet the requirements of a number of message.

Single-chip with the module through the serial port connected, sending the first to read new SMS commands: \message, the first to determine whether its content is for ASCII code. If the ASCII code, you do not need to read the conversion directly; Otherwise, search through the look-up table method of its corresponding Chinese character GB code, realize the conversion between different coding. Conversion process as shown in Figure 2. Extraction of information content of some of the procedures are as follows:

Using binary search method, the worst number of search lg2 (n +1), the length of table n to 7 464, so the worst is about 13 times the number of search. In other words, a Chinese coding conversion after up to 13 times compared to complete search,

single-chip real-time control can be completed.

.

3 Singlechip realize the many serial

51 Series MCU general there is only one serial channel, through the serial port connected with the GSM module is not longer connected to other serial equipment; and some higher-cost serial expansion of the chip, connecting more trouble. This method is the use of numerical control analog switches CD4052 do many serial expander, low-cost and easy wiring. Its pin shown in figure 3.

CD4052 has four independent channel data selector, has A, B two inputs and a ban on the importation of INH, through A, B of the four kinds of binary combination of state of four pairs of channels to choose one of the right.

This design, A, B, respectively, occupied by P2.0 and P2.1 I, P2 = 0x01 while strobe module serial port, P2 = 0x02 is connected to other serial devices. When INH for 1, all channels are closed. X, Y, respectively, to connect MCU RXD and TXD, a serial port may be extended to 4, the specific wiring method shown in Figure 4.

CD4052 are in fact two sub-four-one data distributor, the expansion of full-duplex asynchronous serial ports are working mode of high speed, easy to realize a more than a single-chip serial port expansion capacity. Siemens company to TC35i GSM module for the programming object, through the P89 V51 single-chip control, build the actual systems, the realization of the programming process and system, such as serial port expansion, effectively receive and complete the Chinese short message code conversion, verify the above ideas to build the feasibility and correctness.

GSM single-chip control module in the Text mode mobile phone to receive text messages in Chinese, the encoding format conversion relatively easy, and have a higher conversion rate.For the terminal to receive information in both English and Chinese projects, this paper studied the use of single-chip control module resumption Message GSM technology, the realization of simple, lower cost, can be directly used nested.In addition, the expanded single-chip can be simultaneously connected with

other serial devices, such as with the serial printer connected, you can directly print out the contents of mobile phone information. In the vehicle monitoring system, storage systems and instrument data to monitor the areas of Far EasTone, but also a good combination of this technology.


外文翻译--GSM模块收发中文短消息的关键技术(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:电力变压器安装主要施工方案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: