0% found this document useful (0 votes)
2 views6 pages

IoT Safe Building in IPv6 Networks

Uploaded by

Zoro Zoro
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

IoT Safe Building in IPv6 Networks

Uploaded by

Zoro Zoro
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2013 IEEE 37th Annual Computer Software and Applications Conference

A IoT Application of Safe Building in IPv6 Network Environment

Tseng-Yi Chen, *Hsin-Wen Wei, Nien-I Hsu, Wei-Kuan Shih


Department of Computer Science, National Tsing Hua University, Hsinchu, Taiwan
*
Department of Information Management, Tamkang University, Taipei, Taiwan
tychen@[Link]

Abstract—Internet of Things (IoT) has been widelyġ researched lifetime. Due to limited memory space, the task of porting IP
over the past decade. Recently, manyġ research results of IoT stack to sensor device becomes extremely difficult. Each IP
related to emergency system,ġ smart building and medical datagram can have a maximum size of 64KB, including its
system, etc. The key for IoTġ applications are the ability to header. In contrast, sensor device’s memory is at most 64KB.
interact with physicalġ world through computation, So, memory space is fully occupied by TCP/IP stack when
communication, andġ machine control. However, each sensor system runs TCP/IP protocol on a sensor device. Another
device in IoTġ cannot conveniently communicate with other problem is the shortage of IP addresses. IPv4 address space
terminalġ devices through internet protocol. So, it is necessary is a 32 bit field. Since the 1980s, it was apparent that the
toġ establish protocol translation stack or equipmentġ between
pool of available IPv4 address was being depleted at a rate
two WSN groups. That is very inefficient andġ high overhead
that was not initially anticipated in the original design of the
cost of network construction. Theġ development of micro-IP
(uIP) solves this problem. Theġ uIP reduce cost of protocol
network address system [1].
translation and it alsoġ realizes the machine to machine (M2M) Nowadays, some solutions to solve problem of porting IP
concept inġ wireless sensor network. Therefore, this paper protocol to sensor object and problem of lack of IP address.
proposesġ a solution for porting uIP library to the wireless In first problem, Porting TCP/IP to sensor device is a
sensorġ network devices and presents the integration of aġ challenge task in previous years. Fortunately, porting TCP/IP
speaker module and IPv6 ready sensor device. We alsoġpropose protocol to embedded system becomes possible by porting
a safe building application based on theġ integrated system to uIP stack. The uIP is an open source TCP/IP stack for tiny 8-
help people escaping from disasterġenvironment. In conclusion, and 16-bit microcontrollers. The uIP code size is only a few
our contributions areġ building an IPv6 ready wireless sensor kilobytes while RAM usage can be as low as a few hundred
networkġ environment and develop a safe building system to bytes. The uIP is designed to have only the minimal set of
makeġ the concept of IoT in IPv6 network environment comeġ features needed for TCP/IP stack. IPv6 is a revision of the
true. (Abstract) internet protocol. IPv6 implements a new addressing system
IPv6 uses 128-bit addresses, allowing for 2128. Hence, we
Keywords-Internet of things; IPv6; IPSO; machine to port IPv6 stack to sensor devices in order to solve the
machine; emergency escape system (key words) problem of the lack of IP address. And uIP developer also
implement IPv6 stack within uIP library. In conclusion,
I. INTRODUCTION uIPv6 stack solves all problems of IoT concept realization.
Internet of Things (IoT) is setting off an upsurge of uIPv6 make it easy to port TCP/IP stack to embedded
information industry. There are more and more sensor system .
devices and applications in recent research results, such as: In addition, applications of IoT get more attention from
healthcare, smart building, and wild monitoring, etc. The information industry. IoT applications originally entail
main concept of IoT is machine to machine communication. components that interact through complex network protocols.
Unfortunately, terminal devices cannot directly communicate Hence, IP protocol reduces the problem of complex network
with each other in traditional wireless sensor network due to protocols. But there are a few IoT applications on embedded
the complexity protocol. In other words, the sensing data IP protocol. Therefore, we develop a disaster escaping
cannot transmit on different protocols; the protocol system in application of internet of things through embedded
translation software stack or hardware equipment is needed IP protocol in order to control terminal device conveniently.
for protocol switching in order to transmit data with each In this paper, we port uIPv6 protocol stack to Octopus II
other. As a result, WSN groups communicate with each other sensor object. Based on uIPv6 stack, we develop a sensor
with high overhead cost in general network configuration. information management system. Each sensor device
The Internet Protocol is the principle communication connects to sensor information management system with
protocol that provides a method for delivering datagrams IPv6 protocol. In advance, we develop a disaster escaping
from the source host to destination host solely based on the system in IPv6 ready network environment. The applications
addresses. Therefore, IP protocol could help WSN to realize help people to escape disaster environment more effectively.
machine to machine communication with IP address. The rest of paper is organized as follows. The research
However, there are some problems in migrating IP protocol background and related work are presented in section 2, and
stack to sensor object. First, each sensor device is with the design of system architecture of IPv6-enable WSN
limited memory space, processing power, and battery application in section 3. The system implementations of
IPv6-enable disaster escaping system are presented in section

