DEC1618: Community Awareness System for Android DevicesThe Team: Adit Kushare, Brad Anson, Erik Fetter, Jason Wong, Matt Gerst, Shikhar Vats
Advisors: Daji Qiao, George Amariucai
Clients: National Security Agency, Iowa State University
DEC1618: Community Awareness System for Android Devices
TestingOverview: ● The sensor layer is responsible for collecting raw
data whenever a sensor request from the network
is received (Step 4 in the diagram)
● Sensors include Accelerometer, Gyroscope,
Barometer, Camera, Microphone, etc
● Sensor data storage handled by SQLite
Challenges:● Recording audio or video in the background while
the device’s screen was off
● Supporting simultaneous sensor requests from
different devices
● Collecting sensor data using handlers in a
procedural way
Overview:● The application layer visualizes the network using
Bluetooth Received Signal Strength Indicator (RSSI)
and provides a UI to interact with the network
● Interactions include requesting a 5 second video, a
5 second audio clip, a live stream of sensor data,
texting, and calling (Steps 1,7 in the diagram)
Application Architecture
Application Layer
Networking Layer
Sensor Layer
Traditionally, Android devices require central infrastructure such as a cell tower to relay data to other devices. In an ad-hoc mesh network, each device helps in relaying data throughout the network by communicating directly with nearby devices.
What is a Mesh Network?
The goal of the project is to design and implement a community awareness system for Android devices using an ad-hoc mesh network. Devices in the network will be able to transmit video, audio, and other sensor data on demand and periodically to all other devices. Unfortunately, Android devices do not natively support connecting to an ad-hoc network.
Problem To Be Solved
Natural Disaster Crews
Firefighters
Police Officers
US Military
● Each soldier in a squadron would have an Android device○ Squad leader can track squadron movement○ Request a video from soldier under enemy fire○ Request accelerometer data from missing soldier
Possible Users
Each Android device is paired wirelessly with a TP Link portable router in order to increase its effective communication distance and connection reliability. This router was chosen because of its compact size and it is relatively inexpensive at just $28. In addition to the routers, we modified an open-source application called Serval Mesh to meet our projects networking needs.
Final Design
Technologies Utilized
● Java - used for Android Development● C - used for the networking code● JNI/NDK- used to interface with C code in Android● HTML/JavaScript - used for visualizing the mesh● SQLite - used for data storage● Serval Mesh - used to enable key networking features● TP LINK MR3020 Router - flashed with OpenWrt
Project Timeline
Continuous Integration Testing● Every GIT commit triggers a build
bot to build our application and test whether the build was successful
● Automated unit tests
61
2
5
7
43
Phase I - Draft Application ArchitectureObjectives:✓ Conduct market research✓ Research Android sensor capabilities✘ Research Wifi RSSI✓ Draft software and hardware designs
Results:● Selected Serval Mesh as our
application’s backbone● Implemented test applications to
access video and audio sensors● Found that Wifi RSSI would not
work for our project’s needs
Results:● Implemented on-demand
video/audio/sensors● Unable to record audio/video while
the screen is off● Chose to use Bluetooth RSSI● Implemented a basic visualization
Phase III - Extended Functionality and UI
Objectives:✓ Polish up the UI✓ Integrate RSSI into the visualization✓ Create a custom file transfer and
sensor request protocol to improve application performance
✓ Record audio/video while the screen is off
Results:● Implemented a new robust UI● Integrated Bluetooth RSSI with the
mesh visualization ● Implemented a custom sensor
request and file transfer protocol● Successfully recorded audio/video
while the device’s screen was off by tweaking Android’s SurfaceView
Theoretical Proof● File transfers using the MSP
protocol guarantee data delivery; this is a characteristic of MSP and its connection-oriented design
Design Requirements
Key Functional Requirements● Communication over an ad-hoc mesh network● Visualize the basic network topology● Support the transfer of files/data over the network● Graph a live stream of sensor data from a device
Key Non-functional Requirements● Intuitive UI● Data transfer times should be reasonable● Support a relatively small network of 10-20 devices
Challenges:● Drawing graphics in Android consumes a lot
of power, to compromise we used
JavaScript and Android’s WebView to
display the visualization
Overview:● The network layer is responsible for establishing and
maintaining a connection between the android
devices in the system (Steps 2,3,5,6 in the diagram)
● The mesh networking is off-loaded to the wireless
routers flashed with OpenWrt and Serval Mesh
● Data transfers use a modified Transmission Control
Protocol (TCP) called Mesh Streaming Protocol (MSP)
● Sensor requests use a modified User Datagram
Protocol (UDP) called Mesh Datagram Protocol
(MDP)
Challenges:● Reducing data transmission delays
● Supporting concurrent file transmissions
Phase II - Preliminary DesignObjectives:✓ Develop a sensor request and file transfer protocol✘ Record audio/video while the screen is off✓ Research Wifi RSSI Alternatives✓ Create a visualization of the ad-hoc mesh network