Sie sind auf Seite 1von 6

2010 IEEE/IFIP International Conference on Embedded and Ubiquitous Computing

IOT Gateway: Bridging Wireless Sensor Networks into Internet of Things

Qian Zhu , Ruicong Wang , Qi Chen , Yan Liu and Weijun Qin
School
of Software and Microelectronics, Peking University, Beijing 102600, China
Wireless Ad-hoc Sensor Networks Lab, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China
Email: zhuqian@is.iscas.ac.cn, wangruicong@is.iscas.ac.cn, chenqi@is.iscas.ac.cn, ly@ss.pku.edu.cn, qinweijun@is.iscas.ac.cn

AbstractWith the development of sensor, wireless mobile can exchange information via the networks actively[3]. In
communication, embedded system and cloud computing, the 2009, IBM presented the Smart-Planet concept which
technologies of Internet of Things have been widely used in aims to embed sensors in several physical objects such as
logistics, SmartMeter, public security, intelligent building and
so on. Because of its huge market prospects, Internet of Things power grid, railway, buildings, and make them smart by
has been paid close attention by several governments all over intelligent processing technologies[4]. From the perspective
the world, which is regarded as the third wave of information of information technology, Internet of Things is a huge
technology after Internet and mobile communication network. global information system composed of hundreds of millions
Bridging between wireless sensor networks with traditional of objects that can be identified, sensed and processed based
communication networks or Internet, IOT Gateway plays
an important role in IOT applications, which facilitates the on standardized and interoperable communication protocols.
seamless integration of wireless sensor networks and mobile With the support of broadband mobile communication, next
communication networks or Internet, and the management generation networking and cloud computing technologies,
and control with wireless sensor networks. In this paper, we the IOT system can intelligently process the objects state,
proposed an IOT Gateway system based on Zigbee and GPRS provide management and control for decision-making, and
protocols according to the typical IOT application scenarios
and requirements from telecom operators, presented the data even make them cooperate with each other autonomously
transmission between wireless sensor networks and mobile without humans intervention.
communication networks, protocol conversion of different sen- Nowadays, the traditional mobile communication network
sor network protocols, and control functionalities for sensor and Internet are mainly used in the transmission of informa-
networks, and finally gave an implementation of prototyping tion among people, while the WSN can realize the short-
system and system validation.
distance communication among the objects by constructing
Keywords-gateway; IOT; WSN; Zigbee; GPRS wireless networks in ad-hoc manners. However, its difficult
to connect the WSN and mobile communication networks
I. I NTRODUCTION or the Internet with each other because it lacks of uniform
The Internet of Things is regarded as the third wave of standardization in communication protocols and sensing
information technology after Internet and mobile commu- technologies and the data from WSN cannot be transmitted
nication network, which is characterized by more thorough in long distance with the limitation of WSNs transmission
sense and measure, more comprehensive interoperability and protocols. Therefore, with the development of the Internet of
intelligence. The technologies of the Internet of Things can Things, a new type of network equipment called the Internet
effectively facilitate the integration of material production of Things Gateway is invented, whose goal is to settle
and service management, the integration of the physical with the heterogeneity between various sensor networks and
world and the digital world. With development of IOT mobile communication networks or Internet, strengthen the
technologies, the most important IOT application areas cover management of the WSN and terminal nodes, and bridge
infrastructure construction, public security, environment pro- traditional communication networks with sensor networks to
tection, modern agriculture, intelligent industry, urban man- make network communication easier and manage the devices
agement, business service and other fields[1]. of sensor networks. Therefore, the key issues of implement-
In 1999, MIT Auto-ID Labs first proposed the concept ing IOT Gateway system is to address the heterogeneity of
of the Internet of Things, which investigates to realize ob- different sensor networks and diversity of protocols in the
ject localization and state recognition using wireless sensor WSN and traditional telecommunication networks. Besides,
networks and radio frequency identification technologies[2]. its necessary to build a suite of uniform identified instruc-
In 2005, International Telecommunication Union (ITU) re- tions and standards for all the IOT Gateways in order to
leased ITU Internet Report 2005: Internet of Things, realize the functionality of IOT management and control.
formally proposed the concept of the Internet of Things, The rest of the paper is organized as follows: Session
which noted that ubiquitous Internet of Things commu- II starts with related works of IOT Gateway system and
nication era dawned, in which all objects in the world standards. Session III introduces a use scenario of IOT appli-