0730-3157/13 $26.00 © 2013 IEEE 748


DOI 10.1109/COMPSAC.2013.124
4. The section 5 shows development system evaluation and Hence, we propose an integrated IoT application solution
system GUI. The conclusions and future work of this paper based on concept of IP-based enable WSN that includes
are summarized in section 6 porting uIPv6 stack to sensor object, sensor information
management system development, and speak module
II. RELATED WORK integration for application of escaping from disaster
Traditionally, many researches put efforts on setting up a environment.
monitoring system inside the buildings. The research [6]
reports their experience with the implementation, III. SYSTEM ARCHITECTURE
deployment, and operation of an indoor environmental Safe building application system is composed of
monitoring network using WSN called SensorScope. To hardware and software platform. This section introduces the
make the sensor nodes have long lifespan and working more hardware component and the software stack in safe building
efficient, some researchers [7] propose a clustering-based application. The goal of this research is to port uIPv6 stack to
network specified for building monitoring. They also show sensor object for developing an integrated IPv6-based
that WSN is conducive to build environment monitoring. disaster escaping system. Safe building system includes
And some applications that use WSNs for smart building are uIPv6 stack on sensor object, speaker module, and sensor
mainly in the energy saving purpose [8]. information management system. Figure 1 shows safe
Nowadays, the deployment of a building control system building application architecture.
is complicated because of different communication standards.
In general, wireless sensor networks do not equip IP protocol
in their system; instead, different network routing algorithms
are deployed. So, their application system into IP-based
internet requires the establishment of protocol translation
stack at the boundary of both internet and WSN. The
translation stack transforms communication packet between
non-IP packets in the WSN group and IP packets in internet.
The translation stack always stores a database of the local
sensor node id and outgoing TCP/IP port. System inquires
the database for delivering the message to destination
machine when it receives a control message or sends a
Figure 1. Safe building system architecture
collection data to sink system.
There are also some solutions for solving variety of WSN
Components in safe building application connect with
standards used for monitoring and saving energy in smart
each other through IP protocol on internet. The application
buildings. Some researchers [9] integrate WSNs with
also provides authorization and sensor access control
different service communication into a ‘knowledge and
methods for end users to keep system secure.
information services’ platform to support energy
management which can be accessed via a Web service to A. Hardware Components
support inhabitant actions to reduce energy demand. In [10], Hardware platform in safe building system is composed
the authors not only present a web services-based approach of three parts: the transmission board, sensor board, and
to integrate resource constrained sensor and actuator nodes speaker module. We utilize the Octopus II [15] sensor device
into wireless sensor networks, but also implement an API to as development platform. Octopus II was developed by a
access services on sensor nodes following the architectural team of National Tsing Hua University in Taiwan. The
style of representational state transfer (REST). But above all design of Octopus II is similar with Tmote Sky [16] platform.
research do not take account of IP convenience for wireless Figure 2 shows features of Octopus II.
sensor network applications.
Therefore, many research and standard group [3, 4, 5]
investigate and define the standard of IP stack in wireless
sensor network. Sensor networks with IP support would
eliminate the difference in WSN local area network (LAN)
and Internet wide area network (WAN). A lot of research has
been proposed in the IP-based WSN, e.g. mechanisms,
security, and protocols. The concept of IP stack for smart
object is proposed by IP for Smart Object (IPSO) Alliance
[11] in 2008. After proposing the IPSO concept, IP-based
sensor network have been implemented [12, 13, 14] in the
recent past. Recent works include monitoring system,
Figure 2. Octopus II features
healthcare application and smart building. Those applications
are based on IP transmission protocol. But they do not
Octopus II equips MSP430 processor, 48KB flash
consider about issue of IP address to be not enough. IPv6
memory, 10KB RAM, and 2.4 GHz IEEE 802.15.4
protocol can solve this problem.

