Home
Technical & User Manual
Contents
1. lt measurement gt lt measurement timestamp 1281633735823 longitude 0 0913 latitude 52 211 gt lt measurement gt lt measurement timestamp 1281633824394 longitude 0 0919 latitude 52 212 gt lt mac gt 00237679A39F lt mac gt lt mac gt 002567EA5AA4 lt mac gt lt mac gt 0026ED2A4295 lt mac gt lt measurement gt lt log gt The root node lt log gt includes the MAC address of the device that the ap plication is running on The child nodes of lt log gt are all lt measurement gt nodes which always have a timestamp attribute If GPS coordinates have been received then the lt measurement gt node will have a further two at tributes giving the longitude and latitude of the device location If any Bluetooth devices have been detected during the scan they will be added as child nodes lt mac gt of the lt measurement gt node Note that if neither GPS coordinates were received nor any MAC addresses detected there will not be a measurement added to the log 3 3 extra db This file is a CSV formatted database of all haggle interactions that the de vice partakes in and what the result of the interaction was Each interaction is listed on a new line and is stored in the following format Disease Name Incoming MAC Interaction Timestamp Interaction Re sult e Disease Name is a string that denotes the name of the disease sent in the interaction An example would be COLD or FLU
2. e Incoming MAC is the MAC address of the device that is sending the disease in the interaction e Interaction Timestamp is a timestamp in microseconds that denotes the system time at which the interaction began e Interaction Result is a value either 0 1 or 2 that denotes the result of the interaction 0 indicates that the device was not infected with the disease sent in the interaction 1 indicates that the device was infected with the new disease sent in the interaction and 2 indicates that the device was already infected with the disease sent in the interaction and so nothing happened For example the line FLU 00237679A39F 1281968156392 1 would indicate that the disease FLU was sent in the interaction by device 00237679A 39F at time 1281968156392 and that it infected the local device 1 4 User Manual The application was designed with as much automation as possible As such there isn t much for the end user to do or mess up so this section will focus on explaining the interface and where things can go wrong 4 1 Graphical User Interface The GUI of the application is very simple and consists of a single screen which lists information about the application run At the very top of the screen the device ID Bluetooth MAC address is listed This is for data gathering purposes only since it saves time having to look up the device MAC address in the Settings menu Virtual Disease Experiment _ Device 002
3. open up the Settings menu on the device and go to Applications make sure the Unknown sources option is checked Next mount the SD Card by either extracting it and directly plugging it into your work computer or by connecting the Android device to the computer via USB Copy the apk file that was created in the bin directory to the SD Card Unmount the SD Card and open up the file manager application on the Android device navigating to the SD Card and click on the apk file to install it After the application is installed you can execute it from the standard application menu 2 5 2 Automatic Install Alternatively Eclipse can install the application onto any connected device First connect the Android device to your work computer via USB Then click the Run button that was used before to build the project A win dow entitled Android Device Chooser should appear and will list all de vices connected to the computer including the emulator if it was installed Choose the correct device from the list and click OK The application will now we installed on the device and will automatically start running If you wish to manually execute it later you can do so from the standard application menu 3 Data Logs When the application is run for the first time it creates a directory on the SD Card called VirtualDisease where it stores all of its data This includes a small database of diseases that the ph
4. be Waiting The GPS status will either be Scanning and will try to list the number of satellites it is currently connected to or will be Temporarily Unavailable or Lost Signal depending on what error is given by the chip 4 2 Quitting the Application The menu button on the device allows the user to quit the application Press ing it will bring up the following menu AR a UULZ5 0 F9A575 Data Collection Bluetooth Waiting GPS Waiting J Quit Figure 2 The menu screen Clicking on the Quit button will bring up a warning box which asks the user whether they want to completely quit the application or to simply put it into the background so it is still running This application can run in the background collecting and sending data whilst you use other applications It is recommended that you run this application in the background rather than quitting it completely Run in background Quit completely Figure 3 The quit application warning box It should be noted that pressing the Home button on the device should also put the application into the background 4 3 Starting the Application without Bluetooth or GPS It is not necessary to enable Bluetooth or GPS before starting the application and the application will run perfectly smoothly although no measurements will be taken until at least one is turned on If Bluetooth is disabled upon application start the ap
5. 376797F32 Health You are infected with the following diseases FLU from 00237679CE8A Infectious COLD from 0023767961F8 Exposed You have recovered from SARS from 00237679A39F Data Collection Bluetooth Scanning GPS Lost Signal Figure 1 The main interface of the application Below this is the Health status of the device When no diseases are present on the device the Health status is set to You are healthy However when one or more diseases are present the Health status is set to You are infected with the following diseases and lists them in the format Disease Name from Incoming MAC Disease Status Where Disease Name is a string denoting the name of the disease Incoming MAC is the MAC address of the device that infected the local device with the disease and Disease Status is either Exposed or Infectious If the device has recovered from any diseases it was infected with then the Health status is set to You have recovered from and lists the diseases along with the MAC address of the infecting device Finally below the health status is the Data Collection status which informs the user about what the Bluetooth and GPS chips are doing If the Bluetooth or GPS chips are disabled on the device the respective status will be listed as disabled Whilst the Bluetooth chip is scanning for nearby devices its status will be Scanning otherwise it will
6. Technical amp User Manual Adrian Hayter Contents 1 The System 1 1 1 Disease WMiodels a c 2m ees oe ke Ae a Gok Ss 2 2 Development 2 2 1 Directory Structure ve kod he Bae She Bd Ss Gerth kf 2 2 2 Setting Up Eclipse Gone Se thas te be Ge Sh 3 2 3 Setting Up Haggle oe ee en ee a a Bee 3 2A CA OTITIS a oe Sa se vas e Se BP ae Ss Se Sede ee gids tg Rae cite to a A 4 2 5 Deployment amp Execution lt lt ad s 4 4 2 eae we dee Boe Se 4 2 5 1 Manual Install o e tA ate ve die ese eas ee a ea 4 2 5 2 Automatic Install so ay 306 40a ka ee a ae 4 3 Data Logs 5 Ola diseases d bine tas s top ere i Se ee al ed RE a ot gas ak i 5 3 2 measurements log ooa a Eee d se Be ek ee eg 6 3 3 TOMER oue po herald go enai p aA Be bee ee oh ga a 7 4 User Manual 8 4 1 Graphical User Interface a des oe eh Hodes d Sarkar ed So eS 8 4 2 Quitting the Application 9 4 3 Starting the Application without Bluetooth or GPS 10 4 4 Manually Starting Haggle 2 2 0 11 1 The System The Virtual Disease Experiment is an Android application built to run on devices that support the haggle architecture The application broadcasts 1 information about virtual diseases it is currently infected with to all devices in range and receiving devices are infected by these virtual diseases based on a simple probability calculation The application logs all incoming diseases and stores information regarding
7. how they are processed It also regularly scans for Bluetooth and GPS recording any Bluetooth addresses and GPS location data in a separate log 1 1 Disease Model The disease model with which the spreading of diseases is simulated is a simple SEIR model In this model each device is originally susceptible to a disease Once it is infected by another device it becomes exposed for a specified time Whilst it is exposed a device has the disease but cannot yet infect other devices Once the exposed duration has run out the de vice becomes infectious for a specific time Whilst it is infectious the device can infect other devices each disease has an associated infection probability which indicates the likelihood that another device will be infected Once the infectious duration has run out the device is recovered from the disease and cannot be reinfected The SEIR model can be used to simulate SI diseases by setting the ex posed duration to 0 and the infectious duration to a really large number for example 2000 years SIR disease can be simulated by simply setting the exposed duration to 0 2 Development 2 1 Directory Structure All code was developed using the Eclipse IDE as this is the official Android development environment The Eclipse project folder for the application contains the following files and subdirectories e AndroidManifest xml is a required xml document that is compiled into the application It contains information
8. loper android com sdk installing html It should be noted that the Android emulator will not be able to use haggle so if you are only try ing to develop for a haggle environment the emulator doesn t need to be installed To open the project in Eclipse use the File Import menu and choose Existing Projects into Workspace 2 3 Setting Up Haggle The current build of haggle available for download 0 3 does not contain new changes that were implemented by Erik Nordstrom during this project devel opment These changes include a fix to the JNI implementation which was failing to remove references to deleted Java objects as well as a tweak to the Bluetooth settings allowing a device to be in discovery mode constantly As such you will need to compile the haggle source tree using a compiled version of the Android source code Instructions on how to do this are available on the haggle website http code google com p haggle wiki QuickStart Android 2 4 Compiling Projects in Eclipse should compile automatically but if this is not the case you can force a compilation by clicking the Run button green circle with a white arrow in Eclipse This will create a apk file in the bin directory which can be installed on the phone 2 5 Deployment amp Execution 2 5 1 Manual Install To manually install the application first use the Android Market to download a file manager application there are plenty available for free Then
9. me is a timestamp in microseconds that denotes the amount of time after initial infection that the disease is in an ex posed state and unable to infect other devices If you want the dis ease to be infectious immediately for testing experiments then set this value to 0 e Infectious Time is a timestamp in microseconds that denotes the amount of time after the exposed state has passed that the disease is infectious for and is therefore able to be transmitted to other devices e Infection Probability is double value that acts as the probability a device will be infected with the disease A value of 0 0 will render the disease harmless whilst a value of 1 0 will make it infect on every transmit Note that this value does not affect the actual transmissions of the disease which is all handled by haggle It is perfectly possible for two devices to be in close contact with each other and yet have no successful transmissions between them 3 2 measurements log This file is an XML document that stores the measurements of each successful scan the device does including the MAC addresses that it detects when doing a Bluetooth scan any GPS coordinates it receives and the time at which the scan was done An example of the XML is included below lt log mac 00237678959F gt lt measurement timestamp 1281632524440 gt lt mac gt 001F5BD7DD3B lt mac gt lt mac gt 58B035950083 lt mac gt lt mac gt 00237679A39F lt mac gt
10. one has a log of all measurements taken by the device and a potentially large database of all haggle interactions the device has taken part in 3 1 diseases db This file is a CSV formatted database which stores information about all the diseases that the device has been infected with Each disease is separated by a new line and is stored with the following format Disease Name Infector MAC Infection Timestamp Exposure Time Infectious Time Infection Probability e Disease Name is a simple string that denotes the name of the disease and can be any value provided it does not contain a comma An example would be COLD or FLU e Infector MAC is the Bluetooth MAC Address of the phone that infected the device with this disease It provides a way to keep track of which devices infected which as the infecting devices do not record who they send diseases to due to apparent limitations in haggle A device that is pre infected for purposes of starting an experiment should have its own MAC Address in this place as if it had infected itself All colons are removed from MAC Addresses so an example would be 00237678959F e Infection Timestamp is a timestamp in microseconds that denotes the time at which the infection arrived on the device as is generated by a call to System currentTimeMillis in Java It is used to calculate when the disease is in an exposed infectious and eventually cured state e Exposure Ti
11. ow be running on the device 11
12. plication will attempt to turn it on by itself and in most cases it will succeed Due to haggle running in the background it does not need any user permissions to turn discoverability mode on With GPS disabled the application will redirect the user to the Location Settings screen and ask the user via a popup message to enable GPS There is no current way of automating this and the user does not need to enable GPS for the application to work properly so they can simply press back at this stage if they want If GPS is required the end user will need to make sure the Use GPS satellites checkbox is ticked before pressing back to go back to the application main screen 10 Use GPS satellites Locate to street level requires more battery plus view of sky Screen unlock pattern Set unlock pattern Please enable GPS and return to the application Figure 4 The GPS enable screen 4 4 Manually Starting Haggle Haggle does not automatically start when the device boots but should start when the application runs However if it does not you may need to manually start the daemon To do this connect the device via USB to a computer with the Android SDK installed Navigate using a command line interface to the sdk tools directory and run the program adb shell It should connect to the shell running on the connected device Once connected run the command haggle amp and then exit the shell Haggle will n
13. that the device needs to run the application as well as what permissions are required by the device which the user confirms on installation e assets is an unused folder in the project e bin is a folder that contains all the binary files that are compiled in the project It stores all the compiled class files as well as the resulting apk file which is uploaded to the device and run to install the final application e default properties is an Eclipse file that stores information about the project This file should not be altered manually e gen is a folder that contains a generated R java file which allows an application to reference specific GUI elements This file should not be altered manually e lib is a custom folder that contains the haggle jar library which is included in the project and allows the application to interface to the haggle daemon running on the device e res is a folder that contains xml files which create the GUI layout of the application e src is a folder that contains all the source code of the application 2 2 Setting Up Eclipse Eclipse can be downloaded for free from http www eclipse org It runs on all major operating systems To develop for Android you will also need to install the Android SDK and the plugin for Eclipse Google have pro vided a full tutorial for installing both Eclipse and the SDK as well as documentation on how to set up an Android Emulator if you need one http deve
Download Pdf Manuals
Related Search
Related Contents
紙水分計KH-70 取扱説明書 Rev.0101 Cables Direct RJ-45 WORKSHOP ON C-DOT DSS PRODUCTS Pastourelle N°192 QRX235 - Zaxcom Software Installation comX and netJACK - Installing Istruzioni per l`uso Firestopping Manual de instrucciones para la autocaravana VAN, VAN FM/AM CD Clock Radio Copyright © All rights reserved.
Failed to retrieve file