基于GSM 短消息的远程监测系统
摘 要
随着GSM(Global System for Mobile communication)移动通信网络的迅速普及和竞争的日益激烈,新技术和新业务的开发和应用已经提到一个十分重要的位置。短消息业务(SMS)作为GSM 网络的一种基本业务,已得到越来越多的系统运营商和系统开发商的重视,基于这种业务的各种应用也蓬勃发展起来。本文提出了一种基于GSM 短消息的远程监测系统,在出系统的总体设计的基础上,设计了系统的硬件和软件,并对其应用领域作了一些探讨和研究。系统以GSM 网络作为远程信号的传输平台。对GSM 网络体系结构作了详细的讲解,并且着重讲述了对于本论文相当重要的短消息业务的通信原理。数据的传输方式主要是短消息方式,系统中采用PDU 模式,对短消息的PDU 编码和解码进行详细的讲述。短消息的接收和发送是通过AT 指令来实现的,讲述了常见的AT 指令及其使用方法。系统的硬件设计中,对主要硬件TC35 和AT89C51 单片机及其外围电路进行了详细的讲述。系统分为两个部分进行设计——监测中心站和远程监测分站:监测中心站硬件包括一台PC 机,GSM 通信模块TC35,两者通过RS232 连接;远程监测分站硬件包括GSM 通信模块TC35,AT89C51 单片机,显示单元,各种传感器和数据采集与处理单元。系统的软件设计包括监测中心站软件设计和远程监测分站软件设计。监测中心站软件设计采用Visual Basic 6.0,给出通用串行通信控件MSComm 的使用方法,并完成了界面设计、数据的接收与发送以及保存等功能。远程监测分站软件设计中运用IAR 公司为AT89C51 系列单片机开发的C430 集成开发环境和C 语言调试器作为程序开发工具,其软件包括单片机初始化、主程序、信号采集中断程序、通过串口的短消息接收和发送程序。论文的最后部分以GSM 短消息的远程监测系统为基础,结合温度检测技术设计出一套基于GSM 的远程温度监测系统.
关键词 GSM;短消息;远程监测;PDU 模式;AT 指令;AT89C51 单片机
Abstract
Along with rapid popularization and furious competition of GSM network, research and application of new technology and new operation have been mentioned to a quite important position. SMS as a basic service of GSM network has been attented by more and more system operator and developer, and kinds of applications based on this service have been rapid developed. This paper present a remote monitoring system based on GSM-SMS, this paper first presents the system design as a whole, then presents the hardware and software design of system, at last presents some discussions and investigation in applying field. In this system GSM network is a medium for transmitting the remote signal, it presents detailed explanation of GSM network?s system structure and emphasizes the communication principle that is important for the task. The mode of transmitting data is most SMS. PDU mode is used during transmitting SMS. It presents encording and decoding of SMS PDU mode. Transmitting and receiving SMS is realized by using AT command. It presents the familiar AT command and using method. It presents TC35 and microchip AT89C51 and peripheral circuit during design of system hardware. Hardware of system includes two parts: the monitoring center and the remote monitoring station. It consists of a computer and a TC35 communication module of GSM in the monitoring center. Computer and TC35 are joined by RS232. It includes a TC35 communication module of GSM, a AT89C51 MCU, a display part and a gathering data part. It includes the monitoring center software and the remote monitoring station software in design of system software. The monitoring center software is designed with Visual Basic 6.0. It presents method of serial communication control MSComm, finishes the interface design and the function of receiving and transmitting and saving data. The remote monitoring station software is designed with integration developing environment that IAR designed for AT89C51 single chip and C-language debugger. It includes single chip initialization and main program and interrupt of gathering signal and receiving and transmitting program through the serial port. In the end of the paper, it presents a remote temperature monitoring system based on GSM, using the designed system of remote monitoring system based on GSM-SMS and technique of measuring temperature.
Keywords GSM; SMS; remote monitoring; PDU mode; AT command;
第1 章 绪 论.................................................... 5 1.1 论文背景 .................................................... 5 1.2 远程监测系统发展现状 ........................................ 5 1.3 论文的主要工作 .............................................. 7 第2 章 GSM 网络基础知识及SMS 通信原理 .......................... 7 2.1 GSM 网的体系结构 ............................................ 7 2.1.1 移动台(MS) ................................................ 8 2.1.2 基站子系统(BSS) ........................................... 9 2.1.3 网络和交换子系统(NSS) .................................... 10 2.1.4 运行子系统(OSS) .......................................... 11 2.2 GSM 短消息数据通信原理 ..................................... 12 2.3 本章小结 ................................................... 12 第3 章 系统硬件设计............................................ 12 3.1 系统总体结构设计 ........................................... 12 3.2 监测中心站硬件设计 ......................................... 13 3.2.1 监测中心站服务器 ......................................... 13 3.2.2 GSM 无线通信模块TC35..................................... 14 3.2.3 标准串行通信接口RS232.................................... 14 3.3 远程监测分站硬件设计 ....................................... 14 3.3.1 AT89C51 结构概述 ......................................... 15 3.3.2 液晶显示 ................................................. 16 3.3.3 键盘功能 ................................................. 17 3.3.4 串行通信 ................................................. 19 3.3.5 A/D 转换功能 ............................................. 21 3.4 本章小结 ................................................... 22 第4 章 系统软件设计............................................ 22 4.1 系统软件设计基础 ........................................... 22