Sei sulla pagina 1di 55

USMAN INSTITUTE OF TECHNOLOGY

Affiliated with NED University of Engineering & Technology, Karachi

Department of Electrical Engineering


B.E. Electrical (Telecommunication Engineering)
FINAL YEAR PROJECT REPORT

Batch-2015

SECURE COMMUNICATION OVER WIRELESS


SENSOR NETWORK USING ARDUINO

By

Madiha Yahiya Shaikh (15B -031-EL)


Asad Noor Khan (15B-149-EL)
Muhammad Mohsin Khan (15B-166-EL)
Unsa Iftikhar (15B-252-EL)

Supervised by
Engr. Muhammad Waseem Zeeshan Ashrafi

ST-13, Block 7, Gulshan-e-Iqbal, Abul Hasan Isphahani Road, Opposite Safari Park, P.O. Box 75300,
Karachi, Pakistan. Phone: 34978274-5; 34994305; 34982476; http://www.uit.edu
Secure Communication Over Wireless Senor Network using Arduino

DECLARATION

I hereby declare that this project report is based on my original work except

for citations and quotations which have been duly acknowledged. I also declare that

it has not been previously and concurrently submitted for any other degree or award

at USMAN INSTITUTE OF TECHNOLOGY or other institutions.

Student Name (Student ID): Madiha Yahiya Shaikh (15B-031-EL)

Signature: _________________________

Student Name (Student ID): Asad Noor Khan (15B-149-EL)

Signature: _________________________

Student Name (Student ID): Muhammad Mohsin Khan (15B-166-EL)

Signature: _________________________

Student Name (Student ID): Unsa Iftikhar (15B-252-EL)

Signature: _________________________

Date: _________________________

I
Secure Communication Over Wireless Senor Network using Arduino

ACKNOWLEDGEMENT

I would like to express my gratitude to all those important people who have

been a great source of guidance throughout the course of our project. We owe them a

big thank you for their unwavering support and valuable suggestions during the

implementation of our research project.

We are sincerely and deeply grateful to our honorable supervisor Engr.

Waseem Zeeshan for being the most cooperative mentor-For encouraging and

believing in us to execute our idea-For providing deep insight and great

understanding of the project. Your timely suggestions and consistent support have

helped us in providing a new perspective and has helped in enhancing our problem

solving and practical skills

Last but not the least, we want to take this opportunity to thank the Electrical

Engineering department for granting us the permission to work on our idea and

monitoring us throughout the process-To all the friends and family who appreciated

and kept us motivated through the thick and thin-To the Almighty, who made us

fortunate and capable to complete our final year project.

II
Secure Communication Over Wireless Senor Network using Arduino

SECURE COMMUNICATION OVER WIRELESS


SENSOR NETWORK USING ARDUINO

ABSTRACT

Wireless sensor networks (WSN), being an emerging technology has attracted

a lot of attention over the last few decades. It has a wide range of applications, both

in indoor i.e. (at homes and offices) and outdoor i.e. (battlefields and military

services).Hence, promising a great future and deployment in the field of mobile and

wireless communications.

Furthermore, these sensor networks act as a vital tool in the field of healthcare

for monitoring a patient’s heartbeat, pulse rate, body temperature, blood pressure etc.

However, due to the distributed nature of the sensor nodes of this network and

wireless link, makes it vulnerable to malicious attacks at different layers of

communication protocol stack. Due to this problem, the patient would not feel safe to

share their personal information, because any one can intervene and access or destroy

the data.

Hence, this is the main focus and purpose of our project-to apply cryptography

mechanism onto the acquired data and make it secure from attacks of the intruders.

In our project, we will apply encryption and decryption mechanism on such sensitive

information of the patients to avoid leakage of data for misuse. We will make sure to

provide a technique to make the transfer of data over wireless link more reliable and

safer.

III
Secure Communication Over Wireless Senor Network using Arduino

TABLE OF CONTENTS

DECLARATION ................................................................................................................................... I
ACKNOWLEDGEMENT .................................................................................................................. II
ABSTRACT ........................................................................................................................................ III
TABLE OF CONTENTS ................................................................................................................... IV
LIST OF FIGURES .............................................................................................................................V
LIST OF TABLES ............................................................................................................................. VI
MAPPING OF PROGRAM LEARNING OUTCOMES (PLOS) .................................................VII
CHAPTER#01 INTRODUCTION ................................................................................................... 1
1.1. Problem Statement .............................................................................................. 2

1.2. Literature Review ................................................................................................ 3

1.3. Aims and Objectives ............................................................................................ 4

CHAPTER#02 METHODOLOGY ................................................................................................. 5


2.1. Hardware Detail .................................................................................................. 6

2.2. Software Detail ............................................................................................ …….13

CHAPTER#03 IMPLEMENTATION .............................................................................................16


3.1. Details of Hardware Implementation ................................................................ 17

3.2. Details of Software Implementation .................................................................. 17


CHAPTER#04 PROJECT CHARACTERIZATION .....................................................................29
4.1. Results ……………………………………………………………………………………………………………..29

4.2. Analysis .............................................................................................................. 32

4.3. Conclusion ......................................................................................................... 33

4.4. Future Recommendations ................................................................................. 35

4.5. References .......................................................................................................... 37

APPENDIX A: COMPLEX ENGINEERING PROBLEM .............................................................38


Appendix A1: Range of Resources ............................................................................ 38

Appendix A2: Innovation........................................................................................... 39

Appendix A3: Level of Interaction ............................................................................ 39

