SlideShare a Scribd company logo
Monitoring and Surveillance using Near
Field Technologies for the Gov. of India
A PROJECT REPORT
Submitted by
Kayewan Mehernosh Karanjia
Reg. No. 14MCA1012
in partial fulfillment for the award of the degree of
Master of Computer Applications
School of Computing Science and Engineering
VIT University
Vandalur - Kelambakkam Road, Chennai - 600 127
April - 2016
School of Computing Science and Engineering
DECLARATION
I hereby declare that the project entitled Monitoring and Surveillance using
Near Field Technologies for the Gov. of India submitted by me to the School of
Computing Science and Engineering, VIT Chennai, 600 127 in partial fulfillment
of the requirements of the award of the degree of Master of Computer Applica-
tions is a bona-fide record of the work carried out by me under the supervision of
Dr. Hepsiba Mabel V.. I further declare that the work reported in this project,
has not been submitted and will not be submitted, either in part or in full, for the
award of any other degree or diploma of this institute or of any other institute or
University.
Place: Chennai Signature of Candidate
Date: (Kayewan Mehernosh Karanjia)
School of Computing Science and Engineering
CERTIFICATE
This is to certify that the report entitled Monitoring and Surveillance us-
ing Near Field Technologies for the Gov. of India is prepared and submitted
by Kayewan Mehernosh Karanjia (Reg. No. 14MCA1012) to VIT Chennai,
in partial fulfullment of the requirement for the award of the degree of Master
of Computer Applications is a bona-fide record carried out under my guidance.
The project fulfills the requirements as per the regulations of this University and
in my opinion meets the necessary standards for submission. The contents of this
report have not been submitted and will not be submitted either in part or in full,
for the award of any other degree or diploma and the same is certified.
Guide/Supervisor Program Chair
Name: Dr. Hepsiba Mabel V. Name: Dr. Pattabiraman V
Date: Date:
Examiner Examiner
Name: Name:
Date: Date:
Monitoring and Surveillance using Near Field Technologies for the Gov. of India iii
Abstract
The purpose of this project is to develop new services to enhance and make the
Mobility Platform Services Platform better.New technologies and features like
NFC, Maps, Crowd Sourcing , Real Time Charts, Dynamic Front End Design-
ing, etc are developed and made available.The system will mostly be focused on
empowering the NFC technology and manage the RF tags, which will be NFC
enabled through mediums like cards, mobile devices or a NFC reader. We indent
to use Geographic tags and Maps API to track and monitor various entities and
personal.The NFC Technologies will also work even when there is no power or
battery backup to a device. For E.g. Even if the phone with the NFC emulator
is switched off due to low battery but I can still receive and transmit data without
power supply.NFC cards which will be encrypted and can be distributed to the
specified personal or entities. These cards can then be read using a mobile device
or a NFC reader, the time and date of the recording and the geographical tags will
be sent to the server or cloud using a data enabled mechanism.These services can
be integrated to any of the existing applications and can retrieve as well as provide
various sets of information and data which can be of the at most importance to the
Indian Government for the purpose of E-Governance and many other processes.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India iv
Acknowledgement
I express my gratitude to Almighty God, my parents, other family members and
friends without whose uncontained support I could not have made this project.
I wish to place on my record my deep sense of gratitude for my project guide
and mentor, Dr. Hepsiba Mabel, for her constant motivation and valuable help
through the project work.
I am forever indebted to Mr. V.S. Raghunathan, Sr. Technical Director (National
Informatics Center, Tamil Nadu) for giving me a chance to work under him and
enlightening me with his valuable counsel and advice through my term at NIC,
for allotting me the project of my choice and for appointing me at the right place
and under the best superiors.
I thank my Program Chair Dr. Pattabiraman V., School of Computing Science
and Engineering and Dean Dr. Jeganathan L., School of Computing Science and
Engineering for always guiding me on the right path and helping overcome all the
barriers in my path to success. My sincere gratitude to our project coordinator
Dr. Nithyanandam P.,Professor,School of Computing Science and Engineering
for managing out project process in the best possible way.
I also thank all other faculties at VIT University who have helped to make me a
better professional and for guiding me in every way, especially Dr. Geetha S. for
her counsel and motherly love and affection whenever it was needed by me.
I would also like to thank Mr. Dinesh Vasan,Senior Developer NIC for always
helping me with my errors and counseling me whenever I was stuck and for pro-
viding guidance whenever required.
Finally, I would like to thank everyone who has helped me directly or indirectly
to complete this project
Kayewan Mehernosh Karanjia
Reg. No. 14MCA1012
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India v
Contents
Declaration i
Certificate ii
Abstract iii
Acknowledgement iv
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Challenges and Difficulty in the problem solving . . . . . . . . . 3
1.5 Aim(s) and Objective(s) . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 Proposed System . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Overview / Literature Review 5
2.1 MPS (Mobility Platform services) . . . . . . . . . . . . . . . . . 5
2.2 Dashboard Platform Services . . . . . . . . . . . . . . . . . . . 6
2.3 Libelium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Restful Web-Services . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 NFC with Cordova . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6 Time Line Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 System Design 9
3.1 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 Feasibility Study . . . . . . . . . . . . . . . . . . . . . . . . . . 10
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India vi
3.4 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . 10
3.5 Services to be developed and offered . . . . . . . . . . . . . . . 11
3.6 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . 11
3.7 Non-Functional Requirements . . . . . . . . . . . . . . . . . . . 11
3.8 Data Flow Daigram . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.9 Technologies Used . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.9.1 D3js Chart library . . . . . . . . . . . . . . . . . . . . . 21
3.9.2 Apache Cordova (PhoneGap) . . . . . . . . . . . . . . . 21
3.9.3 Google Maps . . . . . . . . . . . . . . . . . . . . . . . . 22
3.9.4 Leaflet . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.9.5 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.10 Modular Description . . . . . . . . . . . . . . . . . . . . . . . . 23
3.10.1 Authorization and Access Control . . . . . . . . . . . . . 23
3.10.2 Chart Rendering Module . . . . . . . . . . . . . . . . . . 24
3.10.3 Map Rendering Module . . . . . . . . . . . . . . . . . . 25
3.10.4 NFC MODULE . . . . . . . . . . . . . . . . . . . . . . . 27
4 Implementation of System/ Methodology 32
4.1 Flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 The Software Process Model . . . . . . . . . . . . . . . . . . . . 35
4.4 Testing Techniques Used . . . . . . . . . . . . . . . . . . . . . . 36
4.4.1 White Box Testing: . . . . . . . . . . . . . . . . . . . . . 36
4.4.2 Black Box Testing . . . . . . . . . . . . . . . . . . . . . 36
4.4.3 Compatibility Testing . . . . . . . . . . . . . . . . . . . . 37
4.4.4 Functional Testing . . . . . . . . . . . . . . . . . . . . . 37
4.4.5 System Testing . . . . . . . . . . . . . . . . . . . . . . . 37
4.4.6 Junit Test Case . . . . . . . . . . . . . . . . . . . . . . . 38
5 Results and Discussions 39
6 Conclusion and Future Work 41
Appendices 42
(A) Screenshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
(B) Sample Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Bibliography 53
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India vii
List of Figures
2.1 Time line chart . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 DFD Level 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 DFD Level 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 DFD Level 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 DFD Level 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.6 DFD Level 2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.7 DFD Level 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.8 DFD Level 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.9 DFD Level 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.10 DFD Level 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.11 DFD Level 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.12 DFD Level 8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.13 DFD Level 9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.14 DFD Level 9.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.15 DFD Level 10.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.16 DFD Level 10.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.17 DFD Level 11.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.18 DFD Level 11.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.19 DFD Level 12.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.20 5 factor authorization . . . . . . . . . . . . . . . . . . . . . . . . 23
3.21 Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.22 NFC Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.23 The Structure of an NDEF message . . . . . . . . . . . . . . . . 29
3.24 NDEF message structure with header bytes . . . . . . . . . . . . 30
4.1 Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India viii
4.2 Map Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 Task Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.4 Task Completed . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.5 User Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.6 Incremental Process Model . . . . . . . . . . . . . . . . . . . . . 35
4.7 Test Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.1 Splash Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.2 NFC Authentication . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.3 Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.4 Pending Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.5 Pending Task 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.6 Missed Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.7 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.8 D3 Bar Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.9 D3 Pie Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.10 Map with markers . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.11 Map with info-window . . . . . . . . . . . . . . . . . . . . . . . 50
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 1
Chapter 1
Introduction
This project is focused on providing enhanced services to an existing platform
called Mobility Platform Services (M.P.S.) developed by the National Informatics
Center, Tamil Nadu.
Mobility Platform Services (MPS) is an open, comprehensive and advanced
mobile application platform for smart phones and tablets, helping Government or-
ganizations of all sizes to efficiently customize the requirements, emulate and de-
ploy on multiple platforms. MPS is a service that the Application Service Provider
(ASP) can use to perform various activities of mobile application development
from registering of the mobile app, requirement customization, registering web
services to fetch data from multiple domains and deliver the mobile app on mul-
tiple platforms. The mobile apps that are offered from MPS are of two categories
namely, Public Information Client providing information to citizen and Work from
Anywhere Client for Govt. officials to carry out their field work, data collection,
on site approvals and monitoring.
’A little progress everyday adds up to big results’
Keeping the above moto in my heart I started my journey as an intern at the Na-
tional Informatics Center. After lots of research and thinking I took up the project
of enhancing one of the best projects developed by NIC, MPS. The initial weeks
were spent on understanding the complex processes and the system of NIC and
figuring out what services could be developed as to make the system better and
make it capable to help various departments and personals of the Government of
India to develop mobile and desktop applications through this wonderful platform.
To make the platform better and to make it state of the art the key was to adopt the
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 2
latest concepts from the real world and make the platform capable of producing
applications in the most minimal time and ones which can solve real life problems.
New features like Maps, Automatic authentication, Authorization, Surveil-
lance and monitoring, using Near Field Communication Technologies, Real Time
Charts, Crowd Sourcing, etc. were proposed and developed during the course of
the project.
Each feature in this project will be uses multiple technologies. PostgreSQl
database which is the best open source database is being used to maintain the
back-end of the system. The payload of data is always in XML format to provide
re usability and maintain open standards. The maps are rendered using the Google
Maps Api and Leaflet Node which are the most widely used maps. The charts
which are being rendered are Real Time Charts which are the latest innovation
in visualization and use d3.js API to provide the best open source features for
charts. The major part of this project is based on exploiting the Near Field (N.F.C)
Technologies. The applications are developed in Cordova to implement the phone
gap feature and provide platform independence.
1.1 Background
The existing system is a platform named the Mobility Platform Services (M.P.S)
which is developed and is being used by the Indian Government for develop-
ing applications to solve real time problems for the different departments of the
Indian Government. The application had basic feature to support application de-
velopment along with modules to interactively design the applications. The ap-
plications which were produced as outputs by the platform can be used on any
platforms like Android, IOS, Windows, etc. as they were developed using the
phone gap features.
1.2 Statement
The task I was assigned was to Annalise and study the MPS platform and suggest
some ways to make it better. I was briefed by expert developers and programmers
for a couple of days on how the platform worked and how it was built. Extra
research was done to understand and get hands on what technologies were used to
develop the system.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 3
1.3 Motivation
The expectation with me being the young blood in the team was to bring in in-
novativeness and make the platform rich with the latest technologies and features
used in the market. A good amount of time was spent to study the latest technolo-
gies and to find ways to integrate them to a already well built and well planned
system
1.4 Challenges and Difficulty in the problem solving
i) Since these features were of the latest and upcoming trends and were born out
of innovativeness, there was no way to find a similar existing system available for
reference
ii) Some of the technologies used were implemented just a few months back to
proper documentation and tutorials were not available
iii) As so many different technologies were used in one feature itself it was diffi-
cult to convert our data and contents to different formats acceptable by each of the
technologies.
iv) Use of specialized hardware like NFC cards and devices, geo tags , Bluetooth
tags, etc was crucial had to be performed with proper caution.
v) Integration of all the different features and services.
1.5 Aim(s) and Objective(s)
The aim is to develop services for the MPS platform in a way that those services
add to making the product better to use and develop applications.Any service or
feature which may add to the betterment of the Indian Government and makes life
easy for the citizens of the country and the government servants is relevant to be
developed and included in the project.The services are an application to perform
by itself and they may or may not be related to each other.
1.6 Proposed System
The main purpose of the project is to integrate multiple features and services in
addition to the existing ones to enhance the platform with rich features.A list of
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 4
latest real time features was summarized. A proposal to add new features like Near
Field Communications, Interactive and informative maps Tracking and Monitor-
ing activities, Real Time Charts (RTC), 5 Factor Authentication, etc were pro-
posed.These features could provide multiple services that could be added to the
MPS platform and then the users of the MPS platform could use it to make ap-
plications with these features included in them.Now to exhibit the functionality
and working of these features it was appropriate to present a Proof of Concept
(P.O.C.). The POC which I intended to develop was a beat monitoring system
which will be produced as an output from the MPS Platform and will be capable
of providing all the new services and features which were added. The Beat Mon-
itoring System help the Police Authorities to mange and monitor the beat or the
parole process which is done every night and keep a check that the job assigned
to the employees is completed properly and with authenticity
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 5
Chapter 2
Overview / Literature Review
2.1 MPS (Mobility Platform services)
Mobility Platform Services (MPS) is an open, comprehensive and advanced mo-
bile application platform for smart phones and tablets, helping Government orga-
nizations of all sizes to efficiently customize the requirements, emulate and deploy
on multiple platforms. MPS is a service that the Application Service Provider
(ASP) can use to perform various activities of mobile application development
from registering of the mobile app, requirement customization, registering web
services to fetch data from multiple domains and deliver the mobile app on mul-
tiple platforms. The mobile apps that are offered from MPS are of two categories
namely, Public Information Client providing information to citizen and Work from
Anywhere Client for Govt. officials to carry out their field work, data collection,
on site approvals and monitoring.
Innovations in MPS
a) SDLC is eliminated.
b) Requirement Analysis Prototype phase is live after every design change as
SMS, email.
c) Iterative Design, feedback/review and the Requirement Freezing.
d) Alerts can be sent to all stakeholders for concurrence.
e) The mobile app is launched as soon as the required domain web service is pro-
vided by ASP.
f) The architecture is loosely coupled.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 6
g) Pay load between layers is encrypted XML data.
h) Restful web services are Secured Socket Layer for External application inte-
gration.
2.2 Dashboard Platform Services
The Dashboard Platform Services is an easy to use Platform service, where the
user can easily configure their requirements with readily available themes, vari-
ety of charts and layouts to deliver the desired dashboard. The Dashboard is a
real-time user interface showing a graphical presentation of the user information
as charts and data. User will be able to configure one or more charts using one of
the preferred layouts.
Features of the Dashboard are:
a) Design and development of dashboard is eliminated from SDLC
b) Loosely Coupled Architecture with 3 layers such as Application Layer, Web
Services Layer and Data Layer
c) Personalization is fully supported. Multiple themes, logo, background designs
are available for various requirements under DPS
d) Statistical Analysis on the usage, pattern, location and device are available un-
der DPS
e) Immediate emulator review after Customization with preview over email and
SMS
2.3 Libelium
Libelium designs and manufactures hardware and a complete software develop-
ment kit (SDK) for wireless sensor networks so that system integrators, engi-
neering, and consultancy companies can deliver reliable Internet of Things (IoT),
M2M, and Smart Cities solutions with minimum time to market. Our versatile
platform allows implementation of any Wireless Sensor Network, from Smart
Parking to Smart Irrigation solutions.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 7
2.4 Restful Web-Services
1. This book was very helpful to me to figure out a new way to access and transport
data payload across various different platforms.
2. Restful web-services play a very important role in this system and are used in
almost every module of the system.
3. The use of these Restful web services is used to get data from the database and
then transport it to the cream layer like Android, HTML, Cordova, etc.
2.5 NFC with Cordova
This plugin is used to add the NFC feature in cordova and use it to develop the
application. This pluging is supported with any Cordova version above the 3.0
version
This plugin is used to add the following features :-
a) Read data from NFC tags
b) Write data to NFC tags
c) Send data to other NFC enabled devices
d) Receive data from NFC devices
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 8
2.6 Time Line Chart
Figure 2.1: Time line chart
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 9
Chapter 3
System Design
3.1 Hardware Requirements
a) A Decent Computer system with standard configuration.
b) Arduino Micro Controller
c) NFC Tags
d) Geo Tags
e) Bluetooth Tags
f) R F Tags
g) Mobile Devices
3.2 Software Requirements
a) Web services
b) Android SDK.
c) Google Maps Api
d) Eclipse
e) Ajax
f) XML Support
g) JAVA
h) Arduino SDK
i) Leaflet Maps
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 10
3.3 Feasibility Study
This service will improve monitoring and authentication of multiple entities which
government need to monitor. Those entities should be NFC enabled, these entities
should also transmit the lat long from the GPS system and it can be further used in
government services. For proper authentication we will use a NFC authentication
which will be NFC cards. Once the authentication is done using NFC, Geographic
tags should be enable in the device used by the entity, device will transmit the data
which is basically the lat long, time stamp and NFC tag ID which would be taken
from the system and will be stored at the server and then continuous tracking can
be done.
3.4 System Architecture
Figure 3.1: System Architecture
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 11
3.5 Services to be developed and offered
The Following services will be developed and offered by me to make the mobility
platform service better and more feature rich :-
a) NFC features like read NFC data, Write NFC data on cards and other NFC
sensors, Read/Write encrypted data
b) The map feature where we can display maps with multiple locations and mul-
tiple group classified markers with info window with each of them.
c) Real Time Charts which are the latest innovation in visualization concepts will
be used to display analytical and statistical data.
d) Front and Styles editing system which will help developers and users edit the
look and feel of their systems in a easy and interactive way.
e) Auto WI-Fi authentication using NFC Cards.
f) Authorization and access control
g) Meeting ambiance
h) Tracking and Monitoring
3.6 Functional Requirements
a. The user identification credentials like username password pair, nfc card, mo-
bile IMEI no, etc. whatever would fit into the standards of our 5 Factor Authenti-
cation feature.
b. The task details for which are user specific and are available on a daily basis.
c. The locations of the entities involved in every tasks and meta data about them
d. The details of all the entities with their NFC card numbers, credentials, etc.
e. Weekly statistics of analysis made on events and processes.
f. Internet Connection.
g. NFC enabled mobile or device.
3.7 Non-Functional Requirements
a. Additional Details of in a task like description, image, etc.
b. Annotations for multiple charts
c. Additional Info Window details like temperature, town name, population, etc.
d. Drilled Down Charts
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 12
3.8 Data Flow Daigram
—
Figure 3.2: DFD Level 0
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 13
Figure 3.3: DFD Level 1.1
Figure 3.4: DFD Level 1.2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 14
Figure 3.5: DFD Level 2.1
Figure 3.6: DFD Level 2.2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 15
Figure 3.7: DFD Level 3.1
Figure 3.8: DFD Level 3.2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 16
Figure 3.9: DFD Level 4.1
Figure 3.10: DFD Level 4.2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 17
Figure 3.11: DFD Level 5.1
Figure 3.12: DFD Level 8.1
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 18
Figure 3.13: DFD Level 9.1
Figure 3.14: DFD Level 9.2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 19
Figure 3.15: DFD Level 10.1
Figure 3.16: DFD Level 10.2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 20
Figure 3.17: DFD Level 11.1
Figure 3.18: DFD Level 11.2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 21
Figure 3.19: DFD Level 12.1
3.9 Technologies Used
3.9.1 D3js Chart library
D3js is a JS library for charts based on data. D3 helps you bring data to life
using HTML, SVG, and CSS. D3 have web standards gives the full capabilities of
modern browsers, combining powerful and then apply data-driven transformations
to the document. For example, you can use D3 to generate an HTML table from
an array of numbers. Or, use the same data to create an interactive SVG bar chart
with smooth transitions and interaction.
3.9.2 Apache Cordova (PhoneGap)
Apache Cordova is an open-source mobile development framework. It uses stan-
dard web technologies such as HTML5, CSS3, and JavaScript for cross-platform
development, for neglecting each mobile platforms’ native mobile application de-
velopment. Apache Cordova is a platform for building cross-platform mobile
applications using HTML, CSS and JavaScript. It is an HTML5 app platform that
allows you to author native applications with web technologies and get access to
APIs and app stores. Over time, the Apache Cordova distribution may contain
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 22
additional tools that tie into other Adobe services, which would not be appropri-
ate for an Apache project. As a developer building Apache Cordova applications,
nothing has changed. It is still free, openly licensed, and the main focus of the
Apache Cordova team. If your goal is to build cross platform apps with HTML,
JS and CSS then keep on using Apache Cordova for everything you need
3.9.3 Google Maps
Google Maps Are Web-based service that provides information about geographi-
cal regions. In addition to conventional road maps, Google Maps offers satellite
views of many places. In some cities, Google Maps offers street views.
Google Maps also offers the following services:
1.We can plan our routes with Google map, whether it for car, bus or for your
walk. Route planning is the coolest feature of Google maps
2.The Google Maps API allows web site to embed Google maps into their website.
3.Google Maps also offers location service for Mobile which can be enabled using
GPS into your mobile device. It can work online as well as offline.
4.Google map also provide street maps for the travelers around the globe.
5.Google launched the Google Maps API in June 2005 to allow developers to
integrate Google Maps into their websites.
3.9.4 Leaflet
Leaflet Js is one of the best open-source library for interactive, responsive and
portable device friendly maps using JavaScript. It is light weight, almost about
33 KB and it has all the mapping features most developers ever need. Leaflet is
designed with simplicity, performance and usability in mind. It works efficiently
across all major desktop and mobile platforms, can be extended with lots of plu-
gin, has a beautiful, easy to use and well-documented API and a simple, readable
source code that is a joy to contribute to.
3.9.5 PostgreSQL
PostgreSQL is a general purpose and object-relational database management sys-
tem, the most advanced open source database system. PostgreSQL requires very
minimum maintained efforts because of its stability. Therefore, if you develop ap-
plications based on PostgreSQL, the total cost of ownership is low in comparison
with other database management systems. PostgreSQL can store any type of data
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 23
that you want you have in your database. We can store and retrieve information
by the use of SQL statements. In technical terms, it has the following features:
3.10 Modular Description
3.10.1 Authorization and Access Control
This module is used to authenticate different users who will be accessing the ap-
plication internally and also who will use the application as an authentication and
authorization mechanism. There will be a 5 Factor Authentication provided by
this feature. In this feature we can authenticate using a normal username pass-
word pair, then along with NFC cards, then with NFC Card and specific IMEI
number and also with specialized digital signature. No other platform provides
this level of sophistication when it comes to authorization. This feature can also
be used for access control where the user can grand access to a service or location
remotely.
Figure 3.20: 5 factor authorization
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 24
3.10.2 Chart Rendering Module
This module deals with rendering Real Time Charts. The d3 js library which is the
best open source option for visualizing data and statistics. All the analysis of the
system can be visualized using these charts and also these charts can be used and
integrated by any user in their applications. The data to be displayed is fetched
from the database. We are using the PostgreSQL in our implementation. The data
is fetched using a Java Restful Web service. The web service fetches the data from
the database and returns a HTTP RESPONSE in the form of an XML String. This
XML String is then abstracted in the form of JSON variables using a AJAX call.
The JSON variables are then passed to the D3js and they are used to render the
chart on a HTML page
Sub Modules:
i. Database
ii. Web-service
iii. Ajax Call
iv. Chart Render with D3js library
The Steps to Success:
1. Identifying what our analysis will do
2. Fetching the data and storing it in PostgreSQL
3. Creating a Web service to get data from PostgreSQL and host it as an chart, it
can be any chart present in the D3 library.
4. Building our fronted using D3.js and some good old javascript.
5. Analysis of data from Government database, which data we can use for our
application.
6. Fetch the dataset and try to create an informative analysis on the basis of the
data attributes.
7. After storing the dataset into the PostgreSQL a web Service has to be created
which can fetch that data from the database.
8. These web service will render an XML which will contain the data from the
database
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 25
3.10.3 Map Rendering Module
1. The map feature will be available in two flavors viz. in Google Maps and
Leaflet Maps
2. Both the Maps will give full functionalities of maps but only difference in them
is the Google api is not open source while the Leaflet API is open source.
3. The leaflet module map is a feature developed for the Mobility Platform Ser-
vice at the National Informatics Center, Tamil Nadu.
4. This modules main functionality is to display responsive maps with multiple
location and basic information about them.
5. The data to be displayed is fetched from the database. We are using the Post-
greSQL in our implementation.
6. The data is fetched using a Java Restful Web service
7. The web service fetches the data from the database and returns a HTTP RE-
SPONSE in the form of an XML String.
8. This XML String is then abstracted in the form of JSON variables using a
AJAX call.
9. The JSON variables are then passed to the Leaflet API and they are used to
render the map on a HTML page
10. as an authentication and authorization mechanism.
11. There will be a 5 Factor Authentication provided by this feature.
Sub Modules:
i. Database
ii. Web-service
iii. Ajax Call
iv. Map Render with leaflet API
1. Database Module
1. The database is developed in the PostgreSQL
2. The data consist of the geographic locations, group details, marker details,
group details, descriptions, images, etc
3. The data is stored in a standard SQL format.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 26
Figure 3.21: Map Data
2. Web Service
I. The web-service is developed is RESTFUL Java Web-Service.
II. The web-service fetches the data from the database and returns a HTTP RE-
SPONSE in the form of an XML String.
III. This XML String is then abstracted in the form of JSON variables using a
AJAX call.
3. AjAX CAll
The Ajax call runs on the client side.Its task is to call the web-service, catch the
HTTP Response and then convert the XML data into JSON Objects.These JSON
Objects can then be abstracted by the Leaflet API.
4. Map Render with leaflet Api
The Leaflet API focuses on rendering one or more marker on different locations
on the map. Along with this it has to manage the markers (i.e. pins) on the
map and customize their appearance based on their groups.Markers with different
groups are shown in different colors depending on their groups. These colors can
be edited and customized using the editor in the MPS user interface. The users
can also use customized icons instead of solid colors using the MPS user interface.
Along with that there has to be an info window which pops up when a marker is
clicked.The info window consists of the basic description, images and name value
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 27
pairs about that specific location entity.The info window has the title of the item
on the top left hand side title bar.Then comes the description of the item which is
left justified and the image if provided is showed right justified.Then comes vari-
ous name value pairs like temperature, town name, nearest village name, etc.
3.10.4 NFC MODULE
1. The NFC module is the main feature of the system .
2. It gives the system a cutting edge feature.
3. Near field technologies will be used for authentication, tracking, monitoring
and various other features like auto WI-fi, meeting ambiance, etc.
4.NFC is the key feature to all the other features in this system.
Features to be enabled using NFC
a) Read tag id
b) Read content
c) Write content
d) Read encrypted content
e) Write encrypted content
f) Make read only (lock)
Actions and events to be triggered using NFC
a) Show alert on the device and/or Record alert on the server
b) Authorization (Registration on the device and/or on the server)
c) Auto WI-fi (Device, Identity, Password)
d) Meeting ambiance(Vibration mode, volume mute, register attendance, Get Agenda,
Get docs)
e) Access Control (Authorize and Trigger)
f) Tracking (Geo tag, Frequency, server update )
g) Show alert on the device and/or Record alert on the server
h) Authorization (Registration on the device and/or on the server)
i) Auto WI-fi (Device, Identity, Password)
j) Meeting ambiance(Vibration mode, volume mute, register attendance, Get Agenda,
Get docs)
k) Access Control (Authorize and Trigger)
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 28
l) Tracking (Geo tag, Frequency, server update )
m) Open external application on the device:
Music app,camera app,alarm, reminder, navigation, website, car mode, phone
dial(call),run a secret code
n) Open external application on the server:
Calling a web service,a website,backup,trigger dashboard to monitor servers and
services,remote authorization or permission
NFC Actions(Alerts)
Figure 3.22: NFC Action
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 29
NDEF Structure
NDEF is a binary format structured in messages, each of which can contain sev-
eral records. Each record is made up of a header, which contains metadata about
the record, such as the record type, length, and so forth, and the payload, which
contains the content of the message. Think of an NDEF message like a paragraph,
and records like the sentences within it. A well-formed paragraph is made up of
sentences pertaining to one topic. Similarly, its good practice to use one NDEF
message made up of several records to describe one subject, say, an address book
entry.
NFC transactions are generally short. Each exchange generally consists of
only one message, and each tag carries just one message. Keep in mind the phys-
ical circumstances of an NFC exchange: you tap your device to another device or
tag, and the whole exchange happens while youre in contact with the other device
or tag. You dont want to send a whole novel in a single exchange, so think of your
NDEF messages as paragraph-length, not book-length. Youll see a workaround to
this for sending large files in one of the final chapters of this book, but for now,
consider one NFC exchange as one NDEF message, and think of one NDEF mes-
sage as one or more short records.
Figure 3.23: The Structure of an NDEF message
An NDEF record contains a payload of data and metadata describing how to
interpret the payload. Each records payload can be one of several different data
types. The header for each record contains metadata describing the record and
its place in the message, followed by its type and ID. After the header comes the
payload.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 30
Figure 3.24: NDEF message structure with header bytes
A NDEF record consists of a type name format (TNF), payload type, payload
identifier, and the payload. The payload is the most important part of an NDEF
record; its the content that youre transmitting. The TNF tells you how to interpret
the payload type. The payload type is an NFC-specific type, MIME media-type,
or URI that tells you how to interpret the payload. Another way to think about
this is that the TNF is the metadata about the payload type, and the payload type
is the metadata about the payload. The payload identifier is optional and allows
multiple payloads to be associated or cross referenced.
5.Pending Tasks
All the tasks which are updated by the admin are to be populated in a select box
from where the user can select a particular task. The tasks are displayed and up-
dated on a daily basis where the admin will update multiple tasks for multiple
users and depending on the users login and authentication credentials he will be
displayed the task assigned for him on a daily basis. Once the user selects the
task he will be shown a map where he will be shown a map with the details of the
location where he as to visit and get the NFC tapped from the entity of concern.
If the user is within 500 meters of the location of the location given by the Admin
the input feature in his device or phone whichever he is using will be activated and
he can then use the device to input data regarding the beat process. Once the input
feature is activated he can then go the personal or entity and get his NFC card or
NFC signature from a device and then if he wants he can add additional details
and descriptions to the report and submit the report. Once he submits a reports an
update on the server is done with an accurate timestamp There is no specific order
in which the user has to follow to finish or complete the tasks which are assigned
to him by the Admin. All the task assigned by the Admin will be shown only for
the specific user and will be shown only for 24 hours. The user can not try to
complete the tasks nor will he be displayed any tasks after the completion of 24
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 31
hours.
6. Missed Tasks
In this module all the task which were assigned to user if they are not completed
during the course of twenty four hours form the time of assignment then those
tasks are shown here. The missed tasks shown are shown date wise and the user
can see all his missed tasks for the past month. The user can select a date from the
data time picker and all his missed tasks for the day will be shown there. He can
also select individual tasks to see the tasks in detail
7. History
It is the combination of the above two menus. In this module all the task which
were assigned to user if they are not completed during the course of twenty four
hours form the time of assignment then those tasks are shown here and also the
tasks completed will be shown. The missed tasks shown are shown date wise and
the user can see all his missed tasks for the past month. The user can select a date
from the data time picker and all his missed tasks for the day will be shown there.
He can also select individual tasks to see the tasks in detail
8. Weekly Annalysis
Here analysis is performed on all the different events. This analysis once per-
formed is visualized using Real Time Charts. Real time charts are using the d3js
library to visualize charts in the latest features of the real time market. These
charts show analysis which are done on a weekly basis
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 32
Chapter 4
Implementation of System/
Methodology
4.1 Flow chart
Figure 4.1: Flow Chart
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 33
4.2 Data Dictionary
Figure 4.2: Map Master
Figure 4.3: Task Master
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 34
Figure 4.4: Task Completed
Figure 4.5: User Master
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 35
4.3 The Software Process Model
The software process model adopted is the incremental model. The incremental
model is the combines the features of both the linear iterative approaches of proto-
type model as well as the sequential model both combined together. Small incre-
ments of software are developed and then delivered and then on each increment
the linear sequential model is applied. On each process flow of each increment
prototyping is applied. The first increment that is delivered is considered as the
core product. The final needs of the product are addressed by the core product.
The client evaluates and reviews every increment. Based on client feedback for
the core product developers prepare a plan for the next increment. At times, it
is even used on a test basis. New features and functionality are also taken into
consideration. The above process is applied to each increment that is delivered.
Figure 4.6: Incremental Process Model
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 36
4.4 Testing Techniques Used
4.4.1 White Box Testing:
White box testing is a security testing method that can be used to validate whether
code implementation follows intended design, to validate implemented security
functionality, and to uncover exploitable vulnerabilities. White box testing re-
quires access to the source code. Though white box testing can be performed any
time in the life cycle after the code is developed, it is a good practice to perform
white box testing during the unit testing phase. White box testing requires know-
ing what makes software secure or insecure, how to think like an attacker, and
how to use different testing tools and techniques. The first step in white box test-
ing is to comprehend and analyse source code, so knowing what makes software
secure is a fundamental requirement. Second, to create tests that exploit software,
a tester must think like an attacker. Third, to perform testing effectively, testers
need to know the different tools and techniques available for white box testing.
4.4.2 Black Box Testing
Black box testing takes an external perspective of the test object to derive test
cases. These tests can be functional or non-functional, though usually functional.
The test designer selects valid and invalid input and determines the correct output.
There is no knowledge of the test object’s internal structure. Black box testing
should make use of randomly generated inputs (only a test range should be spec-
ified by the tester), to eliminate any guess work by the tester as to the methods
of the function. Test monitoring tools should be used whenever possible to track
which tests have already been performed and the outputs of these tests to avoid
repetition and to aid in the software maintenance. Data outside of the specified
input range should be tested to check the robustness of the program.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 37
4.4.3 Compatibility Testing
It is a testing technique used to Ensure Compatibility of an application. Various
tests were done to ensure that multiple technologies are compatible with the appli-
cation. We could not use the latest version of Cordova and had to work in Cordova
3.0.1 version so that all the technologies are compatible. Still the application is
not compatible for usage in windows phones. The application can show data in
multiple platforms but can only take input from a NFC enabled android device.
4.4.4 Functional Testing
Functional testing deals with the process of testing individual functions. A couple
of tests were run on the d3.xml() function, where a multiple data in xml format
was sent and checked if it was parsed properly to generate data and render charts
from that data. Other function like the various web-services were tested to fetch
data from the database and convert it into XML tags. The NFC cards were tested
for read and write operations where the cards were checked if they always gave
accurate reading.
4.4.5 System Testing
Testing conducted on a complete, integrated system to evaluate. The systems
compliance with its specified requirements. System testing falls within the scope
of Black Box Testing. Once the whole system was developed various inputs were
given to it thinking of real time scenarios and feeding real time data to check the
robustness of the system. The demo versions of the application were also dis-
tributed to friends and colleagues and asked for their feedbacks and suggestions.
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 38
4.4.6 Junit Test Case
Figure 4.7: Test Case
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 39
Chapter 5
Results and Discussions
As a result of this project a set of advanced services will be added to the mobil-
ity platform services platform. These services perform a specific task and add
a definite feature to the platform. Using one or multiple features from this plat-
form a user can make an application for his use within comparatively very less
time. The advanced services developed for this platform consist of features like
Maps, Charts, Near Field Communications, Crowd Sourcing, Tracking and Mon-
itoring and 5 Factor Authentication. As a Proof of Concept (P.O.C) an application
named The Beat Management Process is developed using the MPS platform. Ev-
ery single night one or many police officers are required to visit multiple places
for parole. When a policeman checks into a location assigned to him it is called
a BEAT. He might be required to take multiple BEATS in a single session. To
check if the policeman has completed all the required BEATS this system is used.
But is mainly designed to help the Policemen perform his BEATs properly and in
assist him to finish the task in an efficient way. Each policeman has to login to the
system where he can be authenticated using any of the 5 Factor Authentication
methods like NFC cards, Username-Password pair, mobile IMEI no, etc. Once
the user is authenticated he will be displayed a menu with multiple options like
Pending Tasks, Missed Tasks, History and Weekly Analysis. The user will be able
to view a list of all the tasks still pending for him to complete in the form of a
dropdown list. He can then select a particular job and that job can be displayed
to him with its basic details like location on the map, description and instructions.
Once the policeman is at a point of BEAT he can ask the person to be checked to
place his NFC card on the mobile or NFC enabled device and the BEAT success
is updated on the server and the phone. The above process is repeated for all the
tasks assigned to him in a day. In the next tab the user can see all the tasks he
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 40
has missed in the past and in the History tab the user can see all the task he has
completed and the ones he has missed in a specific time period. Weekly analysis
is done of the BEATs done by the user and a visualization of those analysis is
done using the d3js Real Time Charts (RTC).
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 41
Chapter 6
Conclusion and Future Work
I did not make one application or website but develop a few services and features
which will provide to make multiple applications and systems using the MPS plat-
form. The Beat Management System is a proof of concept (POC) for the different
applications that can be developed using the MPS platform. These services can be
used to enhance or build any application in future to solve a problem or provide
services to the Indian Government. The system will provide scalable and reusable
services, that can be integrated to any existing platform or a newly developed one.
The system will support NFC authentication and NFC services and also provide
monitoring and surveillance facilities using Geo Tags, RF Tags and other multiple
sensors. The system provides all features of Google Map API and Leaflet Maps
API for the users perusal to provide them features to visualize single or multiple
geographic locations. Developing this system was one of the best experiences of
my life and I still have two more months left of internship. During this span of
time I will be working on couple of more services and features like crowd sourc-
ing, Tracking using Bluetooth devices, etc. Whatever features are prepared can be
used to develop various applications of different types. Using these service and
features one can make any app he wants taking advantage of the latest features
and technologies. Anything else which will make the product better would be un-
dertaken by me. To conclude I would like to state that I have learnt a lot of new
technologies like Web-service designing, javascripting, visualization techniques
like d3js and Maps, Cordova App Development, NFC, etc. and have gained ex-
perience in the professional environment and I am grateful to all at the National
Informatics Centre to guide me and support me on every step and allowing me to
evolve and become a better professional
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 42
Appendices
(A) Screen Shot
Figure 6.1: Splash Screen
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 43
Figure 6.2: NFC Authentication
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 44
Figure 6.3: Menu
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 45
Figure 6.4: Pending Task
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 46
Figure 6.5: Pending Task 2
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 47
Figure 6.6: Missed Task
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 48
Figure 6.7: History
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 49
Figure 6.8: D3 Bar Chart
Figure 6.9: D3 Pie Chart
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 50
Figure 6.10: Map with markers
Figure 6.11: Map with info-window
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 51
(B) Sample Coding
Sample Web-Service
@POST
@Path ("/Location1")
@Produces ("text/xml")
public String Location1(@Context HttpServletResponse httpServletResp
{
String output=new String();
Connection c = null;
Statement stmt1 = null;
try {
Class.forName("org.postgresql.Driver");
c = DriverManager
.getConnection("jdbc:postgresql://localhost:5432/Beatp",
"postgres", "kay123");
c.setAutoCommit(false);
System.out.println("Opened database successfully");
stmt = c.createStatement();
ResultSet rs = stmt.executeQuery( "SELECT station, pscode, x, y FROM
output+= "<sdp><viewmap type="google"><Location>";
while ( rs.next() ) {
String station = rs.getString("station");
String pscode = rs.getString("pscode");
String lat = rs.getString("x");
String lng = rs.getString("y");
System.out.println(station);
output+="<response lat=""+lat+"" lng=""+lng+"" value=""+sta
}
output+="</Location> </viewmap></sdp>";
rs.close();
stmt.close();
c.close();
} catch ( Exception e ) {
System.err.println( e.getClass().getName()+": "+ e.getMessage() );
System.exit(0);
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 52
}
return output;
}
Sample XML
<sdp>
<viewmap type="google">
<group name="0 " value="police" markercolor="blue">
<responses lat="13.00437449" long="80.252406590000007" value="J2 Ada
<response name="Town" value="Chennai"/>
<response name="Degree" value="34%celcisus"/>
<response name="Image" value="image/1.png"/>
<response name="Description" value="null"/>
</group>
<group name="1 " value="water" markercolor="red">
<responses lat="12.98699234" long="80.260591610000006" value="J6 Thi
<response name="Town" value="Chennai"/>
<response name="Degree" value="44%celcisus"/>
<response name="Image" value="image/2.png"/>
<response name="Description" value="null"/>
</group>
<group name="2 " value="temple" markercolor="pink">
<responses lat="12.931626039999999" long="80.252467019999997" value=
<response name="Town" value="Chennai"/>
<response name="Degree" value="34%celcisus"/>
<response name="Image" value="image/3.png"/>
<response name="Description" value="null"/>
</group>
</viewmap>
</sdp>
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 53
Sample Ajax Call
$(document).ready(function(){
var group;
var markercolor
$.ajax({type: "POST",url: "http://localhost:8086/oralcancerdashboard
datatype: "xml",error: function(jqXHR, textStatus, errorThrown) {
console.log(’Error: ’ + errorThrown); },
success: function(xml) {
var i =0;
$(xml).find(’group’).each(function(){
"<h4>"+$(this).attr(’value’).toString()+"</h4>",$(this).attr(’lng’),
group = $(this).attr(’value’).toString();
markercolor = $(this).attr(’markercolor’).toString();
});
});
});
Sample NFC Read
function nfcread()
{var errorflag=1;
function nfcHandler (nfcEvent) {
var tag = nfcEvent.tag;
var ndefMessage = tag.ndefMessage;
var payload = nfc.bytesToString(ndefMessage[0].payload);
var tagId = nfc.bytesToHexString(tag.id);
var value = payload.substring(3);
if(tagId==tag[i]){
alert("Beat Sucessful for"+payload);}
else {alert("Invalid Card");}};
School of Computing Science and Engineering, VIT University, Chennai
Monitoring and Surveillance using Near Field Technologies for the Gov. of India 54
Bibliography
[1] Applying Google Maps,Christophe Vandeviver,2010
[2] Apache Cordova Programming,John M. Wargo 2015
[3] Begin NFC with PhoneGap,By DonColeman,Oreilly
[4] Data Visualization with d3.js,Teller, Swizec,2013
[5] Data-Driven Documents Michael Bostock, Vadim Ogievetsky,2013
[6] Data Visualization with D3.js Cookbook,Nick Qi Zhu - 2013
[7] e-Gov Mobility Platform Services: http://informatics.nic.in/pdfs/89bad940.pdf
[8] Interactive Data Visualization for the Web,Scott Murray,2011
School of Computing Science and Engineering, VIT University, Chennai

More Related Content

What's hot

Report
ReportReport
Report
Chris Watts
 
Hung_thesis
Hung_thesisHung_thesis
Hung_thesis
hungtruongquoc
 
A.R.C. Usability Evaluation
A.R.C. Usability EvaluationA.R.C. Usability Evaluation
A.R.C. Usability Evaluation
JPC Hanson
 
MSc_Thesis
MSc_ThesisMSc_Thesis
Parallel evolutionary approach report
Parallel evolutionary approach reportParallel evolutionary approach report
Parallel evolutionary approach report
Priti Punia
 
Abrek_Thesis
Abrek_ThesisAbrek_Thesis
Abrek_Thesis
Natascha Abrek
 
Uml (grasp)
Uml (grasp)Uml (grasp)
Uml (grasp)
Djordje Badza
 
Sistem pendukung keputusan seleksi penerima calon guru honor upload
Sistem pendukung keputusan seleksi penerima calon guru honor uploadSistem pendukung keputusan seleksi penerima calon guru honor upload
Sistem pendukung keputusan seleksi penerima calon guru honor upload
Fauzanardian
 
Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...
Lorenzo D'Eri
 
thesis_online
thesis_onlinethesis_online
thesis_online
Steven Raemaekers
 
Master's Thesis
Master's ThesisMaster's Thesis
Master's Thesis
Wajdi Khattel
 
12.06.2014
12.06.201412.06.2014
Tesi v.d.cuccaro
Tesi v.d.cuccaroTesi v.d.cuccaro
Tesi v.d.cuccaro
Aravindharamanan S
 
A Machine Learning approach to predict Software Defects
A Machine Learning approach to predict Software DefectsA Machine Learning approach to predict Software Defects
A Machine Learning approach to predict Software Defects
Chetan Hireholi
 
bonino_thesis_final
bonino_thesis_finalbonino_thesis_final
bonino_thesis_final
Dario Bonino
 
computer science internship report
computer science  internship reportcomputer science  internship report
computer science internship report
kaahwa Armstrong
 
Jayashan-cb004082-Criminal Face Recognition-Final
Jayashan-cb004082-Criminal Face Recognition-FinalJayashan-cb004082-Criminal Face Recognition-Final
Jayashan-cb004082-Criminal Face Recognition-Final
Jayashan Fernando
 
Realtimesamplingofutilization
RealtimesamplingofutilizationRealtimesamplingofutilization
Realtimesamplingofutilization
Vicente Nava
 
Student Database Management System
Student Database Management SystemStudent Database Management System
Student Database Management System
Ajay Bidyarthy
 

What's hot (19)

Report
ReportReport
Report
 
Hung_thesis
Hung_thesisHung_thesis
Hung_thesis
 
A.R.C. Usability Evaluation
A.R.C. Usability EvaluationA.R.C. Usability Evaluation
A.R.C. Usability Evaluation
 
MSc_Thesis
MSc_ThesisMSc_Thesis
MSc_Thesis
 
Parallel evolutionary approach report
Parallel evolutionary approach reportParallel evolutionary approach report
Parallel evolutionary approach report
 
Abrek_Thesis
Abrek_ThesisAbrek_Thesis
Abrek_Thesis
 
Uml (grasp)
Uml (grasp)Uml (grasp)
Uml (grasp)
 
Sistem pendukung keputusan seleksi penerima calon guru honor upload
Sistem pendukung keputusan seleksi penerima calon guru honor uploadSistem pendukung keputusan seleksi penerima calon guru honor upload
Sistem pendukung keputusan seleksi penerima calon guru honor upload
 
Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...
 
thesis_online
thesis_onlinethesis_online
thesis_online
 
Master's Thesis
Master's ThesisMaster's Thesis
Master's Thesis
 
12.06.2014
12.06.201412.06.2014
12.06.2014
 
Tesi v.d.cuccaro
Tesi v.d.cuccaroTesi v.d.cuccaro
Tesi v.d.cuccaro
 
A Machine Learning approach to predict Software Defects
A Machine Learning approach to predict Software DefectsA Machine Learning approach to predict Software Defects
A Machine Learning approach to predict Software Defects
 
bonino_thesis_final
bonino_thesis_finalbonino_thesis_final
bonino_thesis_final
 
computer science internship report
computer science  internship reportcomputer science  internship report
computer science internship report
 
Jayashan-cb004082-Criminal Face Recognition-Final
Jayashan-cb004082-Criminal Face Recognition-FinalJayashan-cb004082-Criminal Face Recognition-Final
Jayashan-cb004082-Criminal Face Recognition-Final
 
Realtimesamplingofutilization
RealtimesamplingofutilizationRealtimesamplingofutilization
Realtimesamplingofutilization
 
Student Database Management System
Student Database Management SystemStudent Database Management System
Student Database Management System
 

Viewers also liked

Holistic Thinking & Public Policy PC Version
Holistic Thinking & Public Policy PC VersionHolistic Thinking & Public Policy PC Version
Holistic Thinking & Public Policy PC Version
Shoshanna Silverberg
 
призма (братенькова10а)
призма (братенькова10а)призма (братенькова10а)
призма (братенькова10а)Natalie1111
 
2015 Intern Presentation Jakeway
2015 Intern Presentation Jakeway2015 Intern Presentation Jakeway
2015 Intern Presentation Jakeway
Maryrose Jakeway
 
La teoria de dalton
La teoria de daltonLa teoria de dalton
La teoria de dalton
_PabloPierri_
 
Thematic Units and the English Language Learner
Thematic Units and the English Language LearnerThematic Units and the English Language Learner
Thematic Units and the English Language Learner
Holly Manthey
 
140210106044 (2) 1
140210106044 (2) 1140210106044 (2) 1
140210106044 (2) 1
mayur-4897
 
Ram Idavalapati
Ram IdavalapatiRam Idavalapati
Ram Idavalapati
Ram Idavalapati
 
Indie Contractors in the New Economy-4
Indie Contractors in the New Economy-4Indie Contractors in the New Economy-4
Indie Contractors in the New Economy-4
Shoshanna Silverberg
 
CV - David Kime - January 16_1
CV - David Kime - January 16_1CV - David Kime - January 16_1
CV - David Kime - January 16_1
David Kime
 
Knowledge Elicitation Techiniques Concept Sorting
Knowledge Elicitation Techiniques   Concept SortingKnowledge Elicitation Techiniques   Concept Sorting
Knowledge Elicitation Techiniques Concept Sorting
neerav_adhikari
 
Melissa Resume 2015
Melissa Resume 2015Melissa Resume 2015
Melissa Resume 2015
Melissa Torres
 
Introduction to SIP
Introduction to SIP  Introduction to SIP
Introduction to SIP
neerav_adhikari
 
LTE Basic
LTE BasicLTE Basic
LTE Basic
neerav_adhikari
 

Viewers also liked (14)

Holistic Thinking & Public Policy PC Version
Holistic Thinking & Public Policy PC VersionHolistic Thinking & Public Policy PC Version
Holistic Thinking & Public Policy PC Version
 
призма (братенькова10а)
призма (братенькова10а)призма (братенькова10а)
призма (братенькова10а)
 
2015 Intern Presentation Jakeway
2015 Intern Presentation Jakeway2015 Intern Presentation Jakeway
2015 Intern Presentation Jakeway
 
La teoria de dalton
La teoria de daltonLa teoria de dalton
La teoria de dalton
 
Thematic Units and the English Language Learner
Thematic Units and the English Language LearnerThematic Units and the English Language Learner
Thematic Units and the English Language Learner
 
140210106044 (2) 1
140210106044 (2) 1140210106044 (2) 1
140210106044 (2) 1
 
Ram Idavalapati
Ram IdavalapatiRam Idavalapati
Ram Idavalapati
 
Presentation
PresentationPresentation
Presentation
 
Indie Contractors in the New Economy-4
Indie Contractors in the New Economy-4Indie Contractors in the New Economy-4
Indie Contractors in the New Economy-4
 
CV - David Kime - January 16_1
CV - David Kime - January 16_1CV - David Kime - January 16_1
CV - David Kime - January 16_1
 
Knowledge Elicitation Techiniques Concept Sorting
Knowledge Elicitation Techiniques   Concept SortingKnowledge Elicitation Techiniques   Concept Sorting
Knowledge Elicitation Techiniques Concept Sorting
 
Melissa Resume 2015
Melissa Resume 2015Melissa Resume 2015
Melissa Resume 2015
 
Introduction to SIP
Introduction to SIP  Introduction to SIP
Introduction to SIP
 
LTE Basic
LTE BasicLTE Basic
LTE Basic
 

Similar to NIC Project Final Report

DILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdf
DILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdfDILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdf
DILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdf
DiamondZ3
 
Project final report
Project final reportProject final report
Project final report
ALIN BABU
 
Work Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerWork Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel Belasker
Adel Belasker
 
online examination management system
online examination management systemonline examination management system
online examination management system
Praveen Patel
 
ImplementationOFDMFPGA
ImplementationOFDMFPGAImplementationOFDMFPGA
ImplementationOFDMFPGA
Nikita Pinto
 
LPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] ReportLPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] Report
Nandu B Rajan
 
report
reportreport
Agentless Monitoring with AdRem Software's NetCrunch 7
Agentless Monitoring with AdRem Software's NetCrunch 7Agentless Monitoring with AdRem Software's NetCrunch 7
Agentless Monitoring with AdRem Software's NetCrunch 7
Hamza Lazaar
 
iPDC Report Kedar
iPDC Report KedariPDC Report Kedar
iPDC Report Kedar
Nitesh Pandit
 
Vehicle to Vehicle Communication using Bluetooth and GPS.
Vehicle to Vehicle Communication using Bluetooth and GPS.Vehicle to Vehicle Communication using Bluetooth and GPS.
Vehicle to Vehicle Communication using Bluetooth and GPS.
Mayur Wadekar
 
Chat Application [Full Documentation]
Chat Application [Full Documentation]Chat Application [Full Documentation]
Chat Application [Full Documentation]
Rajon
 
Uni v e r si t ei t
Uni v e r si t ei tUni v e r si t ei t
Uni v e r si t ei t
Anandhu Sp
 
Srs
SrsSrs
Master's Thesis
Master's ThesisMaster's Thesis
Master's Thesis
Sridhar Mamella
 
Thesis
ThesisThesis
AUGUMENTED REALITY FOR SPACE.pdf
AUGUMENTED REALITY FOR SPACE.pdfAUGUMENTED REALITY FOR SPACE.pdf
AUGUMENTED REALITY FOR SPACE.pdf
jeevanbasnyat1
 
My PhD Thesis
My PhD Thesis My PhD Thesis
My PhD Thesis
Suman Srinivasan
 
Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)
Priyanka Kapoor
 
KHAN_FAHAD_FL14
KHAN_FAHAD_FL14KHAN_FAHAD_FL14
KHAN_FAHAD_FL14
Fahad Naeem
 
project Report on LAN Security Manager
project Report on LAN Security Managerproject Report on LAN Security Manager
project Report on LAN Security Manager
Shahrikh Khan
 

Similar to NIC Project Final Report (20)

DILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdf
DILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdfDILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdf
DILE CSE SEO DIGITAL GGGTECHNICAL INTERm.pdf
 
Project final report
Project final reportProject final report
Project final report
 
Work Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerWork Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel Belasker
 
online examination management system
online examination management systemonline examination management system
online examination management system
 
ImplementationOFDMFPGA
ImplementationOFDMFPGAImplementationOFDMFPGA
ImplementationOFDMFPGA
 
LPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] ReportLPG Booking System [ bookmylpg.com ] Report
LPG Booking System [ bookmylpg.com ] Report
 