749
compliant RF on the main platform. The sensor board is Contiki [18] is a small, open source and multitasking
connected with main platform through 50-pin expansion operating system. It is designed for embedded systems with
connector. Figure 2 shows the feature of sensor board. small memory size. Contiki only consumes 2 kilobytes of
The sensor board combines four different sensors on the RAM and 40 kilobytes of ROM. Contiki OS also an event-
platform which includes light sensor, temperature sensor, driven kernel on top of which application programs is
gyroscope, and three axis accelerometers. And there is dynamically loaded and unloaded at runtime. Figure 4 shows
another 50-pin I/O interface on the sensor board. So, we can the Contiki OS system architecture
integrate other device with Octopus II platform when the
transmission platform connects with external sensor board.
In general, other device connects with Octopus II platform
through UART interface. Deployed device in safe building
application not only utilizes original sensor function on
Octopus II platform to collect information of monitored
building environment, but also integrates speaker module to
realize application of internet of things. Figure 3 shows the
speaker module features.

Figure 4. Contiki system architecture

Contiki’s kernel is a light-weight kernel. Contiki OS can


transmit the sensing data or forwarding message through
communication service. The communication service is an
important service in safe building application. We build up
TCP/IP stack based on the service. After choosing the
Figure 3. Speaker module features operating system, this research uses uIP stack as the
communication stack in WSN application.
The speaker module is Speech Synthesizer Bee. It is The uIP [19] is an open source TCP/IP stack for wireless
compatible with the Xbee pin and can be easily plugged into sensor object. It is widely used in the embedded systems and
the sensor platform. The module is connected with Octopus several platforms. It also provide IPv6 stack for wireless
II platform through UART interface. Figure 3 presents sensor device. After survey of embedded TCP/IP stack, we
features of speaker module. The safe building system choose uIP to build on the target system. It is a light weight
combines these hardware components to be the application’s TCP/IP protocol in WSN applications.
development platform. And then, we build up operating After introducing the target system’s hardware
system and software stack based on the hardware platform. components, software stacks, and various operating systems
running on wireless sensor devices, we describe the
B. Software Stack Introduction implementation steps in detail next section.
Safe building system’s software stack is divided into two
parts. Operating system (OS) for wireless sensor network is IV. SAFE BUILDING SYSTEM
different from general computer’s operating system. The In this paper, the system implementation steps are
WSN OS is typically less complex and strong resembled divided into four main parts. They are hardware integration,
embedded systems. Because of WSN are typically deployed uIPv6 stack porting, sensor information management system,
with a particular application and need for low costs and low and disaster escaping algorithm and application. The rest of
power oriented. Second, IP stack is another important role in section gives detailed explanation of four parts of system
target system. We deploy IP protocol in safe building implementation.
application. So, IP stack porting is an important issue in this Safe building application includes sensor platform
research. We introduce development system’s operating integration, sensor information management system and
system and IP stack in this section. escaping algorithm. Safe building application follows IPv6
There are many choices of WSN OS for porting, such as network protocol. So, we show terminal sensor devices
TinyOS, LiteOS, and Contiki. The most used OS in WSN is integration in section 4B, porting IPv6 stack and
TinyOS. TinyOS [17] is based on an event-driven development of sensor information management system in
programing model. TinyOS signals the event handler to deal section 4C and escaping algorithm in safe building in section
the event when external trigger occurs. However, the 4D.
TinyOS programming language NesC is not commonly used
by general programmer. So, we choose Contiki OS as the A. Scenario
operating system on target platform. This paper’s target application system focus on helping
people escape from disaster environment, such as: fire

