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 BrpDriver.dll
- Replace the existing
BrpDriver.dll
in your project with/binaries/winXX/Release/BrpDriver.dll
. - Place
/binaries/winXX/Release/brp_lib.dll
into the same directory asBrpDriver.dll
.
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-NET
- 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 BRP_ERR_GENERAL_IO
error.
Features not yet implemented in the SDK
- Alive message checking
brp_set_alive_timeout()
is ignored and will always returnBRP_OK
. - Custom interbyte timeout
brp_set_interbyte_timeout()
is ignored and will always returnBRP_OK
.
Removed features
- Setting checksum
brp_set_checksum()
will always returnBRP_OK
without any action.
Please keep in mind that this is only relevant for RS-232/UART 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 returnBRP_ERR_WRONG_PARAMETERS
.
Other changes
- USB HID devices are addressed differently
When passing NULL tobrp_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 aBRP_ERR_WRONG_PARAMETERS
error in case you pass the windows device name). - Buffer sizes don't need to be set manually
As buffers are allocated automatically now,brp_set_bufsize()
andbrp_get_bufsize()
aren't needed anymore and will thus be ignored.
brp_set_bufsize()
will always returnBRP_OK
, whilebrp_get_bufsize()
will return default bufsizes. - 2 DLLs are needed now
Instead of a single library (BrpDriver.dll
), 2 files are required now (BrpDriver.dll
andbrp_lib.dll
) - brp_lib interplay added
brp_open_brplib_session()
andbrp_get_brplib_protocol()
have been added to allow partial conversion of existing applications tobrp_lib
, when certain modules are already usingbrp_lib
while older ones still rely onBrpDriver
. To make these 2 functions available, you have to set theBRP_SDK_COMPATIBILITY
when integrating the driver in a C/C++ project.