978-0-7695-4322-2/10 $26.00 2010 IEEE 347


DOI 10.1109/EUC.2010.58
cation in smart home, presents the typical WSN-based IOT
application architecture and characteristics of IOT Gateway.
The system requirements and software architecture of IOT
Gateway system are given in Session IV. Session V gives the
initial implementation issues and finally some concluding
remarks are made in Session VI.
II. RELATED WORKS
There are already some academic and industrial works on
Figure 1. Use scenario in smart home
standardization and design of IOT Gateway system. Domes-
tic and international telecom operators have launched related
business in applications combining WSN and telecommu- Gateway with smart home, which is a typical IOT applica-
nications networks, conducted active exploration according tion. Smart home is a new type house which is embedded
to the demands of industrial users. Among the foreign with sensors, information home appliances, network commu-
standardization organizations, ETSI M2M TC[5] and 3GPP nications and automation equipment, etc. in order to provide
all established related standards. ETSI M2M TCs main a comfortable, safe, green, convenient living environment.
goal is to do some research on M2M(Machine-To-Machine) With the development of sensors, micro-motor system,
standardization, who have already further their works on the wireless communication, the intercommunication among the
existing achievements of 3GPP and ETSI. ETSI M2M TC embedded equipments in smart home becomes easier. On
now focuses on M2Ms definition and application examples, one side, the in-home IOT Gateway plays a very important
with this basis, proceeds business requirements and stan- role in interconnecting multiple smart devices together to
dardization, but didnt address any specific technology yet. form in-home network and share resources and information
3GPP launched research team on M2M in 2005. Its main among various home appliances. On the other side, in-home
work is to discuss the demands, feasibility and framework. IOT Gateway also plays another role to connect the external
Meanwhile, domestic enterprises also carried out equipment networks to the in-home network, and provides the access
specification work in accordance with the standardization interface to the external networks as the Fig. 1 shown. In this
work abroad. China Telecom also announced the MDMP scenario, several common home appliances, such as TV set,
protocol for WSN terminal management, and carried out washer, lights, camera, which are embedded with sensor and
demonstrating applications in agriculture and smart home. wireless communication modules, can construct several ad-
As for design and implementation, Shanghai Research hoc in-home wireless networks. The in-home IOT Gateway
Institute of China Telecom proposed a home system of IOT, integrates several common ad-hoc network protocols and
which indicated that gateway was the core unit of informa- supports the intercommunication among the equipments with
tion gathering and control, Shanghai Research Institute of different network protocols. The users can control the in-
China Telecom summarized that the key features of gateway home smart equipments through the IOT Gateway. Besides,
system were protocols conversion, state control, information the in-home IOT Gateway also integrates 2G/3G mobile
gathering, terminal addressing and authentication[6]. Web communication network modules and Internet to facilitate
of Things architecture was proposed in [7], through the the connectivity with external networks. In this way, the
intelligent gateway, the real objects can be transformed users can access and control any equipment anywhere, any
into RESTful resources to be integrated into the existing time through the in-home IOT Gateway.
systems, in order to be directly accessed by external HTTP
hosts. Intelligent gateway interacts with sensor nodes via B. WSN-based IOT Application Architecture
Bluetooth, which allocates URL for sensor nodes, forwards The typical IOT application architecture can be divided
the collected perception data to Web server through HTTP into three layers shown in Fig. 2 as follows:
packets including JSON data segment, thus, linking the sen- 1) Perception Layer: In the perception layer, the system
sor network and traditional telecommunications network[7]. aims to acquire, collect and process the data from the phys-
In a word, in the existing systems related to IOT, gateway ical world, which consists of two parts: the sensor device
plays a leading role, basically, implementing the functions of and wireless sensor networks. The former one includes
data transmission and forwarding. However, the management RFID label, sensor nodes, and camera and so on. The latter
and control issues are less considered. one is a self-organizing wireless network which consists of
many sensor nodes distributed in a large area. These devices
III. IOT GATEWAY
coordinately monitor the state of physical environment. In
A. Use Scenario details, the perception layer collects the data through data
The application of Internet of Things covers logistics, acquisition device at first, and then the data is transferred to
SmartMeter, intelligent building and so on, we illustrate IOT the next layer using RFID, Bluetooth or other technologies.

