SDK API
The followings are a set of APIs that initialize device management information and that are used for dynamic memory control and PIN code generation.
BS2_Version
Gets the version of the SDK.
BS2_AllocateContext
BS2_AllocateContext() function creates a context that controls and manages the devices.
BS2_ReleaseContext
Releases the context allocated from the BS2_AllocateContext() function. If the pointer value is NULL, it doesn't do any action.
BS2_Initialize
Initializes the context.
BS2_ReleaseObject
Returns the dynamically allocated memory to the system. If the pointer value is NULL, it doesn't do any action.
BS2_MakePinCode
Encrypts normal characters to PIN.
BS2_MakePinCodeWithKey
+ v2.7.1 Encryptes PIN code with the user-defined PIN encryption key.
BS2_SetMaxThreadCount
Specifies the maximum thread count.
BS2_ComputeCRC16CCITT
Calculates the CRC-16 CCITT checksum.
BS2_GetCardModel
Retrieves the supported card models.
BS2_GetDataEncryptKey
[Deprecated] Gets the encryption key for the device.
BS2_SetDataEncryptKey
+ v2.7.1 Changes the user defined PIN encryption key.
BS2_RemoveDataEncryptKey
+ v2.6.0 Removes the encryption key for the device.
BS2_SetDeviceSearchingTimeout
Specifies the device searching time. It defines timeout of API BS2SearchDevices or BS2SearchDevicesEx.
BS2_SetDebugFileLog
+ v2.6.3 The log messages in the SDK can be output to a file, which can be used for debugging applications.
BS2_SetDebugFileLogEx
+ v2.8.3 Log messages within the SDK can be output as a split file and used for debugging applications.
BS2_EnableDeviceLicense
+ v2.9.1 Activate the device license by selecting the devices to activate the license and the license file.
BS2_DisableDeviceLicense
+ v2.9.1 Disable device licenses by collectively selecting the device connected as master-slave.
BS2_QueryDeviceLicense
+ v2.9.1 Get the device license activation/deactivation status of the device connected as master-slave.
BS2_InitializeEx
+ v2.9.6 Initializes the context and initializes the socket with the IP address specified as the second argument.
BS2_SetDebugExCallback
[Deprecated]
Structure
BS2EncryptKey
enum
{
BS2_ENC_KEY_SIZE = 32,
};
typedef struct
{
uint8_t key[BS2_ENC_KEY_SIZE];
uint8_t reserved[32];
} BS2EncryptKey;
-
keyThe key value used by the device.
-
reservedReserved space.
BS2LicenseBlob
typedef struct {
BS2_LICENSE_TYPE licenseType;
uint16_t numOfDevices;
BS2_DEVICE_ID* deviceIDObjs;
uint32_t licenseLen;
uint8_t* licenseObj;
} BS2LicenseBlob;
-
licenseTypeThe type of license.
Value Description 0x0000 None 0x0001 Visual QR -
numOfDevicesNumber of licenses activated devices.
-
deviceIDObjsSlave devices for which license information will be issued.
-
licenseLenlicense activation file size.
-
licenseObjLicense activation data block.
BS2LicenseResult
typedef struct {
BS2_DEVICE_ID deviceID;
BS2_LICENSE_STATUS status;
} BS2LicenseResult;
-
deviceIDDevice identifier.
-
statusLicense status information.
Value Description 0 Not supported 1 Disable 2 Enable 3 Expired