750
accident, earthquake, etc. We integrate temperature sensor same with Contiki OS default setting. We prepare some files
and gyroscope, so that, the system can detect fire accident in order to port Contiki OS and uIPv6 stack to Octopus II
and earthquake. And then, we also combine a speaker platform. First, we need to prepare MSP 430 GCC cross
module with each sensor device. Safe building application compiler, MSP 430 bin utility and MSP 430 library to build
utilize speaker module to guide human to escape from the cross compiler environment. And then, we need to install
disaster environment. The light indicator is vague in a fog, some driver for programming target sensor platform.
but the sound is still clear in fire environment. To make sensor devices understanding IPv6 protocol
Terminal sensor detects the event of fire accident, and stack, user only need to modify I/O pin in source file by
then the sensor transmits the fire event to sensor information following uIP porting steps in TmoteSky. As shown in Table
management system in cloud through IPv6 protocol. The 1, the below source code needs to be inserted in contiki-sky-
sensor information management system employs SBS main. Then, we develop the sensor information management
escaping algorithm to calculate an optimal escaping path. system based on IPv6-enable sensor devices.
Next step, the cloud platform will send the routing path to
every sensor node in accident environment and call to the TABLE I. MODIFIED SOURCE CODE
fire station to report the accident. The terminal sensor File Name contiki/platform/sky/contiki-sky-main.c
activates the guidance function through the speaker module P4DIR |= (1 << 3);
in fire environment. Peoples can move to the right place by Insertion code P4SEL &= ~(1 << 3);
the guidance. Finally, they can hear sound of "EXIT" and P4OUT &= ~(1 << 3);
escape from the accident in safe. In advance, we build up sensor information management
B. Hardware Integration system based on IPv6 protocol. The sensor information
management system has ability to automatically detect
As described previously, the system is composed of adjacent sensor devices and lists them in website.
transmission platform, sensor board, and speaker module. Our sensor information management system collects
We integrate a speaker module as system information sensing data from terminal sensor device in IPv6 network
notifier. The speaker module is developed based on environment. The management system starts to analyze the
SYN6288 chip. SYN6288 transmit data via UART port in sensing data when system receives the monitoring
asynchronous transfer mode. Thus, we connect Octopus II information. And then, the system shows real-time sensor
UART0 TX port to SYN6288 RX port and UART0 RX port information and store history data to MySQL database. The
to SYN6288 TX port. management system send escaping path to terminal sensor, if
Finally, we connect Speech Synthesizer Bee’s power in the monitoring system detect the disaster event. Safe
to Octopus II power out. The Speech Synthesizer Bee runs in building system will also notify fire station or hospital
normal execution mode. We develop a UART socket according to the level of disaster.
program based on Contiki OS. The UART socket program
opens the gate for communication between Octopus II sensor D. Navigator of Safe Building System
platform and Speech Synthesizer Bee speaker module. There are two parts in safe building application. The
Figure 5 shows the integration of hardware components. We disaster event detection is first part. We design a disaster
deploy the integrated devices in safe building system. event detection algorithm in the safe building application to
filter the error data which is collected from terminal sensor
device. Another part is SBS routing algorithm; the algorithm
control the terminal sensor devices that equip with speaker
modules to guide people escaping from disaster environment.
1) Disaster detection algorithm: Sometimes
management system receives incorrect sensing data that
cause by sensor device failure or incorrect configuration.
Therefore, we design a filtering algorithm to screen out
abnormal sensing data. The algorithm first retrieves every
sensing data from terminal sensor device. And then, the
system set a parameter of "High Temperature Threshold"
(HTT). The system activate detection mode when one of the
sensing temperature data exceeds HTT. In the detection
mode, the system gathers the neighboring sensors’
Figure 5. Hardware integration temperature and analyzes the growth rate of neighboring
sensors’ temperature. The system starts alert mode when the
C. IPv6 Sensor Network and Sensor Information growth rate is over 10%. Next step, the management system
Management System executes calculation of escaping path.
Note that, the design of Octopus II platform is similar
with Tmote Sky platform and Contiki OS is developed based
on Tmote Sky. So, many operations of IP stack porting are