348
Sensor ode Gateway Management Platform

Basic Service Ethernet Log Command WSN Client


Sensor data Interaction Management Delegate Upload data Manage Communication
WSN Serial Configuration Data Topology Gateway
Management Transceiver management Upload Manage Configre
Data Transger command GPRS Command Protocol AT command Data Data
Protocols Interaction Mapping Conversion Analysis Storage
Data Process Main Control TCP Server

Figure 3. The software architecture of IOT Gateway system

3) Protocol interworking: Traditional network and sensor


network need to exchange information in the IOT scenarios.
The IOT Gateway should support protocol interworking
Figure 2. Typical IOT application architecture
between traditional network and WSN seamlessly.
IV. D ESIGN OF IOT G ATEWAY S YSTEM
Above all, this layer is the basis of IOT system with critical
technologies including signal detection, short-range radio A. System Requirements
technology and so on. Based on the in-home use scenario, IOT Gateway should
2) Transmission Layer: In the transmission layer, the support internal data collaboration and aggregation in WSN,
system aims to transfer data in a large area or long distance, and data transmission among Internet, 2G/3G networks,
which is constructed based on the traditional mobile broad- DSL networks, and other network interfaces. The system
band communication network, Wi-Fi and other communica- requirements of IOT Gateway system is listed as follows:
tion technologies to realize the integration of the perception 1) Data Forwarding: The basic function of IOT Gateway
and communication network. Thus the data collected from system is to receive data from sensor network terminals
perception layer can be transferred successfully to remote or Internet terminals, and then transfer data to the other
destination. Long-range wired and wireless communication networks transparently and correctly .
technologies, network techniques are important in this layer. 2) Protocol Conversion: IEEE 802.15.4/Zigbee network
3) Application Layer: Data processing and services pro- communication protocols are proposed in WSN, while the
viding are two major purposes of the application layer. The Internet network is based on TCP/IP protocol. It means
data from transmission layer is handled by corresponding that IOT Gateway system should use short-distance wireless
management systems and then various services will be communication protocol (e.g. Zigbee) to acquire the packet
provided to all kinds of users. from the sensor nodes, and use the 2G/3G, DSL and other
network interfaces to send the packets to telecommunica-
C. Characteristics of IOT Gateway
tion networks or Internet. Therefore, IOT Gateway should
As the bridge to connect sensor networks with traditional analyze and re-package the sensor data based on WSN
communication networks, IOT Gateway can provide the protocols after receiving it, and then capsulate and send the
functionalities of protocol conversion and device manage- re-packaged data based on telecommunication protocols.
ment. Referred to the general gateway, IOT Gateway has 3) Management and Control: Besides receiving or up-
the following characteristics: loading data, IOT Gateway should also support managing
1) A wide range of access capability: Currently short- and controlling the sensor nodes. For example, when the
range communication technology standards are diverse in- gateway receives the commands from the remote server, it
cluding Zigbee, Z-Wave, Rubee, WirelessHART, etc. How- should process the commands and then dispatch them to
ever, it lacks of protocol compatibility. the sensor nodes so that the remote server can manage and
2) Manageability: The IOT application takes terminal control the sensor network through IOT Gateway.
sensor nodes as antennae, programs running in large server
as the brain, to perceive and control the physical world. B. Software Architecture
Therefore, its necessary to manage millions of terminal IOT Gateway system is composed of three subsystems:
sensor nodes. In the meanwhile, the management of IOT sensor node, gateway and application platform as Fig.3
Gateway not only means sensor node management in the shown.
subnet, but also means the gateway device management. Sensor node is in the perception layer of the system, its
The former one aims to acquire the nodes identification, main function is not only to collect sensor data and trans-
status and properties, and realize remote startup, shutdown, fer information to gateway, but also to receive commands
control and analysis. The latter one aims to realize the addressed from the gateway. To achieve these goals, sensor
gateway devices control, diagnosis, configuration, upgrade node is deployed with Data Processing module to parse the
and maintenance. commands and send the data, Data Transfer protocols and