Appendix A4: Consequences to Society and Environment ....................................... 40

Appendix A5: Familiarity .......................................................................................... 41


APPENDIX B: TURNITIN REPORT ..............................................................................................42

IV
Secure Communication Over Wireless Senor Network using Arduino

LIST OF FIGURES

FIGURE 2.1 ARDUINO UNO REV3 8


FIGURE 2.2 PULSE SENSOR (FRONT SIDE) 9
FIGURE 2.3 USB CABLE 2.0 A TO B 10
FIGURE 2.4 XBEE SERIES 1 PAIR 11
FIGURE 2.5 XBEE USB ADAPTER 12
FIGURE 2.6 XBEE SHIELD 13
FIGURE 2.7 ARDUINO IDE 14
FIGURE 2.8 XCTU 15
FIGURE 3.1 XCTU SOFTWARE 18
FIGURE 3.2 FLOW CHART 21
FIGURE 3.3 SELECTIVE FORWARDING 23
FIGURE 3.4 BLACK HOLE/SINKHOLE ATTACK 24
FIGURE 3.5 REPLAY ATTACK 25
FIGURE 4.1 ROUTER SIDE 30
FIGURE 4.2 ENCRYPTION SIDE 31
FIGURE 4.3 DECRYPTION SIDE 32
FIGURE 4.4 ZIGBEE MARKET TARGET 35

V
Secure Communication Over Wireless Senor Network using Arduino

LIST OF TABLES

TABLE 3-1 PULSE SENSOR PIN CONFIGURATION 17


TABLE 3-2 PARAMETER SETTING FOR CONFIGURATION OF XBEE MODULE 18
TABLE A1 RANGE OF RESOURCES 38

VI
Secure Communication Over Wireless Senor Network using Arduino

MAPPING OF PROGRAM LEARNING OUTCOMES (PLOs)

PLO-(x)-Communication
Chapters 1 through 4 and Appendix A PLO-(viii)-Ethics
& Appendix B PLO-(ix) Individual & Teamwork
PLO-(iv)-Investigation

Chapter 01- Introduction PLO-(ii)- Problem Analysis

Chapter 02- Methodology PLO-(iv)-Investigation

PLO-(iii)-Design/Development of
Chapter 03- Implementation Solution
PLO-(v)-Modern Tool Usage

VII
Secure Communication Over Wireless Senor Network using Arduino

CHAPTER#01
INTRODUCTION

1
Secure Communication Over Wireless Senor Network using Arduino

1. Introduction
In the recent years, wireless sensor network has contributed massively in the

field of electronic healthcare. These sensor nodes provide the facility to keep track of

Patient’s history and monitor their condition at all instances. Electronic health

care Systems keep on storing patient’s data accurately thus, saving them from the

hassle of carrying their previous medical record papers with them-reducing the risk

of lost paperwork or even data replication. But, maintaining a record can be very

risky because sensor nodes use wireless links which are easy to eaves drop.

Attackers can easily inject malicious content into the network and can exploit

the privacy of the patient’s data. Any outsider attack can lead to data loss and

unwanted leakage of information, which can be misused. Due to this problem, people

are reluctant to take full advantage of such devices. Hence, to provide greater secrecy

to sensitive data, it is quite important to overcome these security and privacy issues

in wireless applications. In such cases, encryption of the acquired information can

restrict the leakage of information and make it unreadable to the unauthorized users.

1.1. Problem Statement


In a wireless sensor network, the transportation of data over the air interface

or through an unguided medium, makes the data susceptible to vulnerable attacks.

To, overcome this challenge of the leakage of sensitive information, we are

implementing encryption and decryption techniques to add security to data. In other

words, the stored information will become unreadable and no one except the doctor

can access patient’s data. It will only be understood by the authorized user. Data

getting misused in the hands of wrong or malicious user will be reduced. Hence, the

security of data will increase.

2
Secure Communication Over Wireless Senor Network using Arduino

1.2. Literature Review


Wireless sensor networks (WSNs) has gained a lot of interest in research

Community, due to its broad range of applications in fields like healthcare, smart

homes, precise agricultural production, and intelligent transportation services etc.

Such networks comprise of sensor nodes which are dispersed at a certain range of

Geographical area until communication is possible. These are capable of sensing and

detecting changes in parameters like body temperature, humidity, target tracking &

surveillance, environmental monitoring etc. and then passing on that acquired data to

the neighboring nodes over a wireless link. Hence, the risk of data getting leaked

increases due to the wireless link.

So in order to increase the reliability of data, it is important to encrypt it and

make it unreadable. Also one should be able to differentiate between correct and

incorrect examination. If the data received by sensor is faulty or incorrect because

perhaps the third party might have intervened and altered the data so, it may lead to

wrong or improper diagnosis. The integrity and reliability of the data would be at

stake. Such fabrication in the data might lead to unfitting diagnosis and user’s health

might be in some serious danger. Hence, in order to extract full advantage and

benefits out of this technology for medical usage, the degree of inaccuracy in the data

should be reduced. This technology will be successful and popular among masses if

security and privacy issues are considered.

We study following links for literature review

https://www.digi.com/

https://www.sparkfun.com/

3
Secure Communication Over Wireless Senor Network using Arduino

1.3. Aims and Objective

The aims and objective to implement this project for the following reasons;

 To improve the security and privacy issues of wireless sensor network

in medical and healthcare department.

 To prevent altering of data and third-party intervention-increasing the

reliability and privacy of sensitive data.

 To develop algorithm and encryption mechanism to withstand