751
TABLE II. DISASTER DETECTION ALGORITHM V. SYSTEM EVLUATION
Algorithm 1 Disaster detection algorithm In this section, we present the results of IoT system
Input: sensing temperature T, sensing gyroscope G, application to verify the correctness of application on
previous sensing temperature T’, previous
sensing gyroscope G’ Android system and IoT web service management. We
Output: system mode S implemented the safe building application based on Android,
// Case I fire accident PHP, and Contiki O.S. All the system development are
1. IF(T > HTT) implemented in C\C++ and Java.
2. Get neighboring sensors’ temperature Tn
3. IF(average((T’n - Tn) / T’n)) > 10% A. System Demonstration
4. Start (SBS_Routing())
// Case II earthquake
The demonstration shows that execution result of sensor
1. IF(G value change) information management system on web, IPv6 sensor device
2. Get neighboring sensors’ gyroscope Gn management system on server application, and Machine to
3. IF(average(Gn value change) is greater than 20%) Machine communication by handheld device
4. Start (SBS_Routing()) 1) Sensor web system: We develop a sensor web system
2) SBS routing algorithm: Our safe building system based on IPv6 network environment. Figure 7 shows the
executes routing path calculation when the system detects the monitor function in sensor information management system
event of disaster. At the first, our algorithm transforms the on web.
physical layout of the terminal sensor devices in disaster
environment into connected network graph. Then, we set the
sensor node at the exit to be the root node and utilize
breadth-first search to construct the tree. The algorithm
assigns a level number according to the level of the tree.
Then, the terminal sensor will be assigned a number and
guide people to move to the location at which the sensor has
a smaller number. As a result, people can escape from the
disaster environment by following the guidance. Figure 6
illustrates an example of applying escaping algorithm.

Figure 7. The execution results of sensor web

2) Sensor management system: We also develop an


application of sensor management system on PC. User can
Figure 6. Example of escaping disaster control the speaker module and deploy the routing algorithm
in this program. Figure 8 shows the server side application
In the SBS routing algorithm, the load balance issue is which can control sensor’s LED and sensor’s speaker
considered, if there are multiple exits in disaster environment. module.
The algorithm would calculate more suitable escaping path
to nearby exit.
TABLE III. SBS ROUTING ALGORITHM
Algorithm 2 SBS routing algorithm
Input: sensor node set Sn, building layout L
Output: escaping path P
// Case I fire accident
1. Using building layout L to transform the sensor node set Sn into
connected network graph G(V,E)
2. Set "EXIT" sensor node to be a root in G(V,E)
3. Construct BFS tree in G(V,E)
4. Apply BFS tree in G(V,E) to be our routing path P

Figure 8. Sensor management system