349
Table I
T HE PACKET FORMAT OF DATA ON THE NODES

Field Description
X1X2 Destination Address
0000 Source Address
X3 The Length of Payload
00 Group ID
X4 AM Type
Figure 4. The hardware structure of sensor node Payload Effective data
F1F2 CRC Code

Basic Service modules to dispatch data packets, and Time


Table II
Synchronization module. PAYLOAD FIELD DEFINITION OF L IGHT /T EMPERATURE /H UMIDITY DATA
IOT Gateway is in the middle layer between sensor
node and application platform, it not only receives sensed Field 1 2 3 4-5 6-7 8-9
data from sensor node and commands from application Name SeqNum NodeID Value Seconds Node2 Ticks
platform, but also transmits data to application platform.
GPRS Interaction module and Ethernet Interaction module Table III
are deployed in gateway to exchange data with application PAYLOAD FIELD DEFINITION OF ROUTE REPORT

platform. Serial Transceiver module is deployed to exchange


Field 1-2 3-4 5-6
data with sink node. Command Mapping module parses the
Name NodeID ParentID ETX
commands from application platform, implementing sensor
network management or gateway management. Protocol
Conversion module packages the sensed data with defined Table IV
C OMMAND OF OPEN OR CLOSE ONE MORE NODES
format. Log Management and Configuration Management
modules implement the management functions of gateway, Field 1 2 3 4-5 6-7 8-9
recording the important events and configuration informa- Name Type SubType SeqNum Node1 Node2 Interval
tion in gateway, providing the upload functionality. Data
Uploading and Command Agent module in sink node are
responsible for gathering data, sending data to serial port,
and dispatching network commands. 1) Data Reporting: The data collected by the sensor
Application platform is in the management layer of the nodes is sent to the sink by built-in wireless chip. Sink is
system, whose purpose is to manage gateway and sen- linked to the gateway through serial port. So the data is
sor network through the gateway, store the data in the reported to the gateway by the serial port finally. The data
database and provide user control interface. TCP Server and we report starts with \x7E\x45 and ends with \x7E. The
Client Communication module implement data transmission, specific format is defined as 7E 45 00 X1 X2 00 00 X3 00
Sensor Network Configuration and Gateway Configuration X4 Payload(AM) F1 F2 7E. Table I presents the form of
realize the gateway and sensor network management, Data the reporting data. The length value of the Payload field is
Analysis and Statistical supports for control management. varied according to the payload types. There are mainly two
typical data types: light/temperature/humidity data, shown in
V. I MPLEMENTATION I SSUES Table II; route report data, shown in Table III
This section presents some initial implementation issues 2) Command Agent: This module not only receives and
about the IOT Gateway system. disseminates the command from the gateway, but also exe-
cutes the command to control the motes working state or
A. Wireless Sensor Nodes configure the motes parameter. It is critical to guarantee that
The hardware architecture of the sensor node is shown in the format is valid, so that the mote can interpret and execute
Fig.4. The sensor node in the prototyping system is TelosB it. The dissemination command starts with \x7E\x44 and
node, which uses MSP430 as the CPU and CC2420 as the end with \x7ESpecifically it is defined as a string like 7E
wireless communication module, integrated with tempera- 44 00 00 X1 X2 00 00 X3 00 X4 Payload(AM) F1 F2 7E.
ture and light data collection module. In the TelosB node, Table I is the instruction for each field of dissemina-
we use TinyOS operating system and implement the modules tion command, in which Payload(AM) fields style varied
in nesC. Here we just present the packet format we defined. according to users application, for example, the classical
The packet format on the nodes is divided into two types: style listed as bellow: open or close several motes, shown
Data Reporting and Command Agent. in Table IV; open or close all motes, shown in Table V.

