The Design and Implementation of Remote Real Time Monitor System ...

5 downloads 3461 Views 291KB Size Report
E-mail: [email protected], [email protected]. Xiuhong ... server. Keywords-GPRS; remote monitoring; sensor device; socket ... A. Server Monitoring Management.
2012 International Conference on Computer Science and Electronics Engineering

The Design and Implementation of Remote Real Time Monitor System for Embedded Devices Based on GPRS Zexin Zhang1,2 , Wanming Luo1

Xiuhong Li3 ˈBaoping Yan1

1

3

Computer Network Information Center, Chinese Academy of Sciences 2 Graduate University of Chinese Academy of Sciences Beijing, China E-mail: [email protected], [email protected]

College of Global Change and Earth System Science, Beijing Normal University, China Beijing, China

accepts the link, forming a communication link between the client and server to send and receive data.

Abstract—We develop a remote monitoring system on environmental quality of Heihe river basin. The system consists of client and server, client is responsible for collecting data. We use multi-thread approach to develop server software, realizing online monitoring of sensor device, data management and log management and so on. Server uses Socket programming to communicate with client, the system has been running on the server. Keywords-GPRS; remote monitoring; sensor device; socket

I.

INTRODUCTION

Heihe river basin which starts from Qinghai province, through Gansu province and ends in Inner Mongolia province is a continental river [1] [2]. Heihe River Basin ecological construction and environmental protection is an important part of the western region development, not only to residents living environment and economic development within the catchment, but also to the northwest and north China's environmental quality, the study of the Heihe River Basin has an important significance in ecological environment. Our sensor devices are deployed in the upstream of Heihe River. The collected data include temperature, wind speed and direction, air temperature and humidity, rainfall, snow depth, soil temperature and moisture, soil salinity, soil conductivity. By modeling these parameters can reflect the river's water level, flow, water temperature, sediment and other changes to help the ecological construction and environmental protection of Heihe River Basin. Because of harsh and remote, it’s hard to monitor and maintain after sensor devices in using. Therefore, we use GRPS communication, design and implement the remote monitor system of sensor devices. II.

Figure 1: system structure.

GPRS is a mobile data service that is developed on the basis of GSM [3], transmitting data in encapsulation way. It has lots of advantages: super speed transmission, always on-line and charging according to rate of flow [4] [5]. We use GPRS to set up wireless communication system that makes low cost, easy maintenance and expansion, high reliability. Sensor devices connect to China Mobile’s GPRS network through GPRS module, then GPRS network connects to Internet and on-site environmental data collected are sent to remote server with a public IP address. In order to ensure reliability of data transmission, the system uses stream sockets way with sensor equipment for data transmission. Stream socket using TCP protocol [6], provides connection-oriented, two-way and orderly flow of data services. Connect of stream socket is shown in Fig. 2.

SYSTEM ARCHITECTURE DESIGN

System architecture is shown in Fig.1. System uses the C/S mode, server communicate with sensor via GPRS and Internet, using Socket technology for communication between applications. Wireless sensor nodes initiated socket link according the parameters, the server listens to the link and 978-0-7695-4647-6/12 $26.00 © 2012 IEEE DOI 10.1109/ICCSEE.2012.416

Figure 2: connect of stream socket.

432

III.

A. Server Monitoring Management Server monitoring management is primarily to achieve multi-thread monitoring equipment links, devices can initiate multiple links and each listen has a port. Monitoring parameters include monitor name, the maximum number of links, monitor port and so on. The parameters can be modified and deleted.

SYSTEM HARDWARE STRUCTURE DESIGN

Remote wireless data logger consists of remote wireless data board, data acquisition board, sensors, solar/wind generator charge management, GPRS module, the structure is shown in Fig. 3. The core of the wireless data board is STM32F107 32-bit RISC microprocessor, connects to a GPRS module, charge management board and data acquisition board. In order to have enough space to store data, the wireless data board extends 4GB SD card [7].

B. Data Management Data management module’s primary function is that the sensor device transfer collected data to server system. Server system requires sensor device to send data, the device must send data within some time after receiving commands. Otherwise the server system will turn off the socket link and disconnect the communication link. Server system receives the hex data stream, need to be resolved in order to convert measured data that can be identified. Sensor devices have different types so that need different resolution files for data analysis. Then depending on device type ID, device ID and sensor to create data table. Then the server system insert data collected into database. C. Remote Operation Management Remote operation management is primarily to send control commands and set tasks to sensor devices remotely. It is difficult to carry out manual maintenance work after sensor devices being deployed in the field due to remote and harsh. So we design a remote operation module in system and can send remote command to sensor device through this module. After the device receiving the commands, performs operation according to the content. Refers to the remote setting the task of device is to adjust the equipment’s content of the work according to the actual demand. For example, we modify the frequent of device to send data collected to once percent ten minutes.

Figure 3: system hardware structure.

A. Remote wireless data board The function of remote wireless data board includes collecting data, saving data collected, managing collector communication with remote server, time management and so on. B. Data acquisition board Data acquisition board is very important to the entire data acquisition part. It connects to various sensors. It provides communication interface of sensor to processor for digital sensors and appropriate functionality parts for analog sensors. C.

D. Equipment Program Management Equipment program management is primarily to achieve to display the program parameters of device currently running and remote upgrade of device program. In practice, the sensor will encounter a variety of unexpected circumstances, and with some of the changes in demand, its internal control procedures need to constantly upgrade and improve. Therefore, we have chosen to upgrade equipment internal procedures remotely. We believe that this is the fastest and most economical solution.

Solar/Wind Generator Charge Management

Solar/Wind generator charge management board will store solar/wind generator output voltage in the battery and supply of equipment to work normally.

Remote upgrade algorithm:

D. GPRS module Collector communicates with GPRS network through GPRS module, GPRS network connects to Internet. Then collector will upload data to remote server. IV.

1) Sensor node establishes socket link with the remote server; 2) Sensor node sends login messages to server, login messages include the program version ID V1(2B hexadecimal number) of sensor node and program’s initial address S1(4B hexadecimal number) of high version; 3) Monitoring system receives the login messages and parse, extracting the program’s version V1 of sensor node and program’s initial address S1 of high version. Then monitor system read the latest program’s version and name of sensor node from database. Comparing V1 and V2 , if V1

Suggest Documents