outsider attack that threatens the data integrity and security.

 To counteract the intruder invasion in order to prevent leakage of

information.

4
Secure Communication Over Wireless Senor Network using Arduino

CHAPTER#02
METHODOLOGY

5
Secure Communication Over Wireless Senor Network using Arduino

2.1. Hardware Detail


In this chapter we will discuss hardware components required in the

implementation of our project.

2.1.1. Arduino Uno Rev3

It is a single board microcontroller which is built on a printed circuit board.

This board offers a package of useful features which includes a microprocessor,

clock generator, I/O ports, RAM, supported ICs, built-in stored program memory.

The sole purpose is to create ease for the application developers to spend less time

and effort on designing the hardware and to gain hands on experience. These low-

cost microcontrollers prove extremely useful for education purpose.

An Arduino board contains the following specifications:

 Microcontroller-ATmega328p

 16-Megahertz Crystal oscillator/Clock speed

 Operating Voltage is 5 Volts

 Input Voltage ranges between 7 to 20 Volts

 Input and digital output pins x14 (Digital)

 Input pins x6 (Analog)

 40mA Current (DC) for every input and output pin

6
Secure Communication Over Wireless Senor Network using Arduino

 50mA Current (DC) used for the 3.3V Pin

 ATmega328 has a flash memory of 32 KB, 0.5KB of the 32 KB is

consumed by the boot loader.

 1 Kilo Byte EEPROM (ATmega328)

Languages like C and C++ can be used to write a program or sketch in

Arduino IDE, which is later compiled to produce binary machine code for the

connected hardware.

Thus Arduino’s Integrated Development Environment (IDE) provides

language processing and its editor offer features like cutting, pasting, searching,

correcting wrong text, syntax highlighting, and tool bar, message writing area and

finally uploading the program for the output processing. These sketches are saved as

an extension file .ino.

7
Secure Communication Over Wireless Senor Network using Arduino

Figure 2.1 Arduino Uno Rev3

2.1.2 Pulse Sensor

Pulse sensor amped designed for Arduino, solved the problem of accurately

measuring patient’s heartbeat, which previously was categorized as a tedious task to

detect. This sensor offers an opportunity to achieve live or real-time heartbeat. Its

internal design comprises of an inbuilt amplification circuitry, a noise eliminating

circuitry and a heart rate sensor (optical).Thus providing quick and reliable readings.

Being a plug and play sensor, it requires very minimal amount of current of 4mA and

an operating voltage of +5V or +3.3V. The sensor has two sides i.e front and back

side. The front side of the sensor contains an LED which needs to be placed over a

vein of either your fingertip or earlobe of a human body, while plugging the other

ends (3 pins) to the Arduino. Blood flow in these veins indicates a beating heart and

will help monitor heart rate. Its simplicity in terms of its usage makes it easier for

students, artists, athletes, gamers & mobile developers to incorporate it in their lives

to keep a check of their live heart rate for either personal use or their projects.

Pulse sensor has a wide range of applications which includes:

 Sleep Tracking

8
Secure Communication Over Wireless Senor Network using Arduino

 Anxiety monitoring

 Remote patient monitoring/alarm system

 Health bands

 Advanced gaming consoles

Figure 2.2 Pulse Sensor (Front side)

2.1.3 USB Cable 2.0 A To B


USB 2.0 –also known as High speed USB is basically a Universal Serial Bus

Standard, having the ability to transmit data at the rate of 480 Mbps/max. Being an A

To B type connector means that one can find Type A port plugged into the host or

Laptop or PC and Type B connector inserted into the mobile, printer or hard drive.

9
Secure Communication Over Wireless Senor Network using Arduino

These are also easily compatible with a great number of SFE designed USB boards,

just like USB Arduino board in this project.

Figure 2.3 USB Cable 2.0 A To B

2.1.4 XBEE Series 1 Pair


XBee 1mW Chip Antenna - Series 1 (802.15.4) operates within the ISM band

of 2.4GHz having a data rate of 250Kbps.This RF module was designed to meet

802.15.4 Standards and to cater the need of a low cost, minimal power, reliability of

Data between devices, flexible, low latency and for quick, robust communication. RF

Modules are ideal for applications requiring predictable communication timing. An

Xbee being a wireless component has the capacity to act both as a transmitter and

Receiver. These modules can be deployed in different network topologies like in the

Form of mesh network, multipoint/star configuration with the help of large number

of Xbees or simply a point to point, peer to peer network where data is sent between

Two Xbees. Hence it is best for serial communication between microcontrollers.

10
Secure Communication Over Wireless Senor Network using Arduino

Figure 2.4 XBEE Series 1 Pair

2.1.5 XBEE USB Adapter


XBee Adapter can be a compact USB to serial adapter equipped with XBEE

(20pin 2.0mm) sockets. On the other hand, you'll connect

Your laptop to various wireless applications via the XBEE compatible modules.

The Adapter may support XBee interface. The key feature of this board is single chip

USB to asynchronous serial data transfer interface, Entire USB protocol handled on

The chip – want No firmware programming, 5V Single supply Operation and

Compatible with 3.3V/5V operation voltage, USB 2.0 Full Speed compatible, with

Xbee.

The usage of the adapter is:

 PC through a USB cable directly connected with XBee adapters.

 Bluetooth Bee set up or use as a data-transmission.

 Programmer for Arduino and compatible boards.

11
Secure Communication Over Wireless Senor Network using Arduino

Figure 2.5 XBEE USB Adapter

2.1.6 XBEE Shield


The shield helps in wireless communication between Arduino boards over