350
Table V Turn on hardware
C OMMAND OF OPEN OR CLOSE ALL THE NODES
Linux boot
Field 1 2 3 4-5
Name Type SubType SeqNum Interval Initialize application

Listen Ethernet connection

Interrupt evnet occurs

Data from sensor Check event type Data from Ethernet

Protocol conversion Command analysis

Management platform interaction


module forwarding Command distribution

Figure 6. The workflow of gateways main program


Figure 5. The hardware structure of gateway. (a) Mainboard; (b) GPRS
module

Data Topology Gateway


Analysis Manage Cofigure WSN
B. IOT Gateway Manage

The hardware structure of WSN Gateway is shown in Data Storage


Fig.5. IOT Gateways mainboard in Fig.5(a) uses ARM9 Client Communication
Samsung S3C2440 400MHz CPU, 64M Flash and 64M
SDRAM as the processor, storage and memory respectively, TCP Server
in which ARM Linux and Python work as operating sys-
tems and programming environment. The Sink node module Figure 7. The structure of application platform
embedded in Fig.5(a) uses MSP430 and CC2420 as the
processor and wireless communication module, TinyOS and
nesC as the operating system and programming language. that the data is a command, the main program analyzes the
GPRS module in Fig.5(b) uses Huawei EM310 module as command and sends it to the WSN. If the command asks
the wireless communication module. for reporting the gateway information or gateway log to
In detail, the main functions of the gateway are to read server, the main program calls the remote server interaction
data from serial port, write data to the serial port and modules interface to send logging and configuration data
forward sensed data. After transplanting Linux operating to the remote server. If the command is target with the
system into the ARM9 mainboard, we need to implement sensor nodes, the main program analyzes the command by
the data transmission, protocol conversion and command calling the protocol analysis modules interface, and then
agent functions to meet the requirements mentioned above. calls serial data transceivers interface to send information
In Fig.6, we illustrate the process of main program of IOT to the sink sensor. If the data is received from WSN, the
Gateway. After the system is turned on, the Linux operating main program analyzes the data by calling protocol analysis
system boots first, and then the main program will initialize module, and then calls the remote server interaction module
the applications. Our design provides two modes of interac- to send sensed data to the remote server.
tion with the remote server: GPRS Interaction and Ethernet
Interaction. The former one starts GPRS module by sending C. Application Server
AT commands, which also sets the serial communication The application server uses Python as the runtime en-
speed to establish socket connection for data transmission. vironment. Fig.7 shows the main modules deployed in the
The latter one establishes the socket connection by setting application server.
the remote servers IP address and listening port. Both of In TCP Server, we implement data reporting and com-
them provide a unified interface, so the main program selects mand sending functions which supports GPRS and Ethernet
one of them to start easily. communication channels. Socket communication technology
After all the modules initialized, IOT Gateway starts with is adopted in TCP Server. We open three threads in the main
port listening and waiting for external events interruption. process. The first one is to listen on the clients connections
Once the interruption events are detected, the main program and accept multiple socket connections. The second one is to
determines the appropriate response by checking the type of read the commands via Client Communication module and
data. If the data is received from remote server which means send it to IOT Gateway by GPRS or Ethernet, or to read

351
Application Server Application Server
Data Data Topology Gateway Gateway
WSN Manage
Storage Analysis Manage Configure Configure

Client Communication Client Communication

TCP Server TCP Server


Analysis (a) (b) (c)
Send
Receive