report
reportreport
report
 
Agentless Monitoring with AdRem Software's NetCrunch 7
Agentless Monitoring with AdRem Software's NetCrunch 7Agentless Monitoring with AdRem Software's NetCrunch 7
Agentless Monitoring with AdRem Software's NetCrunch 7
 
iPDC Report Kedar
iPDC Report KedariPDC Report Kedar
iPDC Report Kedar
 
Vehicle to Vehicle Communication using Bluetooth and GPS.
Vehicle to Vehicle Communication using Bluetooth and GPS.Vehicle to Vehicle Communication using Bluetooth and GPS.
Vehicle to Vehicle Communication using Bluetooth and GPS.
 
Chat Application [Full Documentation]
Chat Application [Full Documentation]Chat Application [Full Documentation]
Chat Application [Full Documentation]
 
Uni v e r si t ei t
Uni v e r si t ei tUni v e r si t ei t
Uni v e r si t ei t
 
Srs
SrsSrs
Srs
 
Master's Thesis
Master's ThesisMaster's Thesis
Master's Thesis
 
Thesis
ThesisThesis
Thesis
 
AUGUMENTED REALITY FOR SPACE.pdf
AUGUMENTED REALITY FOR SPACE.pdfAUGUMENTED REALITY FOR SPACE.pdf
AUGUMENTED REALITY FOR SPACE.pdf
 
