Device Channel Tracing
-
InSight has the ability to monitor POS terminal device I/O at two
different levels.
The first level is at
the interface between the application and the device-specific
driver.
The 2
ndlevel is between the device-specific driver and the
general purpose device channel bus driver.
Being able to trace at
the device channel level allows possible additional data to be
seen.
Specifically, it allows
capturing data that is added or removed by the device-specific
driver.
-
The 4610 printer is a good example of a device where the printer
driver modifies the data flow substantially.
-
Device channel tracing is not available for all devices – it is
available for printers and serial ports.
-
Printer device channel history is monitored and kept by default.
-
Serial port device channel history is monitored and kept only if
serial port monitoring is activated.
-
The default device channel history buffer sizes can be modified by
CDI option.
-
Additional device channel tracing detail is available with a ‘low
level’ device channel option.
This option enables
additional protocol details to be seen such as I-frame retries for
485 devices.
-
A
utility program, DevChan, is provided and supports real-time
collection of device channel trace data.
It supports active
collection of device channel data from either serial devices or
printers or both.
It also supports
requesting the terminal to snapshot dump.
Both a .286 version and
.exe version are available.
Source code for the
program is also provided -> DevChan is one of the sample
programs in the InSight SDK.
-
The dump formatter supports extracting and formatting device
channel trace information from snapshot terminal dumps and full
terminal dumps.
-
For the printer, InSight allocates two device channel history
buffers.
One contains both reads
and writes to the printer and the other contains only reads.
The reason for the
separate read buffer is that return status from the 4610 is key to
understanding many printer issues and having guaranteed visibility
to a minimum number of
these printer status
responses was desired.
-
For device channel tracing, a system-wide (i.e. global) history
buffer is allocated only after a client requests real-time device
channel.
This is different for
device channel than it is for normal or upper level device
monitoring.
For upper level device
monitoring, a global history buffer is always allocated.
For
clarity/refresh: monitoring events for devices go to a
device-specific buffer and to a global history buffer.
Device events are mixed
together, in-order, in the global history buffer
-
Optional CDI keywords:
tagentPrtdevChBuffSizeKB,
tagentSerial[1|2|3|4]devChBuffSizeKB, tagentDevChLowLevel
-
Example device channel trace output
from formatted dump
data:
DChnW|S2|msec
826.439|11:39:26|SeqNum 28964|ID
02(xmit
)|Port 11|Addr 65|lCtrl
??|
Command:
08=Transmit
xmitdata 0000: 0232 392E 3130 3030
3037 3132 0323
* 29.10000712 #
*
DChnR|S2|msec
826.448|11:39:26|SeqNum 28967|ID
02(xmtACK)|Port 11|Addr 65|lCtrl n/a|
DChnR|S2|msec
826.466|11:39:26|SeqNum 28971|ID
01(recv
)|Port 11|Addr 65|lCtrl
ea |
StatusByte1: 50
StatusByte2: 46
CRC:
D431
StatusByte1:
TimerOverFlow RcvBuff2NotEmpty
StatusByte2:
Initialized
RTS
DTS
recvdata 0000: 06
*
*
-
Formatted output field descriptions:
·
lCtrl is rs485 (sdlc) link control byte.
This is only available
for recv frames unless low level tracing is enabled.
·
‘xmtAck’ is notification that the 4690 device channel driver gives
back to the upper layer driver (i.e. serial driver) that says that
device has acknowledged receipt of the previous xmit.
·
SeqNum – this is an InSight terminal agent sequence number.
Every event put into
any InSight history buffer increments the sequence number.
·
Timestamp info.
A running millisecond
timestamp is used to timestamp all trace entries.
Periodically (for
example, at buffer wrap), the terminal agent also logs a date/time
event to each of the trace queues.
The date/time event
contains the clock date/time as well as the current msec timer
value.
The formatter logs the
msec time and the most recent clock date/time for each event.
-
Feature verification steps:
1.
Install InSight on the primary 4690 controller by running
InSighti.286
2.
Reload terminal(s)
3.
Go
to a 4690 command prompt and run qsa_bin:devchan.
4.
Page to the terminal you’d like to trace
5.
Press F7 to start printer device channel tracing
6.
Run transaction on a terminal
7.
When finished, press ESC.
1.
Review devchan.out file.