Transcription of A software architecture for embedded telematics …
1 Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering G teborg, Sweden, December 2011 a software architecture for embedded telematics devices on Linux Master of Science Thesis in Secure and Dependable Computer Systems HUGO HOLGERSSON The Author grants to Chalmers University of Technology and University of Gothen-burg the non-exclusive right to publish the Work electronically and in a non-commercialpurpose make it accessible on the Internet. The Author warrants that he/she is theauthor to the Work, and warrants that the Work does not contain text, pictures or othermaterial that violates copyright Author shall, when transferring the rights of the Work to a third party (forexample a publisher or a company)
2 , acknowledge the third party about this the Author has signed a copyright agreement with a third party regarding the Work,the Author warrants hereby that he/she has obtained any necessary permission from thisthird party to let Chalmers University of Technology and University of Gothenburg storethe Work electronically and make it accessible on the software architecture for embeddedtelematics devices on Linuxc HUGO HOLGERSSON, G teborg, Sweden, December 2011 Examiner: Johan Karlsson, of Dependable and Robust Real-Time SystemsDepartment of Computer Science and EngineeringChalmers University of TechnologyUniversity of GothenburgDepartment of Computer Science and EngineeringSE-412 96 G teborgSwedenTelephone: + 46 (0)31-772 1000 AbstractThis master thesis proposes a Linux-based software architecture for modern telemat-ics devices.
3 Our device is installed in trucks and has the purpose of forwarding collectedGPS data to an online data center in a robust way. telematics units are are highlyconcurrent systems where a crucial part of the software architecture is the communica-tion schema: Within the system, sensor data need to be independently gathered andprocessed. Relevant information is then presented to the truck driver or forwarded to anonline data investigate D-Bus, an IPC system that is mostly used indesktopLinux systems, asa potential replacement for traditonal, in-kernel message passing. When moving to moreelaborated embedded hardware platforms, such higher level programming paradigms andprotocols become more attractive than pure low level programming.
4 This thesis highlightsthe possibility of incorporating such techniques also inembeddedLinux demonstrate an event-driven system architecture , implemented using the Qt C++framework. D-Bus is used for the system s interprocess communication, in contrast toTCP sockets that were used in the previous product. We make low level sensor dataavailable via D-Bus by two layers of abstraction: a Linux I2C chip driver and Linuxdaemon using Introduction12 Specification and Requirements .. Implementation of previous product .. Server connection .. Access to vehicle peripherals .. 53 software Architectural overview.
5 System services .. Exported XML interface .. The Qt framework .. 134 Internet gateway software modules .. D-Bus .. Storage .. External connection .. The event-driven paradigm .. Security concerns .. 195 Hardware Board and peripheral layout .. I2C bus principles .. Development setup .. I2C abstractions in Linux .. Driver usage .. Linux kernel modifications .. Implementing an I2C slave firmware .. Hardware and bus initialization .. Serving requests by interrupt handlers .. 266 Discussion and conclusion28iA D-Bus in an embedded Comparison to sockets.
6 Introduction to D-Bus .. Criticism .. Requirements .. Language bindings .. File size footprint .. Memory usage .. 32B embedded Linux Boot loader .. Kernel .. Libraries and development frameworks .. System daemons and services .. User applications .. 35C Methods of Cross-compiling .. Debugging Linux applications .. Debugging "bare metal" code .. Debugging U-Boot .. Build tools .. IDE integration .. 41iiAcronymsABIA pplication Binary InterfaceADKA pplication Development KitAPIA pplication Programming InterfaceCANC ontroller Area NetworkD-BusFreeDesktop s "Desktop Bus" for IPCELFE xecutable and Linkable FormatGCCGNU Compiler CollectionGDBGNU Project DebuggerGPSG lobal Positioning SystemGUIG raphical User InterfaceI2C2-wire Inter-IC busICIntegrated CircuitIDEI ntegrated Development EnvironmentIVIIn-vehicle InfotainmentJTAGJ oint Test Action Group (JTAG)
7 Standard test access portPDKP roduct Development KitPDUP rotocol Data UnitPOSIXP ortable Operating System InterfaceQtA cross-platform application C++ frameworkROMRead-Only MemorySDKS oftware Development KitSoCSystem on ChipUMLU nified Modeling LanguageXIPE xecute in placeXMLE xtensible Mark-up LanguageiiiChapter 1 IntroductionWith Internet access everywhere new possibilities and markets has emerged in the fieldof wireless surveillance. Any type of vehicles - whether it is a personal car, an ambulance,a bus in public transport or a normal truck - can nowadays be connected to the Internetthanks to the nation wide cellular phone steady Internet connection enables fleet operators to monitor their vehicles po-sitions in real time.
8 By automatically reporting data, time is also saved for the truckdriver, who does no longer need to report his locations and work hours manually. A suchsystem, designed to report information on geographically sparse units, is commonly ref-ereed to as atelematicssystem. telematics systems designed for fleet management canglobally be seen as a combination of three subsystem that co-operates over the Internet: Internet uplink (GPRS)Internetconnection to fleet operator(a) Truck equipped withTelematics device running Linux.(c) Fleet operator gets access toinformation of his trucks.(b) Online data center collectingand providing vehicule informationFigure : A typical telematics system for vehicle one of the surveilled vehicles is equipped with an embedded computer system(a).
9 The embedded system runs on a customized hardware board that could either befactory-fitted or integrated into the vehicle as an add-on. In any case, these configurationsdoes often include a GPS receiver and a mobile data modem that enables the systemto connect to the Internet. Through the modem connection, each of these embeddedsystems are uplinked to the central server infrastructure (b) to which data concerningthe vehicle is uploaded. The back-office server side organizes the data and groups theinformation according the requirements set out by the fleet that the vehicle belongs servers do also have an interface towards the fleet s administration department(c) by which fleet operators can benefit from the collected information presented bydesktop/phone software applications.
10 Notably, each individual vehicle s geographicallocation and ongoing mission can be visualized on maps - an excellent tool to simplifyfleet administration and report focuses on the design aspects of the onboard (a) computer system, residinginside the vehicles. Often, these systems do simultaneously support some kind of userinteraction, along side the functionality of telematics , forming to the implied safety concerns involved in designing systems used in and con-nected to vehicle, developing IVIs is more difficult than developing personal devices, suchas mobile phones; without violating the drivers safety, these devices do need to use theCAN bus in order to read the out values on for example velocity, charge and designing an embedded software system, it is nowadays common to rely on,already freely available open-source components.