# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- USB Library

20 December, 2013

- 1
- 2
…
- 130
- 131
- 132
- 133
- 134
…
- 311
- 312

The Communications Interface Class defines a general-purpose mechanism that can be used to enable all types of
communications services on the Universal Serial Bus (USB). This interface consist of two elements, a management element
and a notification element. The management element configures and controls the device, it consist of endpoint 0. Notification
element is optional and is used to handle transport events. In the current stack notification element is not implemented.
The Data Interface Class defines a general-purpose mechanism to enable bulk or isochronous transfer on the USB when the
data does not meet the requirements for any other class. This interface is used to transmit/receive data to/from the device.
The type of endpoints belonging to a Data Class interface are restricted to being either isochronous or bulk, and are
expected to exist in pairs of the same type (one In and one Out). Current version of the stack is tested for Bulk transfers.
Class-Specific Codes
This section lists the codes for the Communications Device Class, Communications Interface Class and Data Interface
Class, including subclasses and protocols supported in the current version of the stack. The current version of the stack
supports RS232 emulation over USB. Below is the list of codes to support this functionality.
The following table defines the Communications Device Class code:
Code Class
0x02 Communications Device Class
Communication Interface Codes
The following table defines the Communications Class code:
Code Class
0x02 Communications Interface Class
CDC specification mentions various subclass , current version of the Microchip CDC host stack supports below mentioned
subclasses. The following table defines the currently supported Subclass codes for the Communications Interface Class:
Code SubClass
0x02 Abstract Control Model
The following table defines supported Communications Class Protocol Codes:
Code Protocol
0x01 AT Commands: V.250 etc.
Data Interface Code
The following table defines the Data Interface Class code:
Code Class
0x0A Data Interface Class
No specific Subclass and Protocol codes are required to achieve RS232 functionality over USB.
Communication and Data Transfer Handling
Communication Management : The CDC client deriver takes care of enumerating the device connected on the bus. The
application must define Line Coding parameters in file usb_config.h . USBConfig utility can be used to set these parameters.
If the connected device complies with the setting then the device is successfully attached else the device is not attached
onto the bus. If the application needs to change the setting dynamically after the device has been successfully enumerated ,
interface function USBHostCDC_Api_ACM_Request()can be used to do so. Following standard requests are currently
implemented:
1.4 Library Interface MLA - USB Library Help Embedded Host API
132

- 1
- 2
…
- 130
- 131
- 132
- 133
- 134
…
- 311
- 312