MDB spy

Version 1.0

Introduction

MDB spy is an analyzer for the MDB protocol. It uses an external piece of hardware, called probe, to monitor the MDB bus. MDB messages as sensed on the bus are sent to the monitor program (MDBSPY.EXE) that runs on a PC.

MDB spy can show messages in raw as well as in an interpreted format. The raw display format can be of use to perform low level debugging on the MDB bus. The interpreted display format will only make sense when the devices on the MDB bus follow the MDB protocol to a reasonable extent, but then it will allow you a high level view of the messages as they are exchanged between the bus devices.

To enhance using MDB spy as a debugging aid some features were implemented

Raw display

raw display

The raw display screen shows MDB traffic in raw format, no data interpretation is made. The data source is indicated (as VMC or per(ipheral)). The time is shown in s.ms.µs format, the timing resolution is about 10 µs. For convenience the data is split into four columns, the first column shows the 9 bit data in hexadecimal format, the second column shows the value of the 9th bit (bit 8), the third column shows the 8 data bits in decimal format and the last column (not visible here) shows an ASCII representation of the data byte when available.

The vertical scroll bar can be used to scroll back up to 1500 lines into the past.

For the right hand side column of buttons see the section about journaling buttons

For the bottom row of controls see the section about additional controls

Double clicking the raw display will try to show the interpreted display at the same position in time. The position, when found, will be marked by small triangles in the left and right margins.

Interpreted display

interpreted display

The interpreted display shows an interpretation of the raw data stream according to the MDB specification.The data source is indicated (as VMC or per(ipheral)). The time is shown in s.ms.µs format, the timing resolution is about 10 µs.

The vertical scroll bar can be use to scroll back up to 1500 lines in the past.

For the right hand side column of buttons see the section about journaling buttons

For the bottom row of controls see the section about additional controls

Double clicking the interpreted display will try to show the raw display at the same position in time. The position, when found, will be marked by small triangles in the left and right margin.

Filters

filter

Filters are used to disable interpreted display for selected devices or commands. It is possible to store filter settings into a text file for later use. Filters can be enabled or disabled globally as well as on a per device basis.

Current filter file

filter 405

Filter settings can be loaded from and saved into a text file. Use the Load... and Save... buttons for this. In addition the last filter settings used will be automatically saved into the program's INI file (MDBSPY.INI, located in the same directory as the MDBSPY.EXE program). The Enabled button is used to enable or disable the filters altogether. It has the same function as the Filter mode button that can be seen at the bottom of the screen (also see the section about additional controls).

Filter device selection

filter 410

Filter settings are shown on a per device basis, the filter device selection box lets you select the device for which the filter settings will be shown. Moving the mouse cursor over a device name will pop up it's filter settings into the panel on the right hand side.

Device control

filter 420

In the device control section you can indicate whether you want

Standard commands

filter 430

When, in the Device Control section, you choose to Use checkboxes, it is possible to selectively disable interpreted display for the commands checked in the Standard commands box.

Reader level

filter 440

Certain MDB devices need some additional information in order to be able to interpret the data stream correctly. E.g. for changer devices you must specify whether they are expected to operate accordingly to the level 1 or the level 2 specifications. For details about device dependent settings please refer the MDB specification

Settings

settings

In this tab sheet various system and user settings can be made.

Comm port

settings 510

The current communications port can be selected from the drop down list. A port to be used must be a serial RS232 port that supports a Baud rate of 115k2.

Log files

settings 520

By clicking the Browse... button a journal file can be selected. The record mode can be set to Append or Rewrite.

In Rewrite mode the journal file will be cleared each time journal recording is started.

In Append mode the current journal file will not be cleared each time a new recording is started, but instead new journaling data will be appended to the selected file.

Printer settings

settings 530

The printer to be used for display dumps can be selected by clicking the upper Browse... button. A printer font can be selected independently from the display font by clicking the lower Browse... button. When the printer has support for paper orientation the preferred orientation can be selected here as well.