My PhD Thesis
My PhD Thesis My PhD Thesis
My PhD Thesis
 
Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)Report on e-Notice App (An Android Application)
Report on e-Notice App (An Android Application)
 
KHAN_FAHAD_FL14
KHAN_FAHAD_FL14KHAN_FAHAD_FL14
KHAN_FAHAD_FL14
 
project Report on LAN Security Manager
project Report on LAN Security Managerproject Report on LAN Security Manager
project Report on LAN Security Manager
 

NIC Project Final Report

  • 1. Monitoring and Surveillance using Near Field Technologies for the Gov. of India A PROJECT REPORT Submitted by Kayewan Mehernosh Karanjia Reg. No. 14MCA1012 in partial fulfillment for the award of the degree of Master of Computer Applications School of Computing Science and Engineering VIT University Vandalur - Kelambakkam Road, Chennai - 600 127 April - 2016
  • 2. School of Computing Science and Engineering DECLARATION I hereby declare that the project entitled Monitoring and Surveillance using Near Field Technologies for the Gov. of India submitted by me to the School of Computing Science and Engineering, VIT Chennai, 600 127 in partial fulfillment of the requirements of the award of the degree of Master of Computer Applica- tions is a bona-fide record of the work carried out by me under the supervision of Dr. Hepsiba Mabel V.. I further declare that the work reported in this project, has not been submitted and will not be submitted, either in part or in full, for the award of any other degree or diploma of this institute or of any other institute or University. Place: Chennai Signature of Candidate Date: (Kayewan Mehernosh Karanjia)
  • 3. School of Computing Science and Engineering CERTIFICATE This is to certify that the report entitled Monitoring and Surveillance us- ing Near Field Technologies for the Gov. of India is prepared and submitted by Kayewan Mehernosh Karanjia (Reg. No. 14MCA1012) to VIT Chennai, in partial fulfullment of the requirement for the award of the degree of Master of Computer Applications is a bona-fide record carried out under my guidance. The project fulfills the requirements as per the regulations of this University and in my opinion meets the necessary standards for submission. The contents of this report have not been submitted and will not be submitted either in part or in full, for the award of any other degree or diploma and the same is certified. Guide/Supervisor Program Chair Name: Dr. Hepsiba Mabel V. Name: Dr. Pattabiraman V Date: Date: Examiner Examiner Name: Name: Date: Date:
  • 4. Monitoring and Surveillance using Near Field Technologies for the Gov. of India iii Abstract The purpose of this project is to develop new services to enhance and make the Mobility Platform Services Platform better.New technologies and features like NFC, Maps, Crowd Sourcing , Real Time Charts, Dynamic Front End Design- ing, etc are developed and made available.The system will mostly be focused on empowering the NFC technology and manage the RF tags, which will be NFC enabled through mediums like cards, mobile devices or a NFC reader. We indent to use Geographic tags and Maps API to track and monitor various entities and personal.The NFC Technologies will also work even when there is no power or battery backup to a device. For E.g. Even if the phone with the NFC emulator is switched off due to low battery but I can still receive and transmit data without power supply.NFC cards which will be encrypted and can be distributed to the specified personal or entities. These cards can then be read using a mobile device or a NFC reader, the time and date of the recording and the geographical tags will be sent to the server or cloud using a data enabled mechanism.These services can be integrated to any of the existing applications and can retrieve as well as provide various sets of information and data which can be of the at most importance to the Indian Government for the purpose of E-Governance and many other processes. School of Computing Science and Engineering, VIT University, Chennai
  • 5. Monitoring and Surveillance using Near Field Technologies for the Gov. of India iv Acknowledgement I express my gratitude to Almighty God, my parents, other family members and friends without whose uncontained support I could not have made this project. I wish to place on my record my deep sense of gratitude for my project guide and mentor, Dr. Hepsiba Mabel, for her constant motivation and valuable help through the project work. I am forever indebted to Mr. V.S. Raghunathan, Sr. Technical Director (National Informatics Center, Tamil Nadu) for giving me a chance to work under him and enlightening me with his valuable counsel and advice through my term at NIC, for allotting me the project of my choice and for appointing me at the right place and under the best superiors. I thank my Program Chair Dr. Pattabiraman V., School of Computing Science and Engineering and Dean Dr. Jeganathan L., School of Computing Science and Engineering for always guiding me on the right path and helping overcome all the barriers in my path to success. My sincere gratitude to our project coordinator Dr. Nithyanandam P.,Professor,School of Computing Science and Engineering for managing out project process in the best possible way. I also thank all other faculties at VIT University who have helped to make me a better professional and for guiding me in every way, especially Dr. Geetha S. for her counsel and motherly love and affection whenever it was needed by me. I would also like to thank Mr. Dinesh Vasan,Senior Developer NIC for always helping me with my errors and counseling me whenever I was stuck and for pro- viding guidance whenever required. Finally, I would like to thank everyone who has helped me directly or indirectly to complete this project Kayewan Mehernosh Karanjia Reg. No. 14MCA1012 School of Computing Science and Engineering, VIT University, Chennai
  • 6. Monitoring and Surveillance using Near Field Technologies for the Gov. of India v Contents Declaration i Certificate ii Abstract iii Acknowledgement iv 1 Introduction 1 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Challenges and Difficulty in the problem solving . . . . . . . . . 3 1.5 Aim(s) and Objective(s) . . . . . . . . . . . . . . . . . . . . . . . 3 1.6 Proposed System . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Overview / Literature Review 5 2.1 MPS (Mobility Platform services) . . . . . . . . . . . . . . . . . 5 2.2 Dashboard Platform Services . . . . . . . . . . . . . . . . . . . 6 2.3 Libelium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 Restful Web-Services . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5 NFC with Cordova . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.6 Time Line Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 System Design 9 3.1 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 Feasibility Study . . . . . . . . . . . . . . . . . . . . . . . . . . 10 School of Computing Science and Engineering, VIT University, Chennai
  • 7. Monitoring and Surveillance using Near Field Technologies for the Gov. of India vi 3.4 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . 10 3.5 Services to be developed and offered . . . . . . . . . . . . . . . 11 3.6 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . 11 3.7 Non-Functional Requirements . . . . . . . . . . . . . . . . . . . 11 3.8 Data Flow Daigram . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.9 Technologies Used . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.9.1 D3js Chart library . . . . . . . . . . . . . . . . . . . . . 21 3.9.2 Apache Cordova (PhoneGap) . . . . . . . . . . . . . . . 21 3.9.3 Google Maps . . . . . . . . . . . . . . . . . . . . . . . . 22 3.9.4 Leaflet . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.9.5 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.10 Modular Description . . . . . . . . . . . . . . . . . . . . . . . . 23 3.10.1 Authorization and Access Control . . . . . . . . . . . . . 23 3.10.2 Chart Rendering Module . . . . . . . . . . . . . . . . . . 24 3.10.3 Map Rendering Module . . . . . . . . . . . . . . . . . . 25 3.10.4 NFC MODULE . . . . . . . . . . . . . . . . . . . . . . . 27 4 Implementation of System/ Methodology 32 4.1 Flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.2 Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3 The Software Process Model . . . . . . . . . . . . . . . . . . . . 35 4.4 Testing Techniques Used . . . . . . . . . . . . . . . . . . . . . . 36 4.4.1 White Box Testing: . . . . . . . . . . . . . . . . . . . . . 36 4.4.2 Black Box Testing . . . . . . . . . . . . . . . . . . . . . 36 4.4.3 Compatibility Testing . . . . . . . . . . . . . . . . . . . . 37 4.4.4 Functional Testing . . . . . . . . . . . . . . . . . . . . . 37 4.4.5 System Testing . . . . . . . . . . . . . . . . . . . . . . . 37 4.4.6 Junit Test Case . . . . . . . . . . . . . . . . . . . . . . . 38 5 Results and Discussions 39 6 Conclusion and Future Work 41 Appendices 42 (A) Screenshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 (B) Sample Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Bibliography 53 School of Computing Science and Engineering, VIT University, Chennai
  • 8. Monitoring and Surveillance using Near Field Technologies for the Gov. of India vii List of Figures 2.1 Time line chart . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 DFD Level 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 DFD Level 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4 DFD Level 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.5 DFD Level 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.6 DFD Level 2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.7 DFD Level 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.8 DFD Level 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.9 DFD Level 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.10 DFD Level 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.11 DFD Level 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.12 DFD Level 8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.13 DFD Level 9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.14 DFD Level 9.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.15 DFD Level 10.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.16 DFD Level 10.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.17 DFD Level 11.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.18 DFD Level 11.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.19 DFD Level 12.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.20 5 factor authorization . . . . . . . . . . . . . . . . . . . . . . . . 23 3.21 Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.22 NFC Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.23 The Structure of an NDEF message . . . . . . . . . . . . . . . . 29 3.24 NDEF message structure with header bytes . . . . . . . . . . . . 30 4.1 Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 School of Computing Science and Engineering, VIT University, Chennai
  • 9. Monitoring and Surveillance using Near Field Technologies for the Gov. of India viii 4.2 Map Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3 Task Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.4 Task Completed . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.5 User Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.6 Incremental Process Model . . . . . . . . . . . . . . . . . . . . . 35 4.7 Test Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6.1 Splash Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.2 NFC Authentication . . . . . . . . . . . . . . . . . . . . . . . . . 43 6.3 Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.4 Pending Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 6.5 Pending Task 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.6 Missed Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.7 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 6.8 D3 Bar Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.9 D3 Pie Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.10 Map with markers . . . . . . . . . . . . . . . . . . . . . . . . . . 50 6.11 Map with info-window . . . . . . . . . . . . . . . . . . . . . . . 50 School of Computing Science and Engineering, VIT University, Chennai
  • 10. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 1 Chapter 1 Introduction This project is focused on providing enhanced services to an existing platform called Mobility Platform Services (M.P.S.) developed by the National Informatics Center, Tamil Nadu. Mobility Platform Services (MPS) is an open, comprehensive and advanced mobile application platform for smart phones and tablets, helping Government or- ganizations of all sizes to efficiently customize the requirements, emulate and de- ploy on multiple platforms. MPS is a service that the Application Service Provider (ASP) can use to perform various activities of mobile application development from registering of the mobile app, requirement customization, registering web services to fetch data from multiple domains and deliver the mobile app on mul- tiple platforms. The mobile apps that are offered from MPS are of two categories namely, Public Information Client providing information to citizen and Work from Anywhere Client for Govt. officials to carry out their field work, data collection, on site approvals and monitoring. ’A little progress everyday adds up to big results’ Keeping the above moto in my heart I started my journey as an intern at the Na- tional Informatics Center. After lots of research and thinking I took up the project of enhancing one of the best projects developed by NIC, MPS. The initial weeks were spent on understanding the complex processes and the system of NIC and figuring out what services could be developed as to make the system better and make it capable to help various departments and personals of the Government of India to develop mobile and desktop applications through this wonderful platform. To make the platform better and to make it state of the art the key was to adopt the School of Computing Science and Engineering, VIT University, Chennai
  • 11. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 2 latest concepts from the real world and make the platform capable of producing applications in the most minimal time and ones which can solve real life problems. New features like Maps, Automatic authentication, Authorization, Surveil- lance and monitoring, using Near Field Communication Technologies, Real Time Charts, Crowd Sourcing, etc. were proposed and developed during the course of the project. Each feature in this project will be uses multiple technologies. PostgreSQl database which is the best open source database is being used to maintain the back-end of the system. The payload of data is always in XML format to provide re usability and maintain open standards. The maps are rendered using the Google Maps Api and Leaflet Node which are the most widely used maps. The charts which are being rendered are Real Time Charts which are the latest innovation in visualization and use d3.js API to provide the best open source features for charts. The major part of this project is based on exploiting the Near Field (N.F.C) Technologies. The applications are developed in Cordova to implement the phone gap feature and provide platform independence. 1.1 Background The existing system is a platform named the Mobility Platform Services (M.P.S) which is developed and is being used by the Indian Government for develop- ing applications to solve real time problems for the different departments of the Indian Government. The application had basic feature to support application de- velopment along with modules to interactively design the applications. The ap- plications which were produced as outputs by the platform can be used on any platforms like Android, IOS, Windows, etc. as they were developed using the phone gap features. 1.2 Statement The task I was assigned was to Annalise and study the MPS platform and suggest some ways to make it better. I was briefed by expert developers and programmers for a couple of days on how the platform worked and how it was built. Extra research was done to understand and get hands on what technologies were used to develop the system. School of Computing Science and Engineering, VIT University, Chennai
  • 12. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 3 1.3 Motivation The expectation with me being the young blood in the team was to bring in in- novativeness and make the platform rich with the latest technologies and features used in the market. A good amount of time was spent to study the latest technolo- gies and to find ways to integrate them to a already well built and well planned system 1.4 Challenges and Difficulty in the problem solving i) Since these features were of the latest and upcoming trends and were born out of innovativeness, there was no way to find a similar existing system available for reference ii) Some of the technologies used were implemented just a few months back to proper documentation and tutorials were not available iii) As so many different technologies were used in one feature itself it was diffi- cult to convert our data and contents to different formats acceptable by each of the technologies. iv) Use of specialized hardware like NFC cards and devices, geo tags , Bluetooth tags, etc was crucial had to be performed with proper caution. v) Integration of all the different features and services. 1.5 Aim(s) and Objective(s) The aim is to develop services for the MPS platform in a way that those services add to making the product better to use and develop applications.Any service or feature which may add to the betterment of the Indian Government and makes life easy for the citizens of the country and the government servants is relevant to be developed and included in the project.The services are an application to perform by itself and they may or may not be related to each other. 1.6 Proposed System The main purpose of the project is to integrate multiple features and services in addition to the existing ones to enhance the platform with rich features.A list of School of Computing Science and Engineering, VIT University, Chennai
  • 13. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 4 latest real time features was summarized. A proposal to add new features like Near Field Communications, Interactive and informative maps Tracking and Monitor- ing activities, Real Time Charts (RTC), 5 Factor Authentication, etc were pro- posed.These features could provide multiple services that could be added to the MPS platform and then the users of the MPS platform could use it to make ap- plications with these features included in them.Now to exhibit the functionality and working of these features it was appropriate to present a Proof of Concept (P.O.C.). The POC which I intended to develop was a beat monitoring system which will be produced as an output from the MPS Platform and will be capable of providing all the new services and features which were added. The Beat Mon- itoring System help the Police Authorities to mange and monitor the beat or the parole process which is done every night and keep a check that the job assigned to the employees is completed properly and with authenticity School of Computing Science and Engineering, VIT University, Chennai
  • 14. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 5 Chapter 2 Overview / Literature Review 2.1 MPS (Mobility Platform services) Mobility Platform Services (MPS) is an open, comprehensive and advanced mo- bile application platform for smart phones and tablets, helping Government orga- nizations of all sizes to efficiently customize the requirements, emulate and deploy on multiple platforms. MPS is a service that the Application Service Provider (ASP) can use to perform various activities of mobile application development from registering of the mobile app, requirement customization, registering web services to fetch data from multiple domains and deliver the mobile app on mul- tiple platforms. The mobile apps that are offered from MPS are of two categories namely, Public Information Client providing information to citizen and Work from Anywhere Client for Govt. officials to carry out their field work, data collection, on site approvals and monitoring. Innovations in MPS a) SDLC is eliminated. b) Requirement Analysis Prototype phase is live after every design change as SMS, email. c) Iterative Design, feedback/review and the Requirement Freezing. d) Alerts can be sent to all stakeholders for concurrence. e) The mobile app is launched as soon as the required domain web service is pro- vided by ASP. f) The architecture is loosely coupled. School of Computing Science and Engineering, VIT University, Chennai
  • 15. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 6 g) Pay load between layers is encrypted XML data. h) Restful web services are Secured Socket Layer for External application inte- gration. 2.2 Dashboard Platform Services The Dashboard Platform Services is an easy to use Platform service, where the user can easily configure their requirements with readily available themes, vari- ety of charts and layouts to deliver the desired dashboard. The Dashboard is a real-time user interface showing a graphical presentation of the user information as charts and data. User will be able to configure one or more charts using one of the preferred layouts. Features of the Dashboard are: a) Design and development of dashboard is eliminated from SDLC b) Loosely Coupled Architecture with 3 layers such as Application Layer, Web Services Layer and Data Layer c) Personalization is fully supported. Multiple themes, logo, background designs are available for various requirements under DPS d) Statistical Analysis on the usage, pattern, location and device are available un- der DPS e) Immediate emulator review after Customization with preview over email and SMS 2.3 Libelium Libelium designs and manufactures hardware and a complete software develop- ment kit (SDK) for wireless sensor networks so that system integrators, engi- neering, and consultancy companies can deliver reliable Internet of Things (IoT), M2M, and Smart Cities solutions with minimum time to market. Our versatile platform allows implementation of any Wireless Sensor Network, from Smart Parking to Smart Irrigation solutions. School of Computing Science and Engineering, VIT University, Chennai
  • 16. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 7 2.4 Restful Web-Services 1. This book was very helpful to me to figure out a new way to access and transport data payload across various different platforms. 2. Restful web-services play a very important role in this system and are used in almost every module of the system. 3. The use of these Restful web services is used to get data from the database and then transport it to the cream layer like Android, HTML, Cordova, etc. 2.5 NFC with Cordova This plugin is used to add the NFC feature in cordova and use it to develop the application. This pluging is supported with any Cordova version above the 3.0 version This plugin is used to add the following features :- a) Read data from NFC tags b) Write data to NFC tags c) Send data to other NFC enabled devices d) Receive data from NFC devices School of Computing Science and Engineering, VIT University, Chennai
  • 17. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 8 2.6 Time Line Chart Figure 2.1: Time line chart School of Computing Science and Engineering, VIT University, Chennai
  • 18. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 9 Chapter 3 System Design 3.1 Hardware Requirements a) A Decent Computer system with standard configuration. b) Arduino Micro Controller c) NFC Tags d) Geo Tags e) Bluetooth Tags f) R F Tags g) Mobile Devices 3.2 Software Requirements a) Web services b) Android SDK. c) Google Maps Api d) Eclipse e) Ajax f) XML Support g) JAVA h) Arduino SDK i) Leaflet Maps School of Computing Science and Engineering, VIT University, Chennai
  • 19. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 10 3.3 Feasibility Study This service will improve monitoring and authentication of multiple entities which government need to monitor. Those entities should be NFC enabled, these entities should also transmit the lat long from the GPS system and it can be further used in government services. For proper authentication we will use a NFC authentication which will be NFC cards. Once the authentication is done using NFC, Geographic tags should be enable in the device used by the entity, device will transmit the data which is basically the lat long, time stamp and NFC tag ID which would be taken from the system and will be stored at the server and then continuous tracking can be done. 3.4 System Architecture Figure 3.1: System Architecture School of Computing Science and Engineering, VIT University, Chennai
  • 20. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 11 3.5 Services to be developed and offered The Following services will be developed and offered by me to make the mobility platform service better and more feature rich :- a) NFC features like read NFC data, Write NFC data on cards and other NFC sensors, Read/Write encrypted data b) The map feature where we can display maps with multiple locations and mul- tiple group classified markers with info window with each of them. c) Real Time Charts which are the latest innovation in visualization concepts will be used to display analytical and statistical data. d) Front and Styles editing system which will help developers and users edit the look and feel of their systems in a easy and interactive way. e) Auto WI-Fi authentication using NFC Cards. f) Authorization and access control g) Meeting ambiance h) Tracking and Monitoring 3.6 Functional Requirements a. The user identification credentials like username password pair, nfc card, mo- bile IMEI no, etc. whatever would fit into the standards of our 5 Factor Authenti- cation feature. b. The task details for which are user specific and are available on a daily basis. c. The locations of the entities involved in every tasks and meta data about them d. The details of all the entities with their NFC card numbers, credentials, etc. e. Weekly statistics of analysis made on events and processes. f. Internet Connection. g. NFC enabled mobile or device. 3.7 Non-Functional Requirements a. Additional Details of in a task like description, image, etc. b. Annotations for multiple charts c. Additional Info Window details like temperature, town name, population, etc. d. Drilled Down Charts School of Computing Science and Engineering, VIT University, Chennai
  • 21. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 12 3.8 Data Flow Daigram — Figure 3.2: DFD Level 0 School of Computing Science and Engineering, VIT University, Chennai
  • 22. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 13 Figure 3.3: DFD Level 1.1 Figure 3.4: DFD Level 1.2 School of Computing Science and Engineering, VIT University, Chennai
  • 23. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 14 Figure 3.5: DFD Level 2.1 Figure 3.6: DFD Level 2.2 School of Computing Science and Engineering, VIT University, Chennai
  • 24. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 15 Figure 3.7: DFD Level 3.1 Figure 3.8: DFD Level 3.2 School of Computing Science and Engineering, VIT University, Chennai
  • 25. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 16 Figure 3.9: DFD Level 4.1 Figure 3.10: DFD Level 4.2 School of Computing Science and Engineering, VIT University, Chennai
  • 26. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 17 Figure 3.11: DFD Level 5.1 Figure 3.12: DFD Level 8.1 School of Computing Science and Engineering, VIT University, Chennai
  • 27. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 18 Figure 3.13: DFD Level 9.1 Figure 3.14: DFD Level 9.2 School of Computing Science and Engineering, VIT University, Chennai
  • 28. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 19 Figure 3.15: DFD Level 10.1 Figure 3.16: DFD Level 10.2 School of Computing Science and Engineering, VIT University, Chennai
  • 29. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 20 Figure 3.17: DFD Level 11.1 Figure 3.18: DFD Level 11.2 School of Computing Science and Engineering, VIT University, Chennai
  • 30. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 21 Figure 3.19: DFD Level 12.1 3.9 Technologies Used 3.9.1 D3js Chart library D3js is a JS library for charts based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3 have web standards gives the full capabilities of modern browsers, combining powerful and then apply data-driven transformations to the document. For example, you can use D3 to generate an HTML table from an array of numbers. Or, use the same data to create an interactive SVG bar chart with smooth transitions and interaction. 3.9.2 Apache Cordova (PhoneGap) Apache Cordova is an open-source mobile development framework. It uses stan- dard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, for neglecting each mobile platforms’ native mobile application de- velopment. Apache Cordova is a platform for building cross-platform mobile applications using HTML, CSS and JavaScript. It is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. Over time, the Apache Cordova distribution may contain School of Computing Science and Engineering, VIT University, Chennai
  • 31. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 22 additional tools that tie into other Adobe services, which would not be appropri- ate for an Apache project. As a developer building Apache Cordova applications, nothing has changed. It is still free, openly licensed, and the main focus of the Apache Cordova team. If your goal is to build cross platform apps with HTML, JS and CSS then keep on using Apache Cordova for everything you need 3.9.3 Google Maps Google Maps Are Web-based service that provides information about geographi- cal regions. In addition to conventional road maps, Google Maps offers satellite views of many places. In some cities, Google Maps offers street views. Google Maps also offers the following services: 1.We can plan our routes with Google map, whether it for car, bus or for your walk. Route planning is the coolest feature of Google maps 2.The Google Maps API allows web site to embed Google maps into their website. 3.Google Maps also offers location service for Mobile which can be enabled using GPS into your mobile device. It can work online as well as offline. 4.Google map also provide street maps for the travelers around the globe. 5.Google launched the Google Maps API in June 2005 to allow developers to integrate Google Maps into their websites. 3.9.4 Leaflet Leaflet Js is one of the best open-source library for interactive, responsive and portable device friendly maps using JavaScript. It is light weight, almost about 33 KB and it has all the mapping features most developers ever need. Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms, can be extended with lots of plu- gin, has a beautiful, easy to use and well-documented API and a simple, readable source code that is a joy to contribute to. 3.9.5 PostgreSQL PostgreSQL is a general purpose and object-relational database management sys- tem, the most advanced open source database system. PostgreSQL requires very minimum maintained efforts because of its stability. Therefore, if you develop ap- plications based on PostgreSQL, the total cost of ownership is low in comparison with other database management systems. PostgreSQL can store any type of data School of Computing Science and Engineering, VIT University, Chennai
  • 32. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 23 that you want you have in your database. We can store and retrieve information by the use of SQL statements. In technical terms, it has the following features: 3.10 Modular Description 3.10.1 Authorization and Access Control This module is used to authenticate different users who will be accessing the ap- plication internally and also who will use the application as an authentication and authorization mechanism. There will be a 5 Factor Authentication provided by this feature. In this feature we can authenticate using a normal username pass- word pair, then along with NFC cards, then with NFC Card and specific IMEI number and also with specialized digital signature. No other platform provides this level of sophistication when it comes to authorization. This feature can also be used for access control where the user can grand access to a service or location remotely. Figure 3.20: 5 factor authorization School of Computing Science and Engineering, VIT University, Chennai
  • 33. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 24 3.10.2 Chart Rendering Module This module deals with rendering Real Time Charts. The d3 js library which is the best open source option for visualizing data and statistics. All the analysis of the system can be visualized using these charts and also these charts can be used and integrated by any user in their applications. The data to be displayed is fetched from the database. We are using the PostgreSQL in our implementation. The data is fetched using a Java Restful Web service. The web service fetches the data from the database and returns a HTTP RESPONSE in the form of an XML String. This XML String is then abstracted in the form of JSON variables using a AJAX call. The JSON variables are then passed to the D3js and they are used to render the chart on a HTML page Sub Modules: i. Database ii. Web-service iii. Ajax Call iv. Chart Render with D3js library The Steps to Success: 1. Identifying what our analysis will do 2. Fetching the data and storing it in PostgreSQL 3. Creating a Web service to get data from PostgreSQL and host it as an chart, it can be any chart present in the D3 library. 4. Building our fronted using D3.js and some good old javascript. 5. Analysis of data from Government database, which data we can use for our application. 6. Fetch the dataset and try to create an informative analysis on the basis of the data attributes. 7. After storing the dataset into the PostgreSQL a web Service has to be created which can fetch that data from the database. 8. These web service will render an XML which will contain the data from the database School of Computing Science and Engineering, VIT University, Chennai
  • 34. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 25 3.10.3 Map Rendering Module 1. The map feature will be available in two flavors viz. in Google Maps and Leaflet Maps 2. Both the Maps will give full functionalities of maps but only difference in them is the Google api is not open source while the Leaflet API is open source. 3. The leaflet module map is a feature developed for the Mobility Platform Ser- vice at the National Informatics Center, Tamil Nadu. 4. This modules main functionality is to display responsive maps with multiple location and basic information about them. 5. The data to be displayed is fetched from the database. We are using the Post- greSQL in our implementation. 6. The data is fetched using a Java Restful Web service 7. The web service fetches the data from the database and returns a HTTP RE- SPONSE in the form of an XML String. 8. This XML String is then abstracted in the form of JSON variables using a AJAX call. 9. The JSON variables are then passed to the Leaflet API and they are used to render the map on a HTML page 10. as an authentication and authorization mechanism. 11. There will be a 5 Factor Authentication provided by this feature. Sub Modules: i. Database ii. Web-service iii. Ajax Call iv. Map Render with leaflet API 1. Database Module 1. The database is developed in the PostgreSQL 2. The data consist of the geographic locations, group details, marker details, group details, descriptions, images, etc 3. The data is stored in a standard SQL format. School of Computing Science and Engineering, VIT University, Chennai
  • 35. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 26 Figure 3.21: Map Data 2. Web Service I. The web-service is developed is RESTFUL Java Web-Service. II. The web-service fetches the data from the database and returns a HTTP RE- SPONSE in the form of an XML String. III. This XML String is then abstracted in the form of JSON variables using a AJAX call. 3. AjAX CAll The Ajax call runs on the client side.Its task is to call the web-service, catch the HTTP Response and then convert the XML data into JSON Objects.These JSON Objects can then be abstracted by the Leaflet API. 4. Map Render with leaflet Api The Leaflet API focuses on rendering one or more marker on different locations on the map. Along with this it has to manage the markers (i.e. pins) on the map and customize their appearance based on their groups.Markers with different groups are shown in different colors depending on their groups. These colors can be edited and customized using the editor in the MPS user interface. The users can also use customized icons instead of solid colors using the MPS user interface. Along with that there has to be an info window which pops up when a marker is clicked.The info window consists of the basic description, images and name value School of Computing Science and Engineering, VIT University, Chennai
  • 36. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 27 pairs about that specific location entity.The info window has the title of the item on the top left hand side title bar.Then comes the description of the item which is left justified and the image if provided is showed right justified.Then comes vari- ous name value pairs like temperature, town name, nearest village name, etc. 3.10.4 NFC MODULE 1. The NFC module is the main feature of the system . 2. It gives the system a cutting edge feature. 3. Near field technologies will be used for authentication, tracking, monitoring and various other features like auto WI-fi, meeting ambiance, etc. 4.NFC is the key feature to all the other features in this system. Features to be enabled using NFC a) Read tag id b) Read content c) Write content d) Read encrypted content e) Write encrypted content f) Make read only (lock) Actions and events to be triggered using NFC a) Show alert on the device and/or Record alert on the server b) Authorization (Registration on the device and/or on the server) c) Auto WI-fi (Device, Identity, Password) d) Meeting ambiance(Vibration mode, volume mute, register attendance, Get Agenda, Get docs) e) Access Control (Authorize and Trigger) f) Tracking (Geo tag, Frequency, server update ) g) Show alert on the device and/or Record alert on the server h) Authorization (Registration on the device and/or on the server) i) Auto WI-fi (Device, Identity, Password) j) Meeting ambiance(Vibration mode, volume mute, register attendance, Get Agenda, Get docs) k) Access Control (Authorize and Trigger) School of Computing Science and Engineering, VIT University, Chennai
  • 37. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 28 l) Tracking (Geo tag, Frequency, server update ) m) Open external application on the device: Music app,camera app,alarm, reminder, navigation, website, car mode, phone dial(call),run a secret code n) Open external application on the server: Calling a web service,a website,backup,trigger dashboard to monitor servers and services,remote authorization or permission NFC Actions(Alerts) Figure 3.22: NFC Action School of Computing Science and Engineering, VIT University, Chennai
  • 38. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 29 NDEF Structure NDEF is a binary format structured in messages, each of which can contain sev- eral records. Each record is made up of a header, which contains metadata about the record, such as the record type, length, and so forth, and the payload, which contains the content of the message. Think of an NDEF message like a paragraph, and records like the sentences within it. A well-formed paragraph is made up of sentences pertaining to one topic. Similarly, its good practice to use one NDEF message made up of several records to describe one subject, say, an address book entry. NFC transactions are generally short. Each exchange generally consists of only one message, and each tag carries just one message. Keep in mind the phys- ical circumstances of an NFC exchange: you tap your device to another device or tag, and the whole exchange happens while youre in contact with the other device or tag. You dont want to send a whole novel in a single exchange, so think of your NDEF messages as paragraph-length, not book-length. Youll see a workaround to this for sending large files in one of the final chapters of this book, but for now, consider one NFC exchange as one NDEF message, and think of one NDEF mes- sage as one or more short records. Figure 3.23: The Structure of an NDEF message An NDEF record contains a payload of data and metadata describing how to interpret the payload. Each records payload can be one of several different data types. The header for each record contains metadata describing the record and its place in the message, followed by its type and ID. After the header comes the payload. School of Computing Science and Engineering, VIT University, Chennai
  • 39. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 30 Figure 3.24: NDEF message structure with header bytes A NDEF record consists of a type name format (TNF), payload type, payload identifier, and the payload. The payload is the most important part of an NDEF record; its the content that youre transmitting. The TNF tells you how to interpret the payload type. The payload type is an NFC-specific type, MIME media-type, or URI that tells you how to interpret the payload. Another way to think about this is that the TNF is the metadata about the payload type, and the payload type is the metadata about the payload. The payload identifier is optional and allows multiple payloads to be associated or cross referenced. 5.Pending Tasks All the tasks which are updated by the admin are to be populated in a select box from where the user can select a particular task. The tasks are displayed and up- dated on a daily basis where the admin will update multiple tasks for multiple users and depending on the users login and authentication credentials he will be displayed the task assigned for him on a daily basis. Once the user selects the task he will be shown a map where he will be shown a map with the details of the location where he as to visit and get the NFC tapped from the entity of concern. If the user is within 500 meters of the location of the location given by the Admin the input feature in his device or phone whichever he is using will be activated and he can then use the device to input data regarding the beat process. Once the input feature is activated he can then go the personal or entity and get his NFC card or NFC signature from a device and then if he wants he can add additional details and descriptions to the report and submit the report. Once he submits a reports an update on the server is done with an accurate timestamp There is no specific order in which the user has to follow to finish or complete the tasks which are assigned to him by the Admin. All the task assigned by the Admin will be shown only for the specific user and will be shown only for 24 hours. The user can not try to complete the tasks nor will he be displayed any tasks after the completion of 24 School of Computing Science and Engineering, VIT University, Chennai
  • 40. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 31 hours. 6. Missed Tasks In this module all the task which were assigned to user if they are not completed during the course of twenty four hours form the time of assignment then those tasks are shown here. The missed tasks shown are shown date wise and the user can see all his missed tasks for the past month. The user can select a date from the data time picker and all his missed tasks for the day will be shown there. He can also select individual tasks to see the tasks in detail 7. History It is the combination of the above two menus. In this module all the task which were assigned to user if they are not completed during the course of twenty four hours form the time of assignment then those tasks are shown here and also the tasks completed will be shown. The missed tasks shown are shown date wise and the user can see all his missed tasks for the past month. The user can select a date from the data time picker and all his missed tasks for the day will be shown there. He can also select individual tasks to see the tasks in detail 8. Weekly Annalysis Here analysis is performed on all the different events. This analysis once per- formed is visualized using Real Time Charts. Real time charts are using the d3js library to visualize charts in the latest features of the real time market. These charts show analysis which are done on a weekly basis School of Computing Science and Engineering, VIT University, Chennai
  • 41. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 32 Chapter 4 Implementation of System/ Methodology 4.1 Flow chart Figure 4.1: Flow Chart School of Computing Science and Engineering, VIT University, Chennai
  • 42. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 33 4.2 Data Dictionary Figure 4.2: Map Master Figure 4.3: Task Master School of Computing Science and Engineering, VIT University, Chennai
  • 43. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 34 Figure 4.4: Task Completed Figure 4.5: User Master School of Computing Science and Engineering, VIT University, Chennai
  • 44. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 35 4.3 The Software Process Model The software process model adopted is the incremental model. The incremental model is the combines the features of both the linear iterative approaches of proto- type model as well as the sequential model both combined together. Small incre- ments of software are developed and then delivered and then on each increment the linear sequential model is applied. On each process flow of each increment prototyping is applied. The first increment that is delivered is considered as the core product. The final needs of the product are addressed by the core product. The client evaluates and reviews every increment. Based on client feedback for the core product developers prepare a plan for the next increment. At times, it is even used on a test basis. New features and functionality are also taken into consideration. The above process is applied to each increment that is delivered. Figure 4.6: Incremental Process Model School of Computing Science and Engineering, VIT University, Chennai
  • 45. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 36 4.4 Testing Techniques Used 4.4.1 White Box Testing: White box testing is a security testing method that can be used to validate whether code implementation follows intended design, to validate implemented security functionality, and to uncover exploitable vulnerabilities. White box testing re- quires access to the source code. Though white box testing can be performed any time in the life cycle after the code is developed, it is a good practice to perform white box testing during the unit testing phase. White box testing requires know- ing what makes software secure or insecure, how to think like an attacker, and how to use different testing tools and techniques. The first step in white box test- ing is to comprehend and analyse source code, so knowing what makes software secure is a fundamental requirement. Second, to create tests that exploit software, a tester must think like an attacker. Third, to perform testing effectively, testers need to know the different tools and techniques available for white box testing. 4.4.2 Black Box Testing Black box testing takes an external perspective of the test object to derive test cases. These tests can be functional or non-functional, though usually functional. The test designer selects valid and invalid input and determines the correct output. There is no knowledge of the test object’s internal structure. Black box testing should make use of randomly generated inputs (only a test range should be spec- ified by the tester), to eliminate any guess work by the tester as to the methods of the function. Test monitoring tools should be used whenever possible to track which tests have already been performed and the outputs of these tests to avoid repetition and to aid in the software maintenance. Data outside of the specified input range should be tested to check the robustness of the program. School of Computing Science and Engineering, VIT University, Chennai
  • 46. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 37 4.4.3 Compatibility Testing It is a testing technique used to Ensure Compatibility of an application. Various tests were done to ensure that multiple technologies are compatible with the appli- cation. We could not use the latest version of Cordova and had to work in Cordova 3.0.1 version so that all the technologies are compatible. Still the application is not compatible for usage in windows phones. The application can show data in multiple platforms but can only take input from a NFC enabled android device. 4.4.4 Functional Testing Functional testing deals with the process of testing individual functions. A couple of tests were run on the d3.xml() function, where a multiple data in xml format was sent and checked if it was parsed properly to generate data and render charts from that data. Other function like the various web-services were tested to fetch data from the database and convert it into XML tags. The NFC cards were tested for read and write operations where the cards were checked if they always gave accurate reading. 4.4.5 System Testing Testing conducted on a complete, integrated system to evaluate. The systems compliance with its specified requirements. System testing falls within the scope of Black Box Testing. Once the whole system was developed various inputs were given to it thinking of real time scenarios and feeding real time data to check the robustness of the system. The demo versions of the application were also dis- tributed to friends and colleagues and asked for their feedbacks and suggestions. School of Computing Science and Engineering, VIT University, Chennai
  • 47. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 38 4.4.6 Junit Test Case Figure 4.7: Test Case School of Computing Science and Engineering, VIT University, Chennai
  • 48. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 39 Chapter 5 Results and Discussions As a result of this project a set of advanced services will be added to the mobil- ity platform services platform. These services perform a specific task and add a definite feature to the platform. Using one or multiple features from this plat- form a user can make an application for his use within comparatively very less time. The advanced services developed for this platform consist of features like Maps, Charts, Near Field Communications, Crowd Sourcing, Tracking and Mon- itoring and 5 Factor Authentication. As a Proof of Concept (P.O.C) an application named The Beat Management Process is developed using the MPS platform. Ev- ery single night one or many police officers are required to visit multiple places for parole. When a policeman checks into a location assigned to him it is called a BEAT. He might be required to take multiple BEATS in a single session. To check if the policeman has completed all the required BEATS this system is used. But is mainly designed to help the Policemen perform his BEATs properly and in assist him to finish the task in an efficient way. Each policeman has to login to the system where he can be authenticated using any of the 5 Factor Authentication methods like NFC cards, Username-Password pair, mobile IMEI no, etc. Once the user is authenticated he will be displayed a menu with multiple options like Pending Tasks, Missed Tasks, History and Weekly Analysis. The user will be able to view a list of all the tasks still pending for him to complete in the form of a dropdown list. He can then select a particular job and that job can be displayed to him with its basic details like location on the map, description and instructions. Once the policeman is at a point of BEAT he can ask the person to be checked to place his NFC card on the mobile or NFC enabled device and the BEAT success is updated on the server and the phone. The above process is repeated for all the tasks assigned to him in a day. In the next tab the user can see all the tasks he School of Computing Science and Engineering, VIT University, Chennai
  • 49. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 40 has missed in the past and in the History tab the user can see all the task he has completed and the ones he has missed in a specific time period. Weekly analysis is done of the BEATs done by the user and a visualization of those analysis is done using the d3js Real Time Charts (RTC). School of Computing Science and Engineering, VIT University, Chennai
  • 50. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 41 Chapter 6 Conclusion and Future Work I did not make one application or website but develop a few services and features which will provide to make multiple applications and systems using the MPS plat- form. The Beat Management System is a proof of concept (POC) for the different applications that can be developed using the MPS platform. These services can be used to enhance or build any application in future to solve a problem or provide services to the Indian Government. The system will provide scalable and reusable services, that can be integrated to any existing platform or a newly developed one. The system will support NFC authentication and NFC services and also provide monitoring and surveillance facilities using Geo Tags, RF Tags and other multiple sensors. The system provides all features of Google Map API and Leaflet Maps API for the users perusal to provide them features to visualize single or multiple geographic locations. Developing this system was one of the best experiences of my life and I still have two more months left of internship. During this span of time I will be working on couple of more services and features like crowd sourc- ing, Tracking using Bluetooth devices, etc. Whatever features are prepared can be used to develop various applications of different types. Using these service and features one can make any app he wants taking advantage of the latest features and technologies. Anything else which will make the product better would be un- dertaken by me. To conclude I would like to state that I have learnt a lot of new technologies like Web-service designing, javascripting, visualization techniques like d3js and Maps, Cordova App Development, NFC, etc. and have gained ex- perience in the professional environment and I am grateful to all at the National Informatics Centre to guide me and support me on every step and allowing me to evolve and become a better professional School of Computing Science and Engineering, VIT University, Chennai
  • 51. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 42 Appendices (A) Screen Shot Figure 6.1: Splash Screen School of Computing Science and Engineering, VIT University, Chennai
  • 52. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 43 Figure 6.2: NFC Authentication School of Computing Science and Engineering, VIT University, Chennai
  • 53. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 44 Figure 6.3: Menu School of Computing Science and Engineering, VIT University, Chennai
  • 54. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 45 Figure 6.4: Pending Task School of Computing Science and Engineering, VIT University, Chennai
  • 55. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 46 Figure 6.5: Pending Task 2 School of Computing Science and Engineering, VIT University, Chennai
  • 56. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 47 Figure 6.6: Missed Task School of Computing Science and Engineering, VIT University, Chennai
  • 57. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 48 Figure 6.7: History School of Computing Science and Engineering, VIT University, Chennai
  • 58. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 49 Figure 6.8: D3 Bar Chart Figure 6.9: D3 Pie Chart School of Computing Science and Engineering, VIT University, Chennai
  • 59. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 50 Figure 6.10: Map with markers Figure 6.11: Map with info-window School of Computing Science and Engineering, VIT University, Chennai
  • 60. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 51 (B) Sample Coding Sample Web-Service @POST @Path ("/Location1") @Produces ("text/xml") public String Location1(@Context HttpServletResponse httpServletResp { String output=new String(); Connection c = null; Statement stmt1 = null; try { Class.forName("org.postgresql.Driver"); c = DriverManager .getConnection("jdbc:postgresql://localhost:5432/Beatp", "postgres", "kay123"); c.setAutoCommit(false); System.out.println("Opened database successfully"); stmt = c.createStatement(); ResultSet rs = stmt.executeQuery( "SELECT station, pscode, x, y FROM output+= "<sdp><viewmap type="google"><Location>"; while ( rs.next() ) { String station = rs.getString("station"); String pscode = rs.getString("pscode"); String lat = rs.getString("x"); String lng = rs.getString("y"); System.out.println(station); output+="<response lat=""+lat+"" lng=""+lng+"" value=""+sta } output+="</Location> </viewmap></sdp>"; rs.close(); stmt.close(); c.close(); } catch ( Exception e ) { System.err.println( e.getClass().getName()+": "+ e.getMessage() ); System.exit(0); School of Computing Science and Engineering, VIT University, Chennai
  • 61. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 52 } return output; } Sample XML <sdp> <viewmap type="google"> <group name="0 " value="police" markercolor="blue"> <responses lat="13.00437449" long="80.252406590000007" value="J2 Ada <response name="Town" value="Chennai"/> <response name="Degree" value="34%celcisus"/> <response name="Image" value="image/1.png"/> <response name="Description" value="null"/> </group> <group name="1 " value="water" markercolor="red"> <responses lat="12.98699234" long="80.260591610000006" value="J6 Thi <response name="Town" value="Chennai"/> <response name="Degree" value="44%celcisus"/> <response name="Image" value="image/2.png"/> <response name="Description" value="null"/> </group> <group name="2 " value="temple" markercolor="pink"> <responses lat="12.931626039999999" long="80.252467019999997" value= <response name="Town" value="Chennai"/> <response name="Degree" value="34%celcisus"/> <response name="Image" value="image/3.png"/> <response name="Description" value="null"/> </group> </viewmap> </sdp> School of Computing Science and Engineering, VIT University, Chennai
  • 62. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 53 Sample Ajax Call $(document).ready(function(){ var group; var markercolor $.ajax({type: "POST",url: "http://localhost:8086/oralcancerdashboard datatype: "xml",error: function(jqXHR, textStatus, errorThrown) { console.log(’Error: ’ + errorThrown); }, success: function(xml) { var i =0; $(xml).find(’group’).each(function(){ "<h4>"+$(this).attr(’value’).toString()+"</h4>",$(this).attr(’lng’), group = $(this).attr(’value’).toString(); markercolor = $(this).attr(’markercolor’).toString(); }); }); }); Sample NFC Read function nfcread() {var errorflag=1; function nfcHandler (nfcEvent) { var tag = nfcEvent.tag; var ndefMessage = tag.ndefMessage; var payload = nfc.bytesToString(ndefMessage[0].payload); var tagId = nfc.bytesToHexString(tag.id); var value = payload.substring(3); if(tagId==tag[i]){ alert("Beat Sucessful for"+payload);} else {alert("Invalid Card");}}; School of Computing Science and Engineering, VIT University, Chennai
  • 63. Monitoring and Surveillance using Near Field Technologies for the Gov. of India 54 Bibliography [1] Applying Google Maps,Christophe Vandeviver,2010 [2] Apache Cordova Programming,John M. Wargo 2015 [3] Begin NFC with PhoneGap,By DonColeman,Oreilly [4] Data Visualization with d3.js,Teller, Swizec,2013 [5] Data-Driven Documents Michael Bostock, Vadim Ogievetsky,2013 [6] Data Visualization with D3.js Cookbook,Nick Qi Zhu - 2013 [7] e-Gov Mobility Platform Services: http://informatics.nic.in/pdfs/89bad940.pdf [8] Interactive Data Visualization for the Web,Scott Murray,2011 School of Computing Science and Engineering, VIT University, Chennai