Relevant CATC products

  • USBTracer™/ USBTrainer™ Advanced Verification Systems
  • USBMobile™ Bus and Protocol Analyzer Systems
  • USB Advisor™ Bus and Protocol Analyzer
  • USB Chief™ Bus and Protocol Analyzer


General The USB specification includes over 15 different device classes such as HID (Human Interface Device), Hub, printer, storage and so on. To add to the complexity, there are numerous proprietary protocols different manufacturers implement in their USB devices: USB to serial, USBto-Ethernet, MP3 players and so on. There are also other standards bodies like Bluetooth that incorporate USB into their specifications.

USB designers need reliable and accurate expert bus and protocol analyzers that can assist them in their development task, helping them identify protocol violations and design errors. CATC’s analyzers accurately monitor, capture, filter and analyze high-speed communications traffic, allowing our customers to quickly discover and correct persistent and intermittent errors and flaws in their product design. The powerful CATC Trace expert software system is an integral part of CATC’s extensive line of protocol analysis products, supporting the Bluetooth, Fibre Channel, IEEE 1394, InfiniBand, PCI Express, Serial ATA and USB standards. The CATC Trace is used as an expert protocol design assistant, embedding deep understanding of the protocol hierarchy and intricacies and presenting this knowledge to the user in a very intuitive and easy to use fashion. The CATC Trace includes detailed decoding of all the standard device classes defined in the specifications. It also supports vendor-specific and proprietary decodes.

CATC is well known for its unique way of visually displaying the communication protocol information. The CATC Trace presents the recorded data making extensive use of color and graphics. Packets are shown on separate rows, with their individual fields both labeled and colorcoded. Packets are also numbered (sequentially, as recorded), time stamped (with an appropriate high-speed resolution), and highlighted to show other protocol specific events. The display is highly customizable, on an individual recording basis; the user is able to control the color scheme, the suppression of cycle start and other packets or fields that may be uninteresting in a given context, and the formatting of field contents.

The CATC Trace expert software embeds detailed knowledge of the protocol hierarchy as well as the meaning of the information coded in the various packet fields, as defined in the protocol specifications, including device class and vendor-specific decoding. The Trace screen display, through a combination of on screen tool-tips, allows us humans to read protocol sessions like reading an illustrated book.

Initially CATC provided the extra level of support of vendor-specific decodes through File-Based Decodes. Today, these decodes are offered through the CATC Scripting Language (CSL) - a more advanced, powerful and flexible programming language.

File-Based Decoding

In File-based decoding, a specific text file is created to describe the decoding of class or vendorspecific data for any protocol defined for USB. This file is a set of instructions that describe, in USB-specific terms, how to break blocks of data into fields with consecutive decoding of each field. The data being decoded can be in a USB Device Request, or any formatted data that is not on an Interrupt or Bulk endpoint of a USB device. The request definition files are text-based files that are identifiable by their .req extension. Customized decoding of USB requests is possible by editing files or creating new definition files. This means that the user has to manually change the text values at a given data block to accomplish specific decoding.

While File-based decoding is adequate for some applications, CATC’s Scripting Language is a much more powerful and comprehensive solution.

Sample Trace files using File-Based Decoding:

Figure 1:

Trace file of a USB mouse without Endpoint Decoding

Figure 2:

Assigning that extra level of decoding to the trace using file based decoding adds another dimension to the display. This is done by right clicking the interrupt packet and selecting the map endpoint option

CATC Scripting Language

CATC Scripting Language is an advanced and efficient approach to accomplish custom decoding. CSL is based on C language syntax, so anyone with a C programming background will have no trouble learning CSL. The simple, yet powerful, structure of CSL also enables less experienced users to easily acquire the basic knowledge needed to start writing custom scripts.

The CATC Trace software activates the user-defined script whenever it is asked to decode packets with vendor-specific data or other custom information. The view settings in the scripts may be edited to either reveal or hide particular fields when the header cells are expanded or collapsed. For instance, it may be desirable to have a field visible even when its header cell is collapsed; on the other hand, cells can also be defined so that they are revealed only when the header cell is expanded. In addition to displaying decoded custom content as data in the trace, the decoder scripts create a special View window that presents the decoded data in a text format. The window is opened by left-clicking on any cell in the trace to access the pop-up View menu and then selecting the “View fields” option. Inserting the decoders in the CATC Trace allows users to continue their development efforts without having to close the CATC application.

Sample Trace files using CSL:

Figure 3:

Standard HID display of a Bluetooth keyboard

Figure 4:

An enhanced, modified HID using CSL

Features of CSL:

  • Powerful – provides a high-level API while simultaneously allowing implementation of complex algorithms
  • Easy to learn and use – has a simple and effective syntax
  • Self-contained – needs no external tools to run scripts
  • Wide range of value types – provides efficient and easy processing of data
  • Used to create built-in script-based decoders for analyzers
  • May be used to write custom decoders
  • General purpose – is integrated with CATC expert analysis products

Getting Started:

  • Use the Hub decodes files (.dec) as a starting point. Copy them and name them after your product. Edit the files as follows -
  • Delete the UsbClassCode= lines and replace them with UsbVendorId= and UsbProductId= . This now makes these files vendor-specific
  • Modify the .dec files so that they work with your descriptors and endpoint data. Make sure you choose a unique value for UsbEndpId= (This value is NOT an actual Endpoint value, just a value to ensure unique mapping from a specific decoding script to an Endpoint)
  • Refer to the Script Decoding User Manual for further details. It is often easier to implement by example.
  • Hint: If you change a script, the software will use the new file without having to reload the application or trace files.

For additional information please refer to: