Set up a protocol stack in your application

To be able to communicate with the reader via the SDK, set up a protocol stack object. In short, this means defining the parameters of the physical interface and adding upper layers such as encryption. You can use this object to connect to the reader and exchange BRP commands.

Implement protocol life cycle

These are the phases of the protocol life cycle you need to implement in your application.

Create

Connect

  • Run brp_open()call_made to create a physical connection to the reader. This has the following effects:
    • The library provides exclusive access to the reader and performs all operations necessary to set up a session.
    • The protocol state machine of the reader is kept in sync with the protocol state machine of the library.

Communicate

Now you can send your actual commands to the reader.

Multithreading not supported

The application must ensure that only 1 thread accesses a reader at a time. When communicating with multiple readers, each reader may be controlled by a separate thread (in this case, no synchronization is required).

There are 2 options to run a command:

Which commands do I need to run?
Please refer to the Run commands section on your workflow overview page.

Disconnect

Run brp_close()call_made to reset the reader to the state before you ran brp_open. This has the following effects:

  • The corresponding OS resource is released.
  • The reader can be accessed by a different application.

You can repeat the steps Connect, Communicate, and Disconnect as often as needed.

Destroy

Run brp_destroy()call_made to end the lifecycle of the protocol stack. This will release the memory occupied by the physical interface and all protocols based on it. Thus, you don't need to separately destroy all protocols you have assigned using brp_set_io()call_made.

brp_destroy() implicitly executes brp_close() and thus ensures that all OS resources are released.

Try it out with our app notes

The following app notes in the SDK give you working examples of the implementation for the supported host interfaces.

  • USB HID: appnotes\usb_hid
  • RS-232/virtual COM port: appnotes\usb_cdc
  • Ethernet: There's an app note for client and one for server implementation (learn more)

    • Client: appnotes\tcp_client
    • Server: appnotes\tcp_server

    Encryption for Ethernet server

    The Ethernet server app note implements PKI with X.509 certificates. However, we generally recommend you use AES 128 (learn more). While we're working on a new app note for that, please get in touch with us when implementing encryption for Ethernet server.

Learn more about app notes

You're not interested in the source code, but need a connection to test reader interaction? Then we recommend the following:

  • Ethernet server: Run the precompiled app note \binaries\winXX\release\appnote_tcp_server.exe.
  • All others: Use the Test Autoread and Test VHL tabs in BALTECH ID-engine Explorer.

    If you haven't installed it yet, you can download it herecall_made as part of BALTECH ToolSuite.