Skip to content

Analyze the communication between application and reader

BALTECH SDK comes with a montitoring mechanism to analyze the communication between your application and the reader. When you enable monitoring, all commands and responses exchanged will be written to an HTML log file.

This feature requires SDK v3.04 or above.

Log content

What the logs capture is the entire communication between your application and the SDK. This part is always in plain text. Any encryption you implement will only cover the communication between the SDK and the reader.

Sensitive information will be logged as well

Sensitive information, e.g. data you write to a card, will be logged in plain text as well. Please be aware of the data you transmit while monitoring is enabled.

Diagram of BALTECH SDK logs capturing the communication between application and SDK

Privacy measures

To help you protect the data in your logs, we've implemented the following measures:

  • Monitoring is disabled by default. You have to enable it manually for each day you want to use it. This prevents you from accidentally monitoring longer periods of time.
  • You can exclude a certain host protocol from monitoring, even if you have enabled monitoring for the current day. To do so, run brp_suppress_monitoring() after opening the connection to the reader.
  • Logs are created in your home directory, i.e. other users on the same computer cannot access them.

Enable monitoring

  1. In your home directory, create a folder with the following name:
    In this folder, 1 HTML log file per reader will be created, capturing the communication taken place on that day. The log file name is as follows:

    • For Ethernet: IP-<IP address>.html
    • For USB HID: HID-<reader serial number>.html
    • For RS-232/UART or virtual COM port: RS232-<COM port name>.html
  2. To create logs for e.g. the next day, create a new folder with the new date.

Log files per reader created by BALTECH SDK

Read the logs

Browser support

You can view the HTML log files in any browser. For large files, however, we recommend Google Chrome or Microsoft Edge for performance reasons.

The start and end of every connection to the reader is indicated by a blue line. In between these lines, you'll see the commands and responses transmitted between the SDK and the reader. The timestamps are relative to the opening of the connection. Command parameters and return values are shown between angle brackets.

Example log entries created by BALTECH SDK

Get more detailed information

Retrieve certain entries

Click a timestamp to generate a link to a specific log entry. With this link, you can later easily retrieve this entry or refer a colleague to it (if you also choose to give them access to the file).

Click timestsamp in BALTECH SDK log file to create URL for that entry

Activate live view

Click Activate Live View at the bottom of the log to update the log while you have it open. To disable Live View, scroll up or close the file.

Activate Live View button at the bottom of a BALTECH SDK log file

Further low-level analyses

If the SDK logs contains an I/O error that can't be explained, we recommend you take a closer look using Wireshark or another low-level protocol analyzer. This approach works for host-reader connections via USB HID, RS-232/UART, virtual COM port, and Ethernet.