Gateway Gateway
(a) (b)

Figure 8. Workflow of command and data between gateway and server.


(a)Data reporting; (b)Command sending (d) (e) (f)

Figure 9. Prototyping of application functions. (a)Sensed data; (b)WSN


topology; (c)Nodes status analysis; (d)Gateway log; (e)Gateway configu-
data from the IOT Gateway and parse the data, then send it ration; (f)AT command sending
to the Client Communication module. The third thread is to
connect TCP Server and the gateway via Ethernet.
In Fig.8, we show the workflow for data reporting and telecommunication network or Internet and the WSN. This
command sending. Fig.8(a) shows the process of data re- paper presents a prototyping implementation of IOT Gate-
porting, in which the data is transmitted from IOT Gateway way based on Zigbee-GPRS protocols, which realizes data
to the TCP Server, after received and parsed by reading the forwarding, protocol transformation, WSN management and
XML file about data formats, the data can be fitted into a control. Therefore, it can be widely used in smart home, in-
specific data structure, then it is sent to the Client Com- dustrial monitoring, smart grid, environment monitoring etc.
munication module. Client Communication module sends In future works, we will consider advanced functions of IOT
the received data to the relevant application modules in- Gateway including fault handling and security management.
cluding Data Storage module, Data Analysis module, Topol-
ogy Management module and Gateway Configure module. ACKNOWLEDGMENT
Fig.8(b) shows the process of command sending, in which This work has been funded by National Natural Science
WSN Management module can generate WSNs instructions Foundation Project No.61073014, National Major Special
(such as ON/OFF instruction), and Gateway Configure mod- Science and Technology Projects No.2009ZX03006-004 1
ule can generate Gateway management instructions (such and 2010ZX03006-007.
as request for the gateway log information). After parsed,
R EFERENCES
the command is converted into AT command, sent to the
Client Communication module, transferred through socket [1] L. Atzori, A. Iera and G. Morabito, The Internet of Things: A
communication to the TCP Server module. Survey, Computer Networks, Vol. 54, No. 15, pp. 2787-2805,
Oct. 2010
The application platform provides the functions including
data display, topology management, nodes status analysis, [2] I. Bose and R. Pal, Auto-ID: managing anything, anywhere,
gateway configuration, WSN management. As shown in anytime in the supply chain, Communications of the ACM,
Fig.9(a), the application server displays the classified sensed Vol. 48, No. 8, pp. 100-106, Aug. 2005.
data from the gateway after parsing the data in real time
[3] ITU, ITU Internet Reports 2005: The Internet of Things, The
mode and database mode. Fig.9(b) shows WSN nodes Internet of Things, Nov. 2005.
topology management, which can draw network topology
after collecting and analyzing the routing and neighbor in- [4] Q. Liu, L. Cui, HM. Chen, Key technologies and applications
formation from the IOT Gateway. Fig.9(c) shows the nodes of Internet of Things, Computer Science, Vol. 37, No. 6, 2010.
status analysis, and Fig.9(d) shows the log information of
[5] ETSI M2M Standardization,
the IOT Gateway. Fig.9(e) shows the gateway configuration http://www.etsi.org/Website/Technologies/M2M.aspx
information stored in the database. Fig.9(f) shows WSN
configuration module which can send AT commands to IOT [6] H. Jin, WC. Liu, JT. Han and YL Ding, Application Study
Gateway including the commands for opening or closing the of Internet of Things in Home, Telecommunications Science,
target node, and time synchronization. Vol. 26, No. 2, 2010.

[7] D. Guinard and V. Trifa, Towards the Web of Things:


VI. C ONCLUSIONS AND F UTURE W ORK Web Mashups for Embedded Devices, in 2nd Workshop on
Mashups, Enterprise Mashups and Lightweight Composition
The IOT Gateway is a key component in IOT appli-
on the Web (MEM 2009), Madrid, Spain, April 2009.
cation systems, which is working as a bridge between

352

Das könnte Ihnen auch gefallen