Condroid WSN/DTN Gateway - System Architecture & Requirement. Download the document in http://csd.xen.ssvl.kth.se/csdlive/content/wsndtn-gateway-system-analysis-design
Unraveling Multimodality with Large Language Models.pdf
Condroid WSN/DTN Gateway - System Architecture & Requirement
1. !
!"#$%&#'()&*!)+''
"+"&*,')-./0&*.&1-*'2'
-*310-*,*#&''
! 4*-"05#'678'
2011
!"#$%&'()%*+(,%+-%"( !"#$%&'(&#*&.(
' (
'
Lan Sun (lansun@kth.se), 15 ECTS (((((/#*&.(*01(2"#$%&'(#30%"(
Hervé Ntareme
Qing An (qinga@kth.se), 15 ECTS
/#4&#*&.(
Michel Hognerud
Jun Gao (jungao@kth.se), 15 ECTS
/.*+25#0(
Laili Aidi (aidi@kth.se), 18 ECTS
Björn Pehrson!
Yasir Ali (yasireal@kth.se), 15 ECTS
SUMMER CSD
2. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
Revision History
Version Date Responsible Change
V1.0 2011-10-10 Qing An and Laili Aidi Initial version of the document
2
4. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
Summary
This document describes the System Architecture, System Requirement and Software Design of the
WSN/DTN Gateway, including the features and class diagram of the WSN/DTN Gateway Engine
applications
4
5. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
Abbreviation
Abbreviations used in this document:
Abbreviation Description
MySQL An Open source Relational database management system (RDBMS)
ALIX Board Single board computer capable of running operating systems
SunSPOT Embedded microprocessor that runs Java
Voyage Linux GNU/Linuxderived distribution that is best run on a x86 embedded platforms
Barkeley DB Software library that provides embedded database for key/value data
USB Universal Serial Bus
WPA Wi-Fi Protected Access
Wi-Fi Trademark of a product based on IEEE 802.11
Apache HTTP Server
PHP Hypertext Preprocessor, Server-side HTML embedded scripting language
WPA Wi-Fi Protected Access
Dnsmasq Lightweight version to configure DNS forwarder and DHCP server.
JDK Java Development Environment
Apache Ant XML-based build scripting language
Hald HAL Daemon
SunSPOT Embedded microprocessor that runs Java
DHCP Dynamic Address Allocation Protocol
AP Access-Point
DNS Domain Name System
ProPHET Probabilistic Routing Protocol using History of Encounters and Transitivity
Wi-Fi Trademark of a product based on IEEE 802.11
DTN Delay Tolerant Network / Delay Disruptive Network
WSN Wireless Sensor Network
DTN Delay Tolerant Network / Delay Disruptive Network
WPA Wi-Fi Protected Access
Bytewalla Implementation of DTN in the Android platform.
5
6. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
1. System Architecture
One of the Condroid CSD project aim is to design, implement and analyze the performance of
WSN/DTN Gateway, which is intended to solve the technical issues in carrying the data from the spatially
distributed autonomous WSN motes to the outside world [1, 2, 3]. The WSN motes are deployed to monitor
physical or environmental conditions, connected to a WSN Gateway, which collects the information received
from nodes, stores them in a database, and provides interfaces between the sensor network and the external
network infrastructure, by making make them available via WiFi link and Bytewalla [4, 5, 6, 7].
Below is the design of system architecture of this WSN/DTN Gateway in its complete scenario:
Figure 1. WSN/DTN Gateway System Architecture design
6
7. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
The figure above shows the WSNs deployed in remote area with no Internet connectivity (Village
network). The sensors in each network continuously broadcast the sensor data, and the Base station passes the
data it receives from the sensor within its area to the WSN/DTN Gateway, which then log this data in the
database.
The WSN/DTN Gateway is also equipped with WiFi Access point, which makes it enable to be reached
by the user both for accessing the data directly through its Web-base interface or for tapping the bundle sensor
data. Using the WSN/DTN Gateway Web-base interface, user can see these sensor data in the table format,
analyze it using graph, or even download it.
The WSN/DTN Gateway also continuously generate the sensor data in specific range of time into DTN
bundle, so these bundles ready to be forwarded to any DTN node within the range of the WiFi AP of the
WSN/DTN Gateway. The DTN bundle generation also possible to be triggered by user using the Web-based
Interface.
The Bytewalla phone plays the role as the postman of these sensor bundle, that carry these data and
forward it to another DTN node until this bundle reach the destination in the City Network, either trough
cellular network or direct link (WiFi Access Point) of the City WSN/DTN Gateway.
After the sensor bundle received in the City WSN/DTN Gateway, it then possible to be accessed by the
user using the same Web-base Interface platform that is deployed in Village WSN/DTN Gateway. The Village
WSN/DTN Gateway implement data compression to the sensor data before it is sent as DTN bundle in order
to optimize the resource, where the City WSN/DTN Gateway then un-compress it again when receives this
DTN bundle.
7
8. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
2. System Requirement
In this section, we give a detail description of the components of this system, including the hardware
requirements and software that require implementing or simulating the complete WSN/DTN Gateway system.
2.2 Hardware Requirement
The hardware requirements of the WSN/DTN Gateway are listed below:
1. ALIX Board with sufficient power Supply
The ALIX Board is the SBC that highly power efficient, small and capable to run operating system. It is
used as the WSN/DTN Gateway hardware, where the system running on top of is [8].
2. WSN mote(s)
The Mote(s) is the embedded hardware with sensor and small battery which make it enable to collect the
data about physical or environmental conditions and broadcast / multicast it to the Base station. In this
WSN/DTN Gateway system we use the SunSPT mote that work based on IEEE 802.15.4 standard on the
Squawk JVM, run directly on the processor without an OS [9].
3. WSN Base station
The Base station is used to receive the data that is broadcasted / multicasted by the WSN Mote(s), which
the then directly passed to the WSN/DTN Gateway by the Base station. As same as the motes, we also use
SunSPOT to implement this WSN/DTN Gateway system [9].
2.3 Software Requirement
The software requirements of the WSN/DTN Gateway are described below:
1. Bottom-ware Software
• Embedded OS
In this WSN/DTN Gateway, we use Voyage OS, which is light version of Debian linux OS distribution
that is best run on the embedded platforms [10].
• DTN software bundles
The DTN plays main role in this system, which is protocol in computer network architecture that
addresses the technical issues in network with lack continuous connectivity [11]. The DTN version that is
configured into this WSN/DTN Gateway system is DTN2. To implement DTN2 on top of Voyage OS, we
8
9. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
need to meet several packages dependencies, and also install another 2 services, which are:
a. Oasys, which is come with DTN2 software bundle
b. Oracle Berkeley DB, which is light embeddable storage engine that provides local database [12].
2. Middle-ware Software
• DNS server
The DNS server need to be configured into the WSN/DTN system, so the user can access the
WSN/DTN Web-page Admin website, which is the part of upper-ware platform. In this implementation we
use DNSMAQ, which is lightweight version of DNS forwarder [13].
• DHCP server
The DHCP server is needed to provide dynamic IP address for the user connected to the WSN/DTN
Gateway trough WiFi Access Point, both the Bytewalla user and the WSN/DTN Web-page admin user. In this
implementation we also use DNSMAQ, which also serve lightweight version of DHCP server [13].
• Database server
The database server is mainly used to store the wireless sensor data comes from the SPOT motes, as well
as record the current setting of the WSN/DTN Gateway, either as Receiver (City) or Sender (Village). To
implement that, we used MySQL, which is an Open source Relational database management system (RDBMS)
[14].
• HTTP server
The HTTP server is to deliver WSN/DTN Gateway web-based content. In this WSN/DTN Gateway
system, we used Apache, which is an open source lightweight HTTP Server [15].
• PHP
PHP is Hypertext Preprocessor and Server-side HTML embedded scripting language, used to develop
WSN/DTN Gateway web-based UI for management and configuration [16].
• Java JDK
The WSN applications in this WSN/DTN Gateway system (Spot application, Core-Engine Sender &
Receiver) work based on java, thus we have to use JDK both to develop, debug and deployed the code to the
Spot mote and WSN/DTN Gateway itself [17].
• Ant
The Core-Engine and spot application need to be deployed and run in the WSN/DTN Gateway machine,
thus we have to use Ant, which is java library and command-line tool to build Java application [18].
9
10. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
• Hald service
Hardware Abstraction Layer Daemon (HALD) is a daemon that maintains a database of the devices
connected to the system in real-time [19]. The daemon connects to the D-Bus system message bus to provide
an API that applications can use to discover, monitor and invoke operations on devices.
• SunSPOT Squawk JVM & Manager
The WSN platform that is used in this system is SunSPOT [20]. Thus, we need the to install SunSPOT
Manager that provide Squawk JVM to run application for SunSPOT Base Station.
3. Upper-ware platform (WSN/DTN Gateway platform):
The WSN/DTN Gateway system is built by different applications work together, each of it has specific
role that serve the complete service of a WSN/DTN Gateway. Below is the description of each of it:
• Spot Engine Application
The WSN Spot Engine application runs in the SPOT Mote(s). It periodically samples the built-in light,
and temperature sensor and it’s battery status, and then broadcasts these values over the radio.
• Core-Engine Sender Application
The WSN/DTN Sender Engine application runs in the WSN/DTN Gateway on the remote area
(Village). It listens for sensor-sample broadcasts trough the SPOT Base station, save received values to its
database. The WSN/DTN Gateway that run WSN/DTN Sender Engine has DTN2 service running in the
background, so it able to make this sensor data file as a DTN bundle, ready to be forwarded if there is any
DTN node connected to it that contain the route to the WSN/DTN Gateway Receiver workstation (for
example, Android running Bytewalla) [1, 2, 3].
• Core-Engine Receiver Application
The WSN/DTN Sender Engine application runs in the WSN/DTN Gateway on the city area. As same as
WSN/DTN Gateway workstation that run WSN/DTN Gateway Sender Engine, the WSN/DTN Gateway
workstation that run WSN/DTN Gateway Receiver Engine also has its own DTN2 service running in the
background, so it able to listens for any DTN bundle from any WSN/DTN Gateway Sender(s), that is sent by
any DTN node (for example, Android running Bytewalla), then save received values to its database
• Web-based Admin Application
The WSN/DTN Webpage Admin runs in the WSN/DTN Gateway either in the remote or city area. It is
designed to serve as Graphical User Interface (GUI) application to the user to control the WSN/DTN Sender
Engine or WSN/DTN Receiver Engine [3]. Through this Webpage Admin, User can set the mode of the
WSN/DTN Gateway workstation, either it will run as Sender or Receiver. Along from that control feature, this
10
11. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
Webpage Admin also make User able to access the current sensor data that the WSN/DTN Gateway
workstation has in its the MySQL Database, either view it as table view, analyze it with graphic view, download
or distribute it.
11
12. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
3. Software Design
In the section below, we describe the design of the WSN/DTN Upper-ware platforms that will be
implemented into the system, including their feature and class diagram.
3.1. Spot Application
Below are the designed features of this application:
a. Sensing functionalities
This module handles the data collection including the temperature, humidity, battery status and time when
the data is gathered. It senses the data every 1 s and goes into sleep state.
b. Data distribution functionalities
This module handles the data broadcast operation to any Base station within the range of the Mote itself.
3.2. WSN/DTN Core-Engine Sender
Below are the designed features of this application:
a. Basic functionalities
• DTN Daemon control module
This module handles the operation to run and stop the DTN daemon from the application
• WSN Daemon control module
This module handles the socket connection to the connected Base station, read the sensor data
broadcasted by the Mote(s).
• Instruction aware module
This module handles the respond for instruction set by user trough WSN/DTN Web base GUI, which
are: the specification of WSN/DTN Gateway (DTN node name, DTN receiver name) and Start / Stop
the service (DTN sending & WSN data receiving from the mote) based on that instruction.
b. Data logging functionalities:
• Data receiving module
This module handles the operation to receive the data from the Spot Mote
• Data injection module
This module handles the data injection to the database of the WSN/DTN Gateway
12
13. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
c. Data distribution functionalities:
• Data compression module
This module handles the compression operation to the file contain WSN data before it is sent as DTN
Bundle, using simple tar.gz data compression
• Scheduler distribution module
This module triggers scheduler distributions of DTN send; using dtncp command, in every specific span
time, in this simulation it is set statically every 1 minute. This module checks if there is any new data in the
database that is not distributed yet and trigger compression module before send it as DTN bundle
• Controlled distribution module
This module response to the controlled distribution instruction from user, which is set trough
WSN/DTN Web base Admin GUI. This module checks if there is any new file created by Web base GUI
that is not distributed yet and trigger compression module before send it as DTN bundle
13
14. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
The classses diagram of the WSN/DTN Core-Engine sender is illustrated in the figure below:
Figure 2. WSN/DTN Core-Engine Sender Class Diagram
14
15. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
3.3. WSN/DTN Core-Engine Receiver
Below are the designed features of this application:
a. Basic functionalities:
• DTN Daemon control module
This module handles the operation to run and stop the DTN daemon from the application
• Instruction aware module
This module handles the respond for instruction set by user trough WSN/DTN Web base GUI, which
are: the specification of WSN/DTN Gateway (DTN node name) and Start / Stop the service (DTN
sending & WSN data receiving from the mote) based on that instruction.
b. Data distribution functionalities:
• Scheduler distribution module
This module triggers scheduler receiving of DTN receives; using dtncpd command, in every specific span
time. In this implementation it is set statically every 1-second. This module checks if there is any new file
received from other DTN node
• Un-compression module
This module handles the un-compression operation to the file received from DTN contain WSN data
c. Data logging functionalities:
• DTN File reading module
This module handles the file checking operation, whether any file received from DTN bundle received
operation, that contain the WSN data from other WSN/DTN Gateway
• Data redundancy checking module
This module checks if the data in the file received as DTN bundle is already in the WSN/DTN Gateway
database or not
• Database data injection module
This module inject the WSN data to in the WSN/DTN Gateway database
15
16. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
The classses diagram of the WSN/DTN Core-Engine Receiver is illustrated in the figure below:
Figure 3. WSN/DTN Core-Engine Receiver Class Diagram
16
17. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
3.4. WSN/DTN Web-based Admin
Below are the designed features of this application:
a. Management functionalities:
• Gateway mode module
This module enable user to set the name and mode of the gateway, either as Village (Sender) or City
(Receiver), the intended receiver of the WSN data (if the Gateway running as Sender / Village).
• Core-Engine control module
This module enable user to control the core-engine, either to operate WSN data receiving from the SPOT
motes and DTN data sending / receiving or not.
• DTN Configuration control module
This module responsible to generate new DTN configuration file based on the input of the user ans used
the gateway name as new DTN EID name, and put the receiver gateway name in the route section in the
configuration to be used in proPHET routing.
b. Monitoring functionality:
This module enable user to see the detail of the running Core-Engine, either it is as Village (Sender) or
City (Receiver), and the detail about the DTN bundle (transferred, pending, received, etc)
c. Data processing & analyzing functionalities:
• Data display module
This module enable user to see the WSN data in the table, organized based on Gateway ID and spot ID
• Graphic module
This module enable user to generate the graphs (temperature, humidity, battery level) form specific spot,
during specific range time, in specific gateway (if the gateway running as receiver, it possible to receive
data from couple gateways)
• Data download module
This module enable user to download the sensing data form specific spot, range time, and gateway
d. Data distribution functionalities:
This module enable user trigger the DTN distribution operation of specific data (specific spot, during
specific time range)
17
18. WSN/DTN Gateway
System Architecture & Requirement V1.0
!
4. References
[1] “WSN/DTN Gateway: Design of an embedded system interfacing a Wireless Sensor Network to the
world via a Delay Tolerant Network” https://www.tslab.ssvl.kth.se/thesis/node/1381
[2] Marco ZENNARO, Hervé NTAREME and Antoine BAGULA. “On the design of a flexible gateway
for Wireless Sensor Networks”. http://m4d.humanit.org/2008/images/stories/pdf/papers/a17-
zennaro.pdf Last visited - September, 2011
[3] “Condroid Project Plan”
http://csd.xen.ssvl.kth.se/csdlive/sites/default/files/projects/ConDroid%20Project%20Team%20V.1.
7.pdf Last visited - October 2011
[4] “Bytewalla 1: Implementation of Delay Tolerant Networks on the Android platform”.
http://www.tslab.ssvl.kth.se/csd/projects/092106/ Last visited – October 2011.
[5] “Security in Delay Tolerant Networks (DTN) for Android Platform - Bytewalla II”,
http://www.tslab.ssvl.kth.se/csd/projects/1011248/ Last visited – October 2011.
[6] “Bytewalla 3”, http://www.tslab.ssvl.kth.se/csd/projects/1031352 Last visited - October, 2011
[7] “Bytewalla 4: Implementation of Delay Tolerant Networks on the Android platform”.
https://www.tslab.ssvl.kth.se/thesis/node/1382 Last visited - October 2011
[8] “ALIX System Board” http://pcengines.ch/alix.htm Last visited - October 2011
[9] “SunSPOT world” http://www.sunspotworld.com/docs/index.html Last visited - October 2011
[10] VoyageOS http://linux.voyage.hk/ Last visited - October 2011
[11] DTN2 http://www.dtnrg.org/docs/code/DTN2/doc/manual/intro.html Last visited - October 2011
[12] Oracle Berkeley DB http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html
Last visited - October 2011
[13] DNSMASQ http://thekelleys.org.uk/dnsmasq/doc.html Last visited - October 2011
[14] MySQL http://www.mysql.com/products/ Last visited - October 2011
[15] Apache http://httpd.apache.org/ Last visited - October 2011
[16] PHP http://www.php.net/ Last visited - October 2011
[17] “Java development kit (JDK)” http://www.oracle.com/technetwork/java/javase/overview/index.html
Last visited - October 2011.
[18] Apache Ant http://ant.apache.org/ Last visited - October 2011
[19] Hald(8) – Linux Man Page http://linux.die.net/man/8/hald Last visited: September, 2011
[20] SunSPOT SDK http://www.sunspotworld.com/index.html Last visited - October 2011
18