Switch from BrpDriver.dll to the SDK
The predecessor of the SDK, 2014_brp_driver_dll, is no longer maintained. To switch from BrpDriver.dll to the SDK in an existing project, you can use the legacy wrapper around the SDK's dynamic library brp_lib.dll.
Below, you learn how to replace BrpDriver.dll with the wrapper and which differences to keep in mind.
Please don't use the wrapper for new projects or when reworking existing ones.
- Replace the existing
BrpDriver.dllin your project with
/binaries/winXX/Release/brp_lib.dllinto the same directory as
Main differences between legacy wrapper and BrpDriver.dll
Removed deprecated protocols
The following protocols are no longer supported by BALTECH readers and have thus been removed:
- BRP-PCSC (not to be confused with PC/SC support per se)
- BRP-USB (not to be confused with BRP-HID)
When you call the
brp_open_*() functions, you'll get a
Features not yet implemented in the SDK
- Alive message checking
brp_set_alive_timeout()is ignored and will always return
- Custom interbyte timeout
brp_set_interbyte_timeout()is ignored and will always return
- Setting checksum
brp_set_checksum()will always return
BRP_OKwithout any action.
Please keep in mind that this is only relevant for RS-232 connections, as all other connection types have checksums in the lower protocol layers.
- Extending timeout after command was started
brp_extend_next_command_timeout()will always return
- USB HID devices are addressed differently
When passing NULL to
brp_open_hid_session(), it still opens the HID device if exactly 1 device is connected. To open 1 of multiple connected devices, however, you have to pass the serial number of the device instead of its windows device name now (you'll get a
BRP_ERR_WRONG_PARAMETERSerror in case you pass the windows device name).
- Buffer sizes don't need to be set manually
As buffers are allocated automatically now,
brp_get_bufsize()aren't needed anymore and will thus be ignored.
brp_set_bufsize()will always return
brp_get_bufsize()will return default bufsizes.
- 2 DLLs are needed now
Instead of a single library (
BrpDriver.dll), 2 files are required now (
- brp_lib interplay added
brp_get_brplib_protocol()have been added to allow partial conversion of existing applications to
brp_lib, when certain modules are already using
brp_libwhile older ones still rely on
BrpDriver. To make these 2 functions available, you have to set the
BRP_SDK_COMPATIBILITYwhen integrating the driver in a C/C++ project.