Automotive Information Engineering Bachelor of Engineering Bachelor Thesis

Automotive Information Engineering Bachelor of Engineering Bachelor Thesis

Automotive Information Engineering Bachelor of Engineering Bachelor Thesis Analysis of the USB-Stack to create and execute test cases USB-enabled devices and MTP Author: Alan Koschel August 31st, 2017 Advisors: Prof. Dr. Werner Kleinhempel Hochschule Konstanz Department of Electrical Engineering and Information Technology Albert Schaaf, M.Sc. Marquardt Verwaltungs GmbH TDS-SC – Software Design Alan Koschel: Analysis of the USB-Stack to create and execute test cases USB-enabled devices and MTP Bachelor Thesis, Hochschule Konstanz, 2017 Bachelor Thesis Statutory Declaration Statutory Declaration I declare that I have authored this thesis independently, that I have not used other than the declared sources / resources, and that I have explicitly marked all material which has been quoted either literally or by content from the used sources. Konstanz, August 31st, 2017 Alan Koschel Alan Koschel I Bachelor Thesis Preface Preface Section 1 will introduce the topic of the thesis and explain why it was necessary to deal with the issue. Section 2 will describe the objectives. Section 3 will mention the test and evaluation environment to demonstrate what kind of tools were used to execute the tasks and reach the objective. Section 4 deals with the concept of Windows drivers. It is explained why drivers are important and how device drivers will be allocated to devices by INF files. This is necessary and an integral part of the following sections. Section 5 clarifies the Universal Serial Bus, which is basically one of the main and largest topics of this thesis. It begins by explaining the basic builds and is followed by the operating principles. Therefore, the Universal Serial Bus communicates by means of specific packets, which will be transmitted through various transfer types. Each device starts with transmitting various descriptors to inform the host about itself. Due to, that the host controls the bus, the device only responds to the host's transmissions. At the end of this section, the enumeration will be illustrated, that comprise the process the host learns about the device. Section 6 gives an understanding of the Media Transfer Protocol that was running on a development board. First the main characteristics and some comparisons to similar methods will be mentioned, followed by the operating principles. These principles comprise basic operations on a device, in fact execute operations such as renaming, deleting and copying files. Section 7 is about the test environment that was set up to set a HMI device under test that provides the USB MTP responder stack. First of all, the concept of the testing will be described and followed by the arranged test environment. In case of USB and MTP, the specific test categories will be mentioned. Lastly, the test results of the HMI device were discussed and recommendations were made to run the failed tests successfully. Section 8 describes the outcome of this thesis and how subsequent works can expand on this thesis. Section 9 comprises a summary that resurvey the thesis. It gives an overview about the concrete task, how the separate tasks were carried out to achieve the outcome and a summary of the outcome itself. Alan Koschel II Bachelor Thesis List of Figures List of Figures Figure 1: STM32F429IDISCOVERY Development Board .......................................................................... 3 Figure 2: USB to Serial Cable ................................................................................................................... 4 Figure 3: HTerm Terminal Software ........................................................................................................ 4 Figure 4: Teledyne LeCroy Mercury T2 USB Analyzer [1] ........................................................................ 5 Figure 5: USB Analyzer MTP Data Packets .............................................................................................. 5 Figure 6: STM32 USB Device Library Architecture [2] ............................................................................. 6 Figure 7: USB Device Class Description of WPD in INF File ..................................................................... 7 Figure 8: USB Device Vendor and Product ID in INF File ......................................................................... 7 Figure 9: USB Device MTP Protocol Class Codes in INF File .................................................................... 7 Figure 10: Host and Device Arrangement (USB) ..................................................................................... 8 Figure 11: USB Type-A Plug Pins .............................................................................................................. 9 Figure 12: USB Micro-B Plug Pins ............................................................................................................ 9 Figure 13: USB Endpoint Communication Model, inspired by [4] ......................................................... 11 Figure 14: Communication in Setup Stage ............................................................................................ 12 Figure 15: IN and OUT Transfer in Data Stage ....................................................................................... 12 Figure 16: Host and Device Confirmation by Zero-Length-Packet ........................................................ 13 Figure 17: Bulk Transfer IN and OUT ..................................................................................................... 13 Figure 18: Interrupt Transfer IN ............................................................................................................ 14 Figure 19: Hierarchical Structure of Descriptors ................................................................................... 14 Figure 20: Enumeration Process with Focus on the STM32F429IDISCOVERY ....................................... 18 Figure 21: MTP Responder Stack STM32F429IDISCOVERY, inspired by [6] .......................................... 22 Figure 22: MTP Read Memory Instructions ........................................................................................... 23 Figure 23: MTP Delete Object Instructions ........................................................................................... 24 Figure 24: MTP Rename Object Instructions ......................................................................................... 25 Figure 25: MTP Download Object from Device Instructions ................................................................. 25 Figure 26: MTP Upload Object to Device Instructions .......................................................................... 26 Figure 27: HCK Test Environment .......................................................................................................... 29 Figure 28: HCK Studio Machine State .................................................................................................... 29 Figure 29: HCK Studio Available Systems .............................................................................................. 30 Figure 30: HCK Studio Test Status & Client ........................................................................................... 30 Figure 31: HCK Studio Test Results Tab ................................................................................................. 31 Figure 32: HCK Manager Operating Principle ........................................................................................ 32 Figure 33: HMI Device Marquardt GmbH .............................................................................................. 33 Figure 34: Device Manager, USB Class Codes from DUT ....................................................................... 36 Alan Koschel III Bachelor Thesis List of Tables List of Tables Table 1: USB Packet Fields ....................................................................................................................... 9 Table 2: USB Packet Types ..................................................................................................................... 10 Table 3: Format of Request Data [5] ..................................................................................................... 15 Table 4: Standard Device Requests [5] .................................................................................................. 16 Table 5: HCK Test Levels [7] ................................................................................................................... 28 Table 6: HMI Device List of Failed Tests ................................................................................................ 34 Alan Koschel IV Bachelor Thesis List of Tables Contents Statutory Declaration ...................................................................................................................................... I Preface ................................................................................................................................................................ II List of Figures .................................................................................................................................................. III List of Tables .................................................................................................................................................... IV 1 Introduction ..................................................................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    50 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us