752
3) Mobile application: The goal of CPS and IoT is to REFERENCES
achieve M2M, end-to-endcommunication. As described in [1] S. Deering and R. Hinden, "Internet Protocol, version 6 (IPv6)
above, it is easy to see that the safe building system is a specification," RFC 2460, 1998
M2M and end-to-end application. For further verification, [2] Adam Dunkels, "Full TCP/IP for 8-bit architectures," in Proceedings
of the 1st international conference on Mobile systems, applications
we develop a sensor management application. The and services, MobiSys’03, pages 85-98, 2003
application runs on Android system and control sensor [3] IETF working group 6lowpan, "IPv6 over Low power WPAN
devices through IPv6 network. Figure 9 shows the android (6lowpan)", Available:
application and sensor controlling. [Link]
[4] Adam Dunkles, " The Contiki Operating System 2.x",
Available :[Link]
[5] G. Montenegro and N. Kushalnagar, " Transmission of IPv6 Packets
over IEEE 802.15.4 Networks ", draft-ietf-6lowpan-format-01,
Internet-Draft, work in progress, October 2005
[6] Schmid Thomas, Dubois-Ferrière Henri and Vetterli Martin,
“SensorScope: Experiences with a Wireless Building Monitoring
Sensor Network,” Workshop on Real-World Wireless Sensor
Networks (REALWSN'05), Stockholm, June 2005
[7] Qifen Dong, Li Yu, Huanjia Lu, Zhen Hong, Yourong Chen, “Design
of Building Monitoring Systems Based on Wireless Sensor
Networks,” Wireless Sensor Network, Vol.2 No.9, PP.703-709,
September 2010
[8] Yuvraj Agarwal, Bharathan Balaji, Rajesh Gupta, Jacob Lyles,
Michael Wei and Thomas Weng, “Occupancy-Driven Energy
Management for Smart Building Automation,” Proceedings of the
2nd ACM Workshop on Embedded Sensing Systems for Energy-
Efficiency in Building, 2010(BuildSys ‘10)
[9] Hanne Grindvoll, Ovidiu Vermesan, Tracey Crosbie, Roy Bahr,
Nashwan Dawood and Gian Marco Revel, “A wireless sensor
network for intelligent building energy management based on multi
communication standards – a case study”, ITcon Vol. 17, pg. 43-62,
2012
[10] Lars Schor, Philipp Sommer and Roger Wattenhofer, “Towards a
Zero-Configuration Wireless Sensor Network Architecture for Smart
Buildings,” Proceedings of the First ACM Workshop on Embedded
Sensing Systems for Energy-Efficiency in Buildings, 2009, Pages 31-
36(BuildSys ‘09)
[11] A. Dunkels and J. Vasseur. Ip for smart objects alliance. Internet
Protocol for Smart Objects (IPSO) Alliance White paper No.2,
September 2008.
Figure 9. Android application control [12] M. Durvy, J. Abeill´e, P. Wetterwald, C. O’Flynn, B. Leverett, E.
Gnoske, M. Vidales, G. Mulligan, N. Tsiftes, N. Finne, and A
Dunkels. Making Sensor Networks IPv6 Ready. In SenSys 2008.
VI. CONCLUSION [13] J. Hui and D. Culler. IP is Dead, Long Live IP for Wireless Sensor
Networks. In Proceedings of the 6th international Conference on
The “Internet of Things” means installing sensors to all Embedded Networked Sensor Systems, Raleigh, North Carolina,
objects, such as power systems, home appliances and public USA, November 2008.
facilities, and all the subjects are linked up by the Internet. [14] B. Priyantha, A. Kansal, M. Goraczko, and F. Zhao. Tiny web
Based on IoT concept, our work porting uIPv6 stack to services: design and implementation of interoperable and evolvable
Octopus II platform to make sensors can carry IP packages sensor networks. In Proceedings of SenSys 2008, 2008
and implement a sensor information management system. [15] Octopus II website, [Link]
User can access the sensor devices via the information [16] Tmote sky website, [Link] TmoteSky
management system. Finally, we integrate a speaker module [17] Philip Levis, Sam Madden, Joseph Polastre, Robert Szewczyk, Kamin
to develop a safe building system. The safe building system Whitehouse, Alec Woo, David Gay, Jason Hill, Matt Welsh, Eric
composes IPv6-enable sensor object, sensor information Brewer, and David Culler. "TinyOS: An operating system for
wireless sensor networks". In W. Weber, J. Rabaey, and E. Aarts,
management system, and mobile application. We realize an editors, Ambient Intelligence. Springer-Verlag, New York, NY, 2004.
IoT system in real world to help cyber physical system [18] Dunkels A. et al. "Contiki - a lightweight and flexible operating
development. system for tiny networked sensors." In LCN ’04, pages 455– 462,
Washington, DC, USA, 2004. IEEE Computer Society.
ACKNOWLEDGEMENT [19] Adam Dunkels, "uIP - A Free Small TCP/IP Stack," 2002.
The work reported in this paper was supported by [Link]
10/11/[Link]
National Science Council under grant NSC 101-2221-E-007-
128-MY2, NSC101-2219-E-007-007-, NSC 101-2221-E-
032-067.

753

You might also like