XBEE module. It can directly be mounted onto your UNO board. It offers a

Range of communication of maximum 100 feet (indoor) and 300 feet (outdoor). The

DIN and DOUT, being two serial pins of XBEE can be connected to either UART

pins or any other digital pin available on the Arduino board. These are connected by

the switch, determining which connection needs to be chosen. Any digital pin on the

Arduino board i.e. D0 or D1 can be used for this connection. Multiple LEDS present

determines the level of power with respect to the activities occurring on the

DIN/DOUT pins. Some other features include 3.3V power regulation, 9x11 grid of

0.1" spaced prototyping holes, reset button, MOSFET level shifting on-board.

12
Secure Communication Over Wireless Senor Network using Arduino

Figure 2.6 XBEE Shield

2.2. Software Detail

2.2.1. Arduino IDE

The Arduino Integrated Development Environment is an application which is

developed with the aid of JAVA programming language and is compatible with

Windows, MAC and Linux. This software is used to write sketches which are

programs that help in connecting the software and hardware of Arduino. These are

saved as text files in hexadecimal encoding with an .ino extension. This application

offers has a code editor which provides multiple features like text pasting and

cutting, searching and replacing text, syntax highlighting, identifying errors. It

further provides the advantages of automatic indenting; braces matching and has a

one-click mechanism of compiling and uploading a program. The editor where the

user writes the code contains a message area, text console and toolbar with multiple

menu functions. We can use any of the programming languages like JAVA, C, C++

keeping in consideration that a certain coding structure or pattern has to be followed.

13
Secure Communication Over Wireless Senor Network using Arduino

The Arduino has a software library in its package which provides many basic

short, written programs for newbie’s that can be uploaded by the loader onto the

board’s firmware. It is flexible from an aspect that it supports 30 languages with

English being the default language.

Figure 2.7 Arduino IDE


2.2.2 XCTU

XCTU is an application designed to aid developers to interact with digital

radio frequency modules via a graphical user interface. This software contains tools

to help users to easily setup and initialize XBEE module. Configuration and testing

of XBEE modules can also be performed for the transmission of data. Thus all the

necessary tools for a developer are available to quickly setup and run the XBEE.

The XBEE’s connected to the PC with the help of XBEE explorer needs this

software XCTU for communication. It further provides amazing features like

graphical network in order to graphically represent XBEE network coupled with

signal strength of every single connection. An API frame builder helps in interpreting

API frames which are required by XBEE in API mode. Also there are more unique

attributes like several radio frequency devices can be simultaneously configured and

14
Secure Communication Over Wireless Senor Network using Arduino

managed. The setting of the modules can be restored. Sessions can be saved and

opened later when required using XCTU.API and AT consoles are used specially for

radio device communication.

Figure 2.8 XCTU

15
Secure Communication Over Wireless Senor Network using Arduino

CHAPTER#03
IMPLEMENTATION

16
Secure Communication Over Wireless Senor Network using Arduino

3.1. Details of Hardware Implementation


For hardware implementation there are three stages. Firstly, XBEE USB

adapter has to be connected to the laptop and with the help of XCTU software it

needs to be configured in AT mode. Once the XBEE’s are configured, next burn the

Arduino code at both the coordinator and end device node. Next the USB adapter

will be placed at the top of XBEE shield which in turn is placed at the Arduino.

Lastly, insert the connections of pulse sensor into the XBEE shield as mentioned in

the table below. Finally wrap the sensor around your finger and note the pulse.

Table 3-1 Pulse sensor pin configuration


Pulse Arduino
Sensor Pins Pins

+ +5v

Ground
-
Pin

Arduino
S
A0

3.2. Details of Software Implementation


Following are the two stages involved in the software implementation

process:

1) Configuration of the XBEE module mesh network using XCTU

2) Development of the cryptographic code on Arduino

17
Secure Communication Over Wireless Senor Network using Arduino

Figure 3.1 XCTU software

Three XBEE’s are used which are configured as router, coordinator and end

device using XCTU. They are arranged in a mesh topology. Following parameters

need to be set in order for the network to be functional.

Table 3-2 Parameter setting for configuration of XBEE module

Parameters Coordinator Router End device

PAN ID 3975 3975 3975

Channel C C C

DH 0 0 0

DL FFFF FFFF FFFF

Mode AT AT AT

18
Secure Communication Over Wireless Senor Network using Arduino

Coordinator Coordinator End Device End Device


Enable

End Device 0010B ---- ----


Association

Coordinator ---- ---- 010B


Association

3.2.1 Setting the parameters for configuration of XBEE modules using XCTU

3.2.2 Pan ID

It stands for Personal Area Network Identifier. It is a unique number assigned

for the identity of a Zigbee network. This number helps in differentiating or

separating two wireless sensor networks operating in the same range. PAN ID is kept

same for the coordinator, end device and router. This will help reduce the risk of

intruders intercepting the network or eavesdropping on the conversation. AT

command can be used to assign a PAN ID to mesh network.

3.2.3 Channel

We have set the channel to ‘C’ which represents a unique frequency band

over which the data will flow in a network. Mostly XBEE operates at 2.4GHz

802.15.4 band. Every element added into the wireless sensor network must be set at

the same channel for them to operate properly.

3.2.4 Destination Addressing

DH and DL parameters represents destination high and low address. The

address of DH follows its default configuration i.e. 0. For the implementation of

mesh network, we need our XBEE modules to be in broadcast mode. The frames

would be forwarded to all nodes of a network. Hence same DL value which is FFFF

19
Secure Communication Over Wireless Senor Network using Arduino

