Master's Thesis
Total Page:16
File Type:pdf, Size:1020Kb
LOW-COST EMBEDDED SECURITY SYSTEMS A Degree Thesis Submitted to the Faculty of the Escola Tècnica d'Enginyeria de Telecomunicació de Barcelona Universitat Politècnica de Catalunya by Javier Sánchez Buitrago In partial fulfilment of the requirements for the degree in ELECTRONIC SYSTEMS OF ENGINEERING Advisor: Sergi Bermejo Barcelona, January 2017 Abstract This project presents a low-cost device for IoT (Internet of Things) developed using open- source tools, which could be used in the field of security since it has some features that will make life safer for humans. In addition, an APP for Android mobile phone is provided to easily manipulate the interface. 1 Resum Aquest projecte presenta un dispositiu de baix cost per les IoT (Internet de les Coses) desenvolupat utilitzant eines de codi obert, el qual podria ser utilitzat en el camp de la seguretat, ja que té algunes característiques que faran la vida dels éssers humans més segura. A més, comptarà amb una APP per un smartphone Android, proporcionada per manipular fàcilment la interfície. 2 Resumen Este proyecto presenta un dispositivo de bajo coste para las IoT (Internet de Cosas) desarrollado utilizando herramientas de código abierto, el cual podría ser utilizado en el campo de la seguridad, ya que tiene algunas características que harán la vida de los seres humanos más segura. Además, contará con una APP para un Smartphone Android, proporcionada para manipular fácilmente la interfaz. 3 Revision history and approval record Revision Date Purpose 0 1/10/2016 Document creation 1 28/12/2016 Document revision DOCUMENT DISTRIBUTION LIST Name e-mail Javier Sánchez Buitrago [email protected] Sergi Bermejo [email protected] Written by: Reviewed and approved by: Date 14/9/2016 - 8/1/2017 Date 12/1/2017 Name Javier Sánchez Name Sergi Bermejo Position Project Author Position Project Supervisor 4 Table of contents Abstract ............................................................................................................................ 1 Resum .............................................................................................................................. 2 Resumen .......................................................................................................................... 3 Revision history and approval record ................................................................................ 4 Table of contents .............................................................................................................. 5 List of Figures ................................................................................................................... 8 List of Tables: ................................................................................................................. 10 1. Introduction .............................................................................................................. 11 1.1. Aims of the work ............................................................................................... 11 1.2. Scope ............................................................................................................... 11 1.3. Requirements and Specifications ..................................................................... 12 1.4. Work Plan, Packages and Task Milestones ...................................................... 12 1.4.1. Work Packages: ........................................................................................ 13 1.4.2. Milestones ................................................................................................. 16 1.4.3. Time plan and Gantt diagram .................................................................... 17 1.4.4. Deviations from the plan ............................................................................ 18 1.5. Organization of this document .......................................................................... 18 2. Security embedded systems: a review of the state of the art ................................... 19 2.1. Background ...................................................................................................... 19 2.2. Origin of the IoT ................................................................................................ 20 2.3. What is IoT ....................................................................................................... 20 2.3.1. IoT elements.............................................................................................. 21 2.3.2. Communication models ............................................................................. 22 2.3.3. IoT communication standards .................................................................... 24 2.3.3.1. Application protocols ............................................................................... 24 2.3.3.2. Service Discovery Protocols .................................................................... 24 2.3.3.3. Infrastructure Protocols ........................................................................... 24 2.4. Fundamental characteristics and requirements for IoT ..................................... 25 2.4.1. Characteristics ........................................................................................... 25 2.4.2. Requirements ............................................................................................ 26 2.5. Applications of IoT ............................................................................................ 27 5 2.6. Safety and Safety System ................................................................................ 27 2.7. A low Cost Embedded Security System ............................................................ 28 2.7.1. How works MQTT ...................................................................................... 29 2.7.1.1. Architecture ............................................................................................. 29 3. Methodology / project development: ........................................................................ 31 3.1. Design .............................................................................................................. 31 3.1.1. Architecture of the project .......................................................................... 31 3.2. Development .................................................................................................... 36 3.2.1. List of equipment ....................................................................................... 36 3.2.2. Device 1 .................................................................................................... 36 3.2.2.1. Raspberry pi zero .................................................................................... 36 3.2.2.2. Movement infrared sensor, HC-SR501 .................................................... 37 3.2.2.3. Ultrasonic sensor HC-SR04 .................................................................... 39 3.2.2.4. Battery Charge & Power Boost ................................................................ 40 3.2.3. Device 2 .................................................................................................... 41 3.2.3.1. Camera ................................................................................................... 41 3.2.4. Device 3 .................................................................................................... 42 3.2.4.1. GPS Module Ublox M6 ............................................................................ 42 3.3. Engineering & implementation. ......................................................................... 43 3.3.1.1. Raspbian ................................................................................................. 44 3.3.1.2. Broker ..................................................................................................... 44 3.3.1.3. Device 1 .................................................................................................. 45 3.3.1.4. Device 2 .................................................................................................. 53 3.3.1.5. Device 3 .................................................................................................. 55 3.4. Uses Cases ...................................................................................................... 57 3.4.1. Device 1 .................................................................................................... 57 3.4.2. Device 2 .................................................................................................... 57 3.4.3. Device 3 .................................................................................................... 58 3.5. Specification ..................................................................................................... 58 4. Frontend .................................................................................................................. 59 4.1. APP -Android .................................................................................................... 59 4.2. Design .............................................................................................................. 59 4.2.1. Login Page ................................................................................................ 60 4.2.2. Options & use ............................................................................................ 61 6 5. Results ...................................................................................................................