Cross-Platform Diagnostic Tool
Total Page:16
File Type:pdf, Size:1020Kb
Självständigt arbete på avancerad nivå Independent degree project second cycle M.Sc. Thesis Within Computer Engineering C, course, 30 points Cross-Platform Diagnostic Tool Ali Zamani Cross-platform Diagnostic Tool Abstract Ali Zamani 2013-07-11 Abstract In Automotive Industries, to be confident regarding the success of a planned operation, performing accurate methods in order to detect abnormal operating conditions, known as faults, is crucial. An effective method for diagnosis and fault recognition ensures the safety of the operation, reduces manufacturing cost and any other potential impacts. In addition, mobile solutions have been widely adopted among automotive manufactures during recent years and they have taken full advantage of mobile strategies. Accordingly, it is necessary for there to be a future-proof plan to control the diagnostic operations in advance. In this thesis, the immediate objective has been to offer a future-proof and user-friendly solution to assist engineers and service technicians in the monitoring, detecting, and diagnosing of faults on Toyota/BT/CESAB branded trucks. A mobile cross-platform framework is used to develop the diagnostic mobile solution which is not only able to be deployed on Android and iOS mobile platforms, but also provides wireless communication between truck machines and mobile devices through Bluetooth and Wi-Fi ad hoc technologies. The diagnostic mobile tool is capable of processing real-time controller area network messages and visualizing the condition of different sensors in a more user-friendly way through rich hybrid and client-side web user interfaces. The experience of evaluating a cross-platform diagnostic tool on different mobile operating systems proved that cross-platform mobile development methodology can be a reliable technique for developing projects that essentially require real-time data processing. In addition, it indicates that Apple iOS offers a better runtime performance than Google Android for the current tool. Keywords: Cross-platform Mobile Development, Automotive Diagnostic, Controller Area Network, Real-Time Data I Cross-platform Diagnostic Tool Acknowledgments Ali Zamani 2013-07-11 Acknowledgments First of all, I want to thank my examiner, Professor Tingting Zhang, for her support throughout my education at Mid Sweden University. I also want to thank my university supervisor, Dr. Ulf Jennehag, for his valuable support and suggestions in relation to reviewing this report. I would like to express my sincere gratitude to Patrick Blomqvist, R&D Electronics Group Manager at Toyota Material Handling Europe, who considered me for the thesis job and who made me feel comfortable with his warm welcome and for the time he spent to introduce me the organization. His belief in me was the most invaluable gesture and an enormous inspiration for improvement during the course of this thesis work. Big thanks to Mats Ahlstrand, my supervisor at TMHE, and Nicklas Wetterström for their valuable time in answering my continuous questions and clarifying technical aspects of the thesis job. Last and most importantly, I must acknowledge the generous support of my dear parents throughout my entire life. Also massive thanks to my adored wife, Maryam Farzad, for not only supporting me on the good days, but encouraging me to keep going on the dark days. I dedicate my M.Sc. degree to my beloved family. II Cross-platform Diagnostic Tool Table of Contents Ali Zamani 2013-07-11 Table of Contents ABSTRACT ............................................................................................................................... I ACKNOWLEDGMENTS ............................................................................................................ II TABLE OF CONTENTS ..................................................................................................... IV TERMINOLOGY ...................................................................................................................... VI 1 INTRODUCTION .......................................................................................................... 1 1.1 BACKGROUND AND PROBLEM MOTIVATION ............................................................. 2 1.2 OVERALL AIM ......................................................................................................... 3 1.3 SCOPE ................................................................................................................... 3 1.4 CONCRETE AND VERIFIABLE GOALS ........................................................................ 4 1.5 OUTLINE ................................................................................................................ 5 2 THEORY ....................................................................................................................... 6 2.1 CONTROLLER AREA NETWORK ............................................................................... 6 2.1.1 History .......................................................................................................... 6 2.1.2 CAN Data Exchange Principles ................................................................. 6 2.1.3 Message Frame Format ............................................................................. 7 2.1.4 CAN and OSI Model.................................................................................... 8 2.1.5 CANopen ..................................................................................................... 9 2.2 MOBILE APPLICATION DEVELOPMENT .................................................................. 10 2.2.1 Architectural Considerations .................................................................... 10 2.2.2 Mobile Application Practices .................................................................... 11 2.2.3 Cross-Platform Mobile Development ....................................................... 12 2.2.4 Cross-Platform Mobile Application Architecture...................................... 14 2.2.5 MoSync Framework .................................................................................. 16 3 METHODOLOGY ....................................................................................................... 18 3.1 DEVELOPMENT PROCESS..................................................................................... 18 3.2 SYSTEM COMPONENTS ........................................................................................ 19 3.2.1 Forklift ........................................................................................................ 19 3.2.2 Mobile Device ............................................................................................ 19 3.2.3 Wireless Gateway ..................................................................................... 19 3.3 HARDWARE MODULES.......................................................................................... 19 3.4 SOFTWARE TOOLS ............................................................................................... 20 3.4.1 Integrated Development Environment ..................................................... 20 3.4.2 Software Development Kit ........................................................................ 20 3.4.3 Design- and graphic editor ....................................................................... 20 3.4.4 Evaluation Tools ........................................................................................ 20 3.5 EVALUATION CRITERIA ......................................................................................... 20 3.5.1 Diagnostic System Approach ................................................................... 21 3.5.2 User Interface Type................................................................................... 21 3.5.3 Launch Time Performance ....................................................................... 21 IV Cross-platform Diagnostic Tool Table of Contents Ali Zamani 2013-07-11 3.5.4 Application Package Size ......................................................................... 21 3.5.5 Runtime Performance ............................................................................... 22 3.5.6 Wireless Communication and Network Library ....................................... 23 4 DESIGN AND IMPLEMENTATION .......................................................................... 24 4.1 DIAGNOSTIC SYSTEM APPROACHES ...................................................................... 24 4.1.1 Web application ......................................................................................... 24 4.1.2 Mobile solution........................................................................................... 25 4.2 CROSS-PLATFORM DIAGNOSTIC TOOL .................................................................. 26 4.2.1.1 Architecture ................................................................................................ 27 4.2.2 Controller Layer ......................................................................................... 28 4.2.3 Message Handler ...................................................................................... 34 4.2.4 User Interface ............................................................................................ 36 5 RESULT AND EVALUATION ................................................................................... 42 5.1 OUTPUT RESULT .................................................................................................. 42 5.2 EVALUATION