Professional Documents
Culture Documents
Design and Operation of A Lightweight Educational Testbed For Internet of Things Applications
Design and Operation of A Lightweight Educational Testbed For Internet of Things Applications
fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
1
Copyright (c) 20xx IEEE. Personal use of this material is permitted. However, permission to use this material for any
must be obtained from the IEEE by sending a request to pubs-permissions@ieee.org
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
2
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
3
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
4
and mobility effect, and are not intended to be used by •The Internet of Things (IoT) testbed (AssIuT-IoT) [1]
students and junior researchers. While these testbeds are very hosted at Assiut university.
useful for developing and enhancing IoT systems, they are far • The Field Programmable Gate Array (FPGA)
too advanced for students and junior researchers. AssIuT-IoT testbed [21] hosted at Cairo University.
tries to fill this gap by providing an easy-to-use educational • A lightweight version of USRP testbed controlled by
testbed for IoT applications using hardware resources which RPis [22] is hosted at Alexandria University.
are available as over the counter items. Also, it allows the In the rest of the paper, we will focus only on AssIuT-IoT
users to replicate their projects after validating their design testbed.
on the testbed. Table I shows a features comparison between
AssIuT-IoT and other testbeds. IV. I OT N ODES D ESIGN
In this section, the hardware design of the testbed IoT
III. CRCII
nodes is described.
Collaborative Research and teaching Testbed for wireless
Communications and networks phase II (CRC II) is a multi- A. IoT node components
universities project which gives students and researchers
Here, we will describe the different components of the
remote access to the hardware resources available at different
designed IoT nodes according to the above layered model.
Egyptian universities. The project aims to reduce the cost of
purchasing duplicated hardware available in other universities Layer 1: The sensor layer is occupied by the DHT-
and benefit from the accumulated technical experience of 11 [23], a digital temperature and humidity sensor. The
testbeds’ administrators through tutorials and teaching ma- DHT utilizes a single-wire communication protocol to
terials prepared for every testbed. The testbeds are federated send the data to the IoT node MCU. This sensor was
together in a manner that allows them to be connected and chosen to be used in layer 1 in the testbed because of
synchronized with each other while providing a common its worldwide availability at affordable cost and its ease
interface to the user using minimum resources and costs. The of use. Also, a set of Light Emitting Diodes (LEDs) are
federation service provides the following features: connected to the MCU which are controlled through the
• Synchronizing resources and users databases among the
cloud platform to represent real actuators in IoT applications.
testbeds.
• Providing a single entity for registration and access
Layer 2: The onboard processor for the IoT node is the
to different testbeds through a unified portal (besides Arduino Mega 2560 Rev3 [24]. The Arduino Mega board
individual testbeds’ portals). is built around the ATmega2560 which is an 8-bit AVR
• Enforcing sharing policies among testbeds.
RISC-based MCU [25]. This platform is selected because
• Collecting utilization statistics from different testbeds.
it represents an easy-to-use introductory programming
The federation mechanism is based on the Slice-based Fed- environment that suits basic educational purposes.
eration (SFA) framework as will be described in Section V.
The CRC II federation is formed by : Layer 3: The AssIuT-IoT testbed nodes are equipped
• The universal Software Radio Peripheral (USRP) testbed with two wireless communication modules, namely WiFi
hosted at Alexandria University (the host of CRC I and Zigbee.6 The WiFi connectivity is provided by the
project [19]). It also contains the federation controller
6 It is worth mentioning that our testbed does not test the WiFi or
which is responsible for adding new sites to the federa-
the Zigbee communication properties like the transmission/retransmission
tion and the unified portal which acts as a central access mechanism, data rate, etc. The parameters of both protocols depend on the
point to all testbeds [20]. hardware modules used.
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
5
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
6
Fig. 5: AssIuT-IoT testbed control server architecture and its relation to experiment elements (user, CRC II testbeds,
resources).
• Node Programming: This service utilizes AVRDude transmitting IoT node ID and type. Then, the informa-
software tool [30] to communicate with the IoT node tion is stored in the system database and visualized. It
MCU. AVRDude enables the users, via the Command- depends on establishing a TCP/IP connection between
Line Interface (CLI), to download, upload, and manip- the IoT node and the portal using a unified packet format
ulate the program memory and EEPROM contents of to extract the IoT node ID and the sensor values. The
the AVR MCU using the In-System Programming (ISP) format of the packet is shown in Fig. 6.
technique. The user uploads the binary file that contains • Serial Monitoring: This service provides a debugging
the code to program a specific IoT node MCU through tool for the testbed users. Debugging messages sent from
the “Upload Binary File” page. The server automatically each IoT node over the USB interface is buffered and
generates the AVRDude commands with the targeted relayed to the corresponding user over the internet. This
Universal Serial Bus (USB) port and binary file location service utilizes Pyserial Library [31] to receive the IoT
to program the IoT node MCU. nodes MCU messages sent over the serial (USB) port.
• Node Identifying: This service is used to link the IoT The implementation of this service depends on the way
node unique identifier (ID) stored in its MCU EEPROM the IoT nodes are connected to the testbed (directly
and the server USB port connected to it as the latter is to the server or via an RPi) and will be discussed in
used by the AVRDude tool in the programming step. In Section V-C.
the server or the RPi, the communication with each IoT
The previous services form the necessary components to
node is done using the Abstract Control Model (ACM)8 ,
communicate directly between the portal server and the IoT
which emulates the serial (USB) port number. For that,
nodes. For the IoT nodes connected via an intermediate RPi,
the node identifying service invokes the AVRDude tool
some additional services are needed as the user has no direct
to scan the available ACMs and discover the IoT nodes
access to the RPi and the communication has to be done
connected to each of them by reading their IDs from
through the control portal. These additional services are:
the MCUs’ EEPROMs. The mapping between the IoT
node ID and its ACM number is stored in the portal • RPi Programming: As the testbed user has no direct
database to be used later by the AVRDude in the access to the RPi, this service relays the binary file,
node programming service. This service runs after the uploaded by the user on the portal targeting an RPi-
server is powered up and then periodically to update the connected IoT node, to the RPi over the Local Area
database for any hardware changes. Network (LAN) or the Wide Area Network (WAN)
• IoT Data Receiving: This service receives the sensor according to the location of the RPi. On its turn, the
values transmitted by the IoT nodes to the control portal RPi uses AVRDude tool to program the code on the
over the internet. It classifies the data according to the IoT node MCU.
• RPi Messages Archiving: This service is used to receive
8 The
ACM is equivalent to the COMmunication (COM) port in the the debugging messages from the RPi-connected IoT
Windows environment. nodes by using the Pyserial library. Then, the RPi
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
7
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
8
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
9
At the end of the reservation time, the control portal auto- A. WiFi-based topology
matically uploads an empty binary file on the IoT node MCU As an overview of the WiFi based topology, the reserved
to flush the expired code. IoT nodes form a star connection using their WiFi modules
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
10
(Zigbee modules are deactivated in all nodes) with only the B. WiFi & Zigbee-based topology
central (parent) node connected to the internet as shown in In this topology, the local communication between the IoT
Fig. 10(a). The central node acts as a hub for the leaf nodes nodes is achieved through a Zigbee mesh network, while
as it collects and re-formats their data before sending it to the remote communication to the control server is achieved
the control server. After collecting the data, the central node through a WiFi connection at the central node only. The
initiates a remote connection with the control server through Zigbee topology as shown in Fig. 10(b) has three main
the internet to send all the collected data. The detailed superior advantages if compared with the WiFi star-based one
description of the tasks carried out by the central node are shown in Fig. 10(a). First, the number of nodes allowed in the
as follows: network is much larger. Second, the physical reach of the net-
work is much longer. Third, the mesh topology automatically
1) Configuring the ESP module to be in the dual-mode
configures the routing between the nodes to achieve the best
(station + access point).
configuration without the need for any interference from the
2) Networking with the internet. The ESP station mode
user. Zigbee modules also allow transparent data transmission
allows it to connect to an available WiFi internet con-
between the modules through their UART interface, which
nection to communicate with the control server for data
makes coding and synchronization between the nodes far
sending.
simpler if compared with the TCP server approach used by
3) Constructing an access point. The access point mode
the WiFi based topology, as the user needs only to configure
allows it to establish another isolated local WiFi network
the addresses once at the beginning of the code. The central
for the leaf nodes.
node aggregates the data received by its Zigbee module and
4) Establishing TCP connections with the leaf nodes to
transmits them to the control portal using its WiFi module.
receive their data.
At the control portal, the experimenter can check each of the
5) Waiting a predefined interval of time for the data to be
transmitted variables using a separate graph.
sent from the leaf nodes over TCP.
The central node performs the following tasks:
6) Closing the TCP connections with the leaf nodes.
7) Collecting its own sensors’ data. 1) Connecting to the internet through the available wireless
8) Formatting the collected data in a payload which is connection using the ESP module configured in station
compatible with the control server format shown in mode.
Fig. 6. 2) Reconfiguring the Xbee module to specific Zigbee net-
9) Initiating a TCP connection with the control server. work parameters by utilizing the proper AT commands
10) Sending the data to the control server. if necessary.
11) Closing the TCP connection with the control server. 3) Sending a pre-agreed data-request message to the first
12) Repeating the steps beginning from step 4 again. leaf node ordering it to send specific data from its sensor
and waiting for its response.
4) Repeating step 3 for all leaf nodes.
The leaf node performs the following tasks: 5) Collecting the data from the its sensors.
6) Formatting all the acquired data into a suitable payload
1) Connecting to the local WiFi network created by the structure compatible with the control server, as shown
central node. in Fig 6.
2) Gathering the required data from its sensors. 7) Establishing a TCP connection with the control server.
3) Sending the gathered data through the TCP connection 8) Sending all the formatted data to the control portal.
to the central node. 9) Repeating the steps beginning from step 3 again.
4) Repeating the steps beginning from step 2 again. The role of the leaf node is to:
1) Reconfigure, if necessary, the XBee module to specific
The main drawback of this configuration is that all the
ZigBee network parameters that match those at the
workload is centralized in the parent node, as it is responsible
central node.
for creating the local network, gathering data, formatting, etc.
2) Wait for the central node “data-request” message, that
which may reduce the speed performance of the network if
would be sent over the ZigBee network.
compared with other topologies that balance the workload
3) Parse the received message from the central node.
among all network nodes. As an example for the limitations,
4) Respond to the request message according to its content
the firmware installed on the ESP modules allows only 5
and to send the required unformatted data to the central
simultaneous TCP connections, which limits the number of
point.
leaf nodes connected to one central node. In addition, the
5) Repeat the steps beginning from step 2 again.
synchronization of the local transmissions between the nodes
and the remote transmission to the control portal (or cloud
service), heavily depends on the central node as it actually VIII. A SS I U T-I OT P ERFORMANCE E VALUATION
does all the work. This results in a complex firmware of In this section, the measurements and analysis of different
the central node which reflects on its performance (energy performance metrics of the AssIuT IoT testbed are presented
consumption) as will be detailed in the next section. including:
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
11
30
25
CPU utilization (%)
20
15
10
0
Server (Peak) Server (AVG) RPi (Peak) RPi (AVG)
CPU
Fig. 11: CPU utilization for both the Server and the RPi.
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
12
700
works [36], it is vital to implement cryptographic measures
to provide different security services through IoT networks
600 Zigbee
Wi-Fi like confidentiality and authenticity. One of the challenges in
500
IoT security is the limited available resources in IoT devices.
Time (msec)
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
13
2500
and scoring. After the announcement of the competition,
Encryption a duration of two weeks was given for different teams to
Decryption
2000 register in an online form. Tutorial sessions were conducted
Time (Microseconds)
1000 Encryption
required the competitors to write a code utilizing a single
Decryption
IoT node to connect it to the internet through a pre-
Energy (MicroJoules)
800
announced Service Set IDentifier (SSID) and password.
600 The user code should read the temperature and humidity
400
values through the sensor and send these values through
the WiFi to the server to be monitored periodically every
200
3 seconds.
0 • Mission no.2: WiFi + Zigbee (70 points): This mission
128 192 256
Key Size (bits) required utilizing two nodes; a parent node and a child
Fig. 16: Measured encryption and decryption energy con- node. The parent node connects to the internet through
sumption in AES CBC mode with different key sizes a WiFi connection and connects to the child node
through a Zigbee connection. The child has no internet
connection and it sends its temperature and humidity
a conclusion, the previous experiments show that the IoT values to the parent node, which aggregates the child
node can perform complex tasks while consuming a smaller data and sends it along with its own data to the control
fraction of time and energy compared to those consumed in server.
the communication process. • Mission no.3: Advanced WiFi (70 points): Similar to
mission 2 except that the connection between the parent
IX. A SS I U T-I OT S TUDENT C OMPETITION and child node is through the WiFi module. The parent
node acts as a hotspot and sets up a local WiFi network
A competition was organized between university-level stu- besides connecting to the internet WiFi network. The
dent teams to build different IoT networks by using AssIuT- child connects to the parent through the local WiFi
IoT testbed. The competition design ensured that teams from network to send its data. This mission was scaled up
different locations and universities have the same privilege to include more than one child node.
• Mission no.4: Execution time measurement (36
no matter how far they are from the testbed server as
long as they have remote access to the testbed through the points): The mission required the competitors to use the
internet. Also, organizing a competition with different teams timer module of the MCU to measure the time required
accessing all the testbed hardware and software services is for executing a pre-given block of code.
• Mission no.5: Security (46 points): The mission re-
a real benchmark for the testbed performance. The problems
which were occurred during the competition and the feedback quired the competitors to repeat mission 2 or 3 after
received from the competitors helped to improve the testbed applying a 128-bit AES encryption to the messages sent
significantly afterwards11 . In this section, the competition from the child node to the parent node. The parent node
phases and missions are described and the statistical results should decrypt the messages before transmitting them to
of the competition progress and results are discussed. the server.
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
14
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.3012022, IEEE Internet of
Things Journal
15
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: Carleton University. Downloaded on August 04,2020 at 03:58:24 UTC from IEEE Xplore. Restrictions apply.