(16-bit address) is assigned to each node. By setting all these parameters a

coordinator can broadcast the data from the router to the end device.

3.2.5 Selection of Mode

XBEE can work in two modes. API (Application Programming interface) and

AT (Transparent) mode. In this project we will be performing simple and quick data

communication over AT mode. Users can easily configure the modules in this mode.

Unlike AT mode, for large scale WSN networks we may use API mode.

3.2.6 Coordinator Association and End Device Association

The parameters to create an auto end device association, the coordinator is set

at this address of 0010B.Similarly,Xbee end devices are set to 010B to have an auto

coordinator association. This enables proper console communication to take place

between the three XBEE’s.

3.2.7 Cryptographic Arduino code for secure WSN

In this project we are using a pulse sensor which is responsible for collecting

real time pulse data of a person. By placing and XBEE shield on top of an Arduino

board, one can retrieve data from pulse sensor chip. We will place this combination

of Arduino plus XBEE shield at both the end device and coordinator side so that we

could upload the decryption and encryption codes respectively at both ends. The

coordinator will collect real time data and will encrypt it for it to be transmitted

wirelessly over the XBEE. Moreover, the encryption code is much more complex

and lengthier than the decryption one as it is offering two functions. Firstly, it checks

whether the pulse sensor is working or not. Secondly, it detects a heartbeat and

arranges this raw data from the pulse sensor into human readable form. Later on

encryption algorithm is applied where each character is shifted forward by 10 i.e.

20
Secure Communication Over Wireless Senor Network using Arduino

following its logical operation of XOR with ten spreading. This encrypted data is

next sent to the router, which cannot alter or manipulate data. Lastly, at the end

device decryption is done. The BPM string value which was obtained by converting

the integer data into string data is now reverted back at this node. Shifting the data

back character wise. This decrypted data is displayed serially on the output node

screen of the laptop.

Following are the flow charts involved the process of this project.

Coordinator as Encryption node

 Collects raw data k


from pulse
sensor

 Sorts raw data

 Applies Encryption
Algorithm on sorted data

Router

 Can’t decrypt data so


either drop
it or forwards it to next Wireless Sensor
module via the WSN Network

End device as Decryption node

 Sending Received data to


Arduino module

 Applying Decryption to
received data

 Sending Decrypted data to


Serial port

21
Secure Communication Over Wireless Senor Network using Arduino

Figure 3.2 Flow Chart

3.2.8 Security Problems

Security issues are one of the major limiting elements in wireless sensor networks.

Research and studies are still being conducted related to this topic. Following are

some of the issues faced:

Observing and Eavesdropping on Patient Vital Sign:

The data and all the information referring to the patient's health is collected with the

help of a sensor. This sensor passes this information through fully completely

different connections through the web before it arrives at its final destination. This

wireless transmission raises a spread of privacy issue. A hacker or unauthorized

user will listen and will either listen or build modifications to the data being

transferred. The data is intercepted by the hacker from that they'll notice the patient

and physically damage them.

Denial of Service Threats:

It is a sort of attack that weakens or damages the approved use of the network

by overwhelming the

specified resources like central process unit, bandwidth and different relevant

resources. It will even overload the network that is undesirable.

3.2.9 Routing Threats

Attacks on the network layer are known as routing attacks or routing threats. Some

common routing threats are listed below:

Attack on Data in Transit:

22
Secure Communication Over Wireless Senor Network using Arduino

In the specific case of a wireless sensing element network, the sensors monitor

variation occurring in applicable and relative parameters; these changes

are according to the sink node as per demand. throughout the method of sensing the

report, the knowledge that is in transfer could bear bound changes due

to being totally different, being spoofed or due to disappearing. A

Wireless sensor Network is at risk of eavesdropping, such an attack can monitor the

flow of the information traffic or the network traffic and can so realize the simplest

way to gain access to the network and may somehow interrupt, steal, alter or add

entirely new packets to the first stream.

Selective Forwarding:

This is categorized as an insider attack. A lot of refined from this attack is once the

opponent selectively forwards packets. The opponent is in a position to form routing

loops that attack or repel network traffic. They can also extend or

shorten supply routers, generate incorrect messages and try to drop sensitive info. A

malicious node will refuse to forward the packets haphazardly. For this reason, the

base station doesn't receive the total or complete message.

Figure 3.3 Selective Forwarding

23
Secure Communication Over Wireless Senor Network using Arduino

Source: https://www.researchgate.net/figure/Selective-Forwarding-

Attack_fig9_221864714

Black hole/Sinkhole Attack:

In sinkhole or black hole attack, the intruder can attempt to sink all

the helpful knowledge and data by attracting the neighbors. once attracting the

neighbors, it establishes a route for the attacker node. Figure 2.2 illustrates a natural

depression attack. If the intrusion is undefeated, the network is exposed to a

range of alternative threats also that is unwanted. These

attacks aren't simply detected, therefore, it's best they're avoided.

Figure 3.4 Black hole/Sinkhole Attack

Source: https://www.semanticscholar.org/paper/Detecting-sinkhole-attack-and-

selective-forwarding-Tumrongwittayapak-

Varakulsiripunth/8cfc29f057ce21babd4586233683715149b95b6d

24
Secure Communication Over Wireless Senor Network using Arduino

Replay attack:

A replay attack could be a variation of routing attacks, Fig 2.3 demonstrates a replay

attack during which the transmission of valid or correct knowledge is continual and

delayed maliciously. Replay attack is enforced either by the creator or is intercepted