Display settings

settings 540

Fore- and back-ground colors can be set independently for Vmc, Peripheral, Error and Message categories. By clicking the Browse... button a font can be selected for both the raw and the interpreted displays. The Preview window will give an impression of what a certain selection will look like in the display windows.

Color selection

settings 545

A foreground color is selected by left clicking on one of the colored squares, a background color by right clicking.

Additional controls

Bottom line

bottom line

With the Probe button, here shown in its disabled state, the probe can be set to enabled or to disabled. This can be used to immediately freeze the display when something that might need attention scrolls by on the visible display.

With the Filter button the current filter settings can be made active or inactive. This button can show up in three states - Filters off, Filters pass all (as shown in the illustration above) or Filters active. Filters pass all indicates that filtering is enabled, but the current filter settings are completely transparent, so effectively all interpreted data will be shown.

The third pane (reading 'Interpreted display' here) shows hints and messages when the mouse hovers over certain screen areas.

The Exit button will terminate the program when clicked.

The word OVERFLOW will light up in red when a data reception overflow was detected. When lit, this means that the PC was not fast enough to follow the incoming MDB data stream and that some data is lost. The overflow condition can be reset by clearing the displays, or by disabling the probe and re-enabling it. Also, when the data rate drops, after a while the overflow indicator will be cleared automatically.

The intermediate data buffer, which signals for overflow conditions is set to a size of about 500 items, so data gaps will only occur 500 items after the overflow condition was detected.

When the MDB spy program is set to a smaller window size, or (even more effective) when the displays are made invisible (by selecting a non display tab) it will be able to copy with faster data rates.

Journaling controls

journaling controls

The buttons shown above have the following functions (top to bottom)

The [Fx] prefix shows the function key that is associated with each of the functions.

Journal files provide a mechanism to store a spy session into a disk file. Such a file can, at a later stage, be read by the program and played back as if the data was supplied by the probe. Journal files have a relatively straight forward text format, so it is possible to to type them by hand, this way it is possible to quickly check certain aspects of a certain MDB protocol implementation.

For examples of Journal files please take a look at the supplied *.JNL files in the application's LOGS sub directory

Keyboard shortcuts

key function in tabsheet
ALT+A Reader level filters
ALT+C Comm port settings
ALT+D Display settings settings
ALT+E enable filters filters
ALT+F enable filters global
ALT+J journal file settings
ALT+L load filter filters
ALT+N Display font settings
ALT+O Printer font settings
ALT+P Probe enable global
ALT+R Printer settings
ALT+S save filter filters
ALT+T standard commands filter
ALT+V Device control filter
ALT+X Exit program global
UP Scroll up  
DOWN Scroll down  
PAGE UP Scroll up page  
PAGE DOWN scroll down page  
SHIFT+UP Scroll up page  
SHIFT+DOWN Scroll down page  
SHIFT+PAGE UP Scroll down large page  
SHIFT+PAGE DOWN Scroll up large page  
F1 Help  
F2 Load journal file  
F3 Print current display (if any)  
F4 Clear displays  
F5 toggle record journal  
F6 Journal rewind  
F7 Toggle play journal  
F9 Toggle form zoom  

The probe

The probe is an external piece of hardware to be inserted into the MDB bus. It will detect any MDB traffic, time stamp it and send it through to the analyzer program that runs on a PC.

The probe must be connected to a serial RS232 port that has support for a Baud rate of 115k2. A standard RS232 cable can be used (provided it is no longer than 1.5 m), no handshaking is needed.

The probe's power will be drawn from the MDB bus, no external power supply is needed.

The probe has some LEDs that can assist in trouble shouting the (not) functioning of the MDB bus or the RS232 connection. From right to left :

References

MDB protocol

The MDB Spy program is implemented according to the MDB specifications as stated in :

NAMA MDB / ICP protocol specification

Supported by the NAMA, EVA and EVMMA organizations.

Version 1.0 October 14, 1998

This protocol can be obtained from the NAMA organization