LiREP: Lightweight Incremental Reprogramming of
Sensor Nodes Based On In-situ Modification
Jiefan Qiu, Liang Hunag, Liping Qian
College of Computer Science and Technology
Zhejiang University of Technology, Hangzhou, China
{qiujiefan,huangliang,lpqian}zjut.edu.cn
Abstract— Energy-efficient consumption of the reprogramming
approaches is one of key issues for long-term living wireless
sensor networks. Most of the current approaches focus on the
power efficiency during data dissemination. However, the
program rebuilding phase on target node is rarely considered as
another significant part of total reprogramming energy
consumed. We propose a novel reprogramming approach–
LiREP in two-fold: first, we design an in-situ code modification
method which saves more energy compared with traditional way
to rebuild program in external flash. Three basic modifying
operations are proposed and realized. These operations can
reduce the writing/reading operations of flash ROM by
producing a modified program with redundant codes in memory.
Secondly, we also propose a novel rebuilding method to remove
the redundant codes when the available memory is not enough
for the in-situ code modification. This rebuilding method totally
runs in-chip with least the rebuilding overhead. Experiment
results show that LiREP reduces the rebuilding energy overhead
by approximately 84% and 74% compared to Deluge and
Hermes, and further minimizes the reprogramming energy
overhead.
Keywords: Sensor Network; reprogramming; in-situ modification;
in-chip rebuilding;
I. INTRODUCTION
Wireless sensor network (WSN) systems possible deployed
in inaccessible areas and implement a long-term monitoring
task. For software update, wireless reprogramming can provide
an efficient solution without redeployments sensor nodes.
However, the high-energy overhead is the bottleneck of scale
applications of reprogramming. Thus how to reduce the energy
overheads is a key issue of reprogramming approaches.
The energy overhead of reprogramming can includes two
parts: the dissemination overhead for wirelessly
communication among sensor nodes, and the rebuilding
overhead for storing the program image. Most of current
reprogramming approaches focus on reducing the
dissemination overhead, like: researcher [2,3] try to improve
the similar between the different versions by fixing addresses
of variable or function; Li W. and Zhang Y. etc [14] design an
update-conscious complier which generates the new binary-
level codes according to the old ones; or, Hu J. and Xue C.J.
etc [7] propose a code match algorithm to match same codes as
many as possible. These approaches attempt to minimize the
transmitted codes size to save the dissemination overhead.
Actually, the program rebuilding process on embedded
sensor node would consume more energy than the data
dissemination in some cases. For example, our WSN system
for relic protection in Forbidden City [16] has a typical
wireless software update requirement. The sensor nodes are
locked in the showcase for at least 3 months shown in Fig 1.
All the software update must be executed through wireless
manner. In practice, we find that to update a software module
of 350 lines needs to transfer about 1.2 KB data which
consumes 22.64mJ, while rebuilding the program on the node
needs to consume 27.1mJ. In rebuilding process, codes are
assembled with old program to create a new version in the
external flash, and then the new version program about 22kB is
written back to the program flash. The rebuilding energy
overhead is mainly produced by read/write operation of flash
ROM. Table 1 shows the overheads of writing/reading
different memory and the overhead of transmission and
receiving in Telosb sensor node. Per-byte rebuilding overhead
is about 10% of disseminating overhead, but the sum size of
rebuilding data possibly reaches 1-2 orders of magnitude of the
transferring data.
Fig 1. The WSN system for relic protection in Forbidden City
Table 1.
Average energy overhead (uJ) with 1kB: Telosb [10]
Operation
Average
overhea
Operation
Average
overhea
Radio listen 2480 Transmit date 16590
Read external flash 1015 Write external flash 2458
Read program Flash 785 Write program flash 1850
Read RAM 50< Write RAM 126
To minimize the rebuilding overhead, we propose a
lightweight incremental reprogramming approach named
LiREP. In this approach, the in-situ code modification is
proposed instead of rebuilding program. The target node is able
to directly assemble the delta code into old program without
changing the storing address of the old codes. The in-situ
modification does not require participation of external flash,
and its overhead is mainly caused by read/write operation of
program flash and RAM in chip.
As the cost of refraining from rebuilding program in
external flash, in-situ modification produces useless redundant
2016 International Conference on Computing, Networking and Communications, Wireless Ad Hoc and Sensor Networks
978-1-4673-8579-4/16/$31.00 ©2016 IEEE