by an intruder or attacker who after intercepting retransmits it. Moreover,

the attacker makes a replica of packet that was antecedently forwarded, the copies are

sent out over and yet again to wear out the system.

Hence, lowering the system’s overall performance.

Figure 3.5 Replay Attack

Source:

https://www.computer.org/csdl/magazine/pc/2008/01/mpc2008010074/13rRUxcKzX

25
Secure Communication Over Wireless Senor Network using Arduino

3.2.10 Privacy Issues

Along with security problems, privacy in attention applications is additionally a

big issue that ought to be examined thoroughly. The health knowledge that's to be

transmitted is usually non-public. Wirelessly inflicting the patient's data from one

purpose to a special is subjected to variety of privacy threats.

The issues associated with privacy are charted into six main classes.

These problems are medical standing misuse, prescription outpouring, social

implications for the patient and patient difficulties in managing privacy. It's not able

that there's a comprehensible lack of support and contemplation given to form such

applications kind of the user's privacy.

Two of these are briefly discussed below:

Misuse of Medical Information:

As the technology being employed can use wireless transmission to transmit and

receive the info, it reveals the chances to variety of attacks and

threats like eavesdropping. As a result, the intercepted patient's info is also utilized

by an unauthorized user which may cause serious hurt to the patient.

Leakage of Prescription:

Healthcare systems are used primarily for the operate of observation the

patient's information and storing the data into

an information. while this data isn't enough to spot a patient identify, there's an

opportunity that a hacker might use this data together

with different information out there on the web to spot the person and get in touch

with them and check out and sell them unprescribed medicine.

26
Secure Communication Over Wireless Senor Network using Arduino

Normally, a little variety of individuals are going to be accessing the data like the

doctor and nurses so limiting the users, which might be useful. Furthermore, putting

forward strict rules and guidelines on who can and cannot access the patient's data

and information may also help in reducing the risk factor regarding privacy. Just in

case of emergency it should be doable that access is often given to others so a lot

of people will facilitate the patient in want of help. The system ought to be created

versatile and therefore the users should be able to balance and compromise.

As antecedently declared, it's important that strict rules be set so the

users keep responsive to the results of mishandling the info as an alternative the users

may disregard the patient and therefore the issues which will be created within

the patient's life.

3.2.11 Implementation Challenges

In a wireless device network it's needed that the scale of the node being

employed is unbroken small. A node comes with restricted capabilities

and options thanks to that coming up with a wireless device could be

a tough task. Together with the scale of the node, a relevant routing

protocol must be enforced that furthermore are going to be in command of the

transmission of the info from one purpose to a different. Another main challenge is

that the battery, small node limits the scale of the battery of the

system, creating system energy economical is one in all the foremost tough tasks to

beat. Some of the limitations are discussed below:

Precision and Consistency:

For responsibleness, the information provided by the

27
Secure Communication Over Wireless Senor Network using Arduino

sensors should be extremely correct. These nodes should have the ability of

providing the proper and precise info related to the patient in real time - with no

delay, failure associate in treatment do therefore might cause an

incorrect diagnosing, within the worst-case situation, might end in the patient's death.

Background Awareness:

The sensors should have the potential of modifying and upgrading themselves

according to the case of the user.

Compatibility and Effective Reply:

The main reason for pairing wireless sensor networks with tending applications

is to boost the already utilized health care services and to create it technology

that can be simply employed by the involved demographic.

For treatment, it's essential that the device responds as with efficiency as potential. If

the device isn't economical and takes plenty of time to method and reply to the

request, the patient could need to face serious issues

Power Constraints:

As expressed before, creating an energy economical device could be a serious

challenge. In healthcare applications, the nodes are needed to endlessly monitor the

patient which requires lots of battery life. This downside will be eliminated by

implementing a protocol that focuses on economical usage of energy. in step with

studies, the transmission power of a wireless radio is proportional to distance

squared or perhaps a lot of within the presence of obstacles.

Error Lenience:

It is vital that the designed network is error lenient. Just in case of failure of any one

node, the whole network must not break down.

28
Secure Communication Over Wireless Senor Network using Arduino

CHAPTER#04
PROJECT
CHARACTERIZATION

29
Secure Communication Over Wireless Senor Network using Arduino

4.1. Results
The main purpose of the project was to send encrypted data from source to

destination node in a mesh network topology. We created a wireless sensor network

using Xbee devices for healthcare purpose to provide pulse monitoring. Three nodes-

coordinator, router, and end device were used to achieve our desired output.

For our first node i.e. the coordinator, an Xbee shield was sandwiched

between Xbee Module and Arduino UNO R3.Real time data was collected from the

sensor and encryption was done.

For our second node i.e. the router only an Xbee shield was used since no

code was required to be uploaded. The scrambled data was as it is forwarded from

the coordinator to router.

For our third node i.e. the end device we uploaded the decryption code in

order to obtain the real numbers of patient’s pulse.

Hence, we were able to observe the desired output of receiving secure data without

any delay over this mesh network.

Figure 4.1 Router Encrypted Output

30
Secure Communication Over Wireless Senor Network using Arduino

Figure 4.2 Coordinator Encrypted Output

31
Secure Communication Over Wireless Senor Network using Arduino

Figure 4.3 End Device Decrypted Output

4.2. Analysis
Our project definitely holds great future potential. In the western world there is

a concept of mobile-health, where doctors can keep a track of their patient’s glucose

level, blood pressure, body temperature and weight in case the patient is unable to

pay a visit at the hospital due to their busy schedule .Both the doctor and patient can

