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

Logs capture the communication between your application and the reader. If you use encryption, logs capture encrypted traffic by default 1. To log traffic in plaintext when using encryption, run brp_set_monitor(brp, PLAINTEXT).

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

Privacy measures

To help you protect the data in plaintext 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.
  • 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:
    brp-logs-<yyyy>-<mm>-<dd>
    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.


  1. In SDK versions below v3.19.00, encrypted communication between application and SDK was always monitored in plaintext. Sensitive information, e.g. data you write to a card, was logged in plaintext. Thus, if you transfer sensitive data via an encrypted connection, we recommend you update the SDK to v3.19.00 or above and explicitly run brp_set_monitor(brp, BRP_MONITOR_ENABLED)

Title