keep in touch with each other any time, any place and the data can be collected and

sent privately via an online service system .Likewise this sensor technology can also

be deployed in Pakistan as well to make the lives of patients easier.

Secondly, these sensors can be converted into portable gadgets like vital

jackeT which has embedded detectors for ECG, heart rate, oxygen, body temperature

32
Secure Communication Over Wireless Senor Network using Arduino

in its jacket. These wearable jackets will be responsible to transmit data regardless of

the location or busy schedule of the patient.

Moreover, there are other wearable technologies like Qardiocore and MiniMed 530G

system. If proper money is invested in the future, then these wearable technologies

can prove out to be a shortcut for patients and save them from delaying their

checkups. Like QardioCore being an ECG monitor, can be strapped around the

patient’s chest and real time monitoring is sent via an android/IOs software or

Bluetooth. Similarly, MiniMed is for the diabetic patients monitoring their glucose

level.

Hence, there is great future potential for this portable and wearable sensor

technology in the healthcare field if proper investment is done.

4.3. Conclusion
We chose the best suited technology i.e. Zigbee technology to implement a

wireless sensor mesh network. Zigbee Technology is low-cost and requires low

battery powered devices. Hence, it was the most apt option to execute this kind of

network architecture. It provided us the ease to carry out our project under an

unlicensed band of 900MHz.This packet-based radio protocol is perfect for secure,

reliable wireless mesh networks.

Moreover, at the encryption and decryption node, a low-level spreading and

shifting technique is used so as to reduce the complexity and limit the size of

encrypted data. Thus, the transmission of real time data will occur without any delay.

In this time span we did face some problems and challenges as well in our

project. For example, the biggest constraint was the limited battery power of sensor

node. The functionality of the system was directly dependent on the lifetime of the

33
Secure Communication Over Wireless Senor Network using Arduino

battery. Amount of power supply and device energy consumption defines the

efficiency and durability of the system.

Secondly, there were limited computational power and memory size

constraints. Since limited amount of power was being received, hence fewer amounts

of data were stored on each sensor node. Thus, minimal amount of records were

maintained.

Thirdly, we needed to guarantee that the network does not stop working if in

case anyone of the devices fails to work. Network should be robust. Its performance

should not degrade, and it must carry continuous operation regardless of the

performance of other devices. The failure of one node should not impact the whole

network. The system operates in full swing when surrounding environmental

conditions are good, but the rate of failure increases as the conditions becomes worse

and harsh. Hence, the solution to this problem is to distribute the network and each

sensor should have the authority to access the network.

Lastly, there are regulatory requirements needed to be met before a medical

device is dispatched. While testing this prototype on a human being or an animal, it

should be ensured that it fulfills all the basic requirements and is not harmful in any

manner. It should be taken into consideration that these wireless sensors when

implanted or touching our skin should be safe for our body.

All in all, this project can be of great help for people who cannot go for daily

checkups. Regular monitoring of different health related parameters at your home

can provide great ease to the patients. Doctors being on the receiving end will receive

the encoded data and they can keep track of the patient’s health condition.

34
Secure Communication Over Wireless Senor Network using Arduino

Figure 4.4 ZigBee Market Target

4.4. Future recommendations


 We can use a more complex and secure algorithm to increase the privacy

of the transmitted data.

 We need to maintain a balance between the complexity of algorithm, size

of encrypted data, time delay in its transmission while applying latest

cryptographic techniques on real time data

 It can be installed in remote areas as it is a cheaper and faster solution to

maintain communication between patient and doctors in emergency

situations.

 We can expand the storage capacity of the network by including cloud

database to maintain patient’s history.

 We can add a feature of user authentication and authorization keys to

increase the security of project.

35
Secure Communication Over Wireless Senor Network using Arduino

 Apart from pulse monitoring, more parameters can be added like glucose

level, body temperature, blood pressure monitoring can also be included.

It will convert it into a device offering multiple features.

 This project is a small-scale version of WSN and can be implemented in

building for instant health tests.

36
Secure Communication Over Wireless Senor Network using Arduino

4.5. References
[1] “Zigbee based wireless sensor network and performance analysis in various environments.”
Helmy Fitriawan ; Misfa Susanto ; Ahmad Surya Arifin ; Danny Mausa ; Agus
Trisanto2017 15th International Conference on Quality in Research (QiR) : International
Symposium on Electrical and Computer Engineering.

[2] “Wearable and Implantable Wireless Sensor Network Solutions for Healthcare Monitoring.”
Darwish, A. & Hassanien, A., 2011.

[3] “Zigbee network for remote patient monitoring on general hospital wards”, Yuanlong
Liu ; Reza Sahandi.

[4] “Secure Wireless Sensor Networks: Problems and Solutions.” Hu, F., Ziobro, J., Tillett, J. &
K.Sharma, N., n.d.

[5] “Performance Analysis of“Zigbee based wireless sensor network for Remote Patient
Monitoring.” Rinki Sharma ; Shreyas K. Gupta ; K.K. Suhas ; G. Srikanth Kashyap 2014
Fourth International Conference on Communication Systems and Network Technologies.

[6] “Social Issues in Wireless Sensor Networks with Healthcare Perspective.” Kwak, K.-s. &
Ameen, M., n.d

[7] “A Survey: Security Issues and Design Challenges in Healthcare Monitoring System using
Wireless Sensor Network.” Roseline Mary J, L. & M, B., 2011.

[8] A survey on security issues and wearable sensors in wireless body area network for
healthcare system Ibrahim Abdulai Sawaneh ; Ibrahim Sankoh ; David Kanume Koroma

[9] Neves, P., Stachyra, M. & Rodrigues, J., 2008. "Application of Wireless SensorNetworks to
Healthcare Promotion." Journal of communications and software and systems, vol 4.

[10] "A Review of Wireless Sensor Networks: Applications, Challenges and Prospects in
Biomedicine.” R.Bassey, I. & P., E., n.d.

[11] "ZigBee based wireless sensor networks and their use in medical and health care domain
Zhongwei Zhang ; Xiaohu Hu

[12] “Personal wireless sensor network for mobile health care monitoring.” S. Kroc ; V. Delic.

[13] “Wireless Sensor Networks for Home Health Care.” Chris R. Baker ; Kenneth
Armijo ; Simon Belka ; Merwan Benhabib ; Vikas Bhargava ; Nathan Burkhart.

[14] “A Remote Health Care System Based on Wireless Sensor Networks. ”Peng Zhang ; Ming
Chen

37
Secure Communication Over Wireless Senor Network using Arduino

[1] APPENDIX A: Complex Engineering Problem

[2] Appendix A1: Range of Resources

Table A1 Range of Resources

Human Resources  Dividing the work according


to the skills of every member
and defining roles and
schedule of tasks to be
achieved.

 We bought our project’s


hardware from a shop near
Sir Syed University and from
Cooperative market in
Saddar.

Technical Resources  We used Arduino IDE


software to program the
sensors to interface with
zigbee module.

 Configuration of coordinator,
router and end device.

 Testing of Zigbee Modules.

Literature Support  Books from library to learn


Arduino programming and
understanding the basics of
WSN’s have been used.

 Cryptography and Network


security by William stallings
& Arduino for dummies by
John Nussey.

38
Secure Communication Over Wireless Senor Network using Arduino

[3] Appendix A2: Innovation

In sensor network data is send from source to destination over a protocol but

in this project, the innovation is we introduce router as a third node which act

as an attacker, intruder which is beneficial for security reasons. In wireless

communication, chances of interference are more so security, cryptography

essentials are added in this project for secure communication. It’s a wireless

health communication service which is helpful for patients who lives in

remote areas.

[4] Appendix A3: Level of Interaction

In this project our major focus was on secure communication and forming a

wireless sensor network.

Firstly, through this project, we learnt about the Zigbee radio packet protocol

which is a vital tool in telecommunication. Its range of communication and

baud rate helped us in understanding its efficiency and compatibility in

acquiring real time data from different sensor nodes.

Secondly, encryption mechanism had to be chosen wisely.8 bits can be

transferred via zigbee S1.Since; recent cryptographic algorithms like AES are

of 16 or 32 bits. So, it was a challenge for us to keep a balance between the

size of the data and the complexity of the encryption algorithm. Hence, we

selected a simpler algorithm of caeser cipher because it will fulfill both the

features of security and required size of data.

39
Secure Communication Over Wireless Senor Network using Arduino

Thirdly, the selection of Arduino was also a technical choice because we

wanted to implement a small-scale wireless sensor mesh network which

would be compatible with zigbee.

[5] Appendix A4: Consequences to Society and Environment

This era is all about wireless communication technologies and protocols.

Similarly, the concept of E-health is also getting quite a lot attention.

In case there is no one at the home to take the patient for a checkup urgently,

then in that case secure communication via zigbee will prove helpful. It will

save the time of people from regularly going out and waiting in long queues

for their turn for a checkup. Patient and the doctor can always keep in contact

with each at every instant.

Moreover, since this interaction will be secured by encryption so chances of

people intervening their private information will be reduced. Patients can

communicate with their physician through a cheaper and faster channel.

This type of network is suitable for people living in remote areas like on

mountains, villages, forest to maintain a contact with a doctor within their

range. Also this system is wireless, so it saves people from the hassle to

deploy a huge wired network and is simple to use.

Being a low cost and low powered technology it will be convenient for the

patients to afford it and can become a high selling future product. It can

become a complete a package if various other parameters like body

temperature sensing, glucose level, blood pressure are added. Overall, body

monitoring will become possible through one device.

40
Secure Communication Over Wireless Senor Network using Arduino

[6] Appendix A5: Familiarity

Definitely, our final year project was a gateway towards having hands on

experience about latest wireless technologies. It gave us a new level of

understanding about finding apt solutions for the proposed problem and

fulfilling the goals in required time duration.

Initially, the decision of whether we should go for a simpler and older or a

latest and stronger encryption mechanism keeping in mind that the size of

data that zigbee supports must not exceed. It was a tough decision to go for a

cryptographic mechanism that would not pile up the data more than 8 bits. As

our zigbee module is limited to transferring that size of data only.

Secondly, the selection of zigbee protocol over others was also a critical

point. We were not required extremely high data rates as we do not need to

sense after every milli or microsecond. Hence, we as team decided to select

a protocol with lower data rates.

Next step of learning was the arduino programming. Interfacing of Zigbee

modules with sensors with the aid of coding was yet another hectic task. But

our team members along with the guidance of our supervisor were able to

accomplish this task.

41
Secure Communication Over Wireless Senor Network using Arduino

APPENDIX B: TURNITIN REPORT

42
Secure Communication Over Wireless Senor Network using Arduino

43
Secure Communication Over Wireless Senor Network using Arduino

44
Secure Communication Over Wireless Senor Network using Arduino

45
Secure Communication Over Wireless Senor Network using Arduino

46
Secure Communication Over Wireless Senor Network using Arduino

47

Potrebbero piacerti anche