Suprema SDK
Suprema SDK
Suprema SDK
Reference Manual
Rev. 1.8
Revision History
Rev
Issued
No.
date
1.0
2008
Description
Initial Release.
Nov. 4
1.1
2008
Dec. 3
1.2
1.25
2009
Jun.17
2009
Nov.10
1.26
2010
Incorporated Xpass.
Apr. 6
1.3
2010
Incorporated D-Station
Jul 6
DSTnaEventConfig ,DSTnaEventExConfig,
DSSerialConfig, DS485NetworkConfig
DSOPModeConfig, DSFaceConfig, DSDisplayConfig,
DSInputConfig , DSFingerprintConfig, DSWLANPreset,
DSSaveImageEventConfig and DSWLANConfig are added.
Communication API
BS_OpenUSBEx is added.
-
Configuration API
BS_WriteDSTnaEventConfig,
BS_ReadDSTnaEventConfig,
BS_WriteDSTnaEventExConfig,
BS_ReadDSTnaEventExConfig,
BS_SetDSProtection,
BS_WriteDSSaveImageEventConfig,
BS_ReadDSSaveImageEventConfig,
BS_WriteFaceConfig,
BS_ReadFaceConfig,
BS_WriteDSInputConfig,
BS_ReadDSInputConfig,
BS_WriteDSWiegandConfig,
BS_ReadDSWiegandConfig,
BS_WriteDS485NetworkConfig,
BS_ReadDS485NetworkConfig,
BS_WriteDSSerialConfig,
BS_ReadDSSerialConfig,
BS_WriteDSOPModeConfig,
BS_ReadDSOPModeConfig,
BS_WriteDSDisplayConfig,
BS_ReadDSDisplayConfig,
BS_WriteDSFingerprintConfig,i
BS_ReadDSFingerprintConfig,
BS_WriteDSWLANConfig and
BS_ReadDSWLANConfig are added
1.31
2010
Incorporated iCLASS
Aug 10
Configuration API
BS_WriteiClassConfiguration,
BS_ReadiClassConfiguration,
BS_ChangeiClassKey,
BS_WriteiClassCard,
BS_ReadiClassCard,
BS_FormatiClassCard,
BS_AddBlacklistEx,
BS_DeleteBlacklistEx,
BS_ReadBlacklistEx are added.
1.35
2010
Incorporated X-Station
Dec 8
Configuration API
BS_WriteXSTnaEventConfig,
BS_ReadXSTnaEventConfig,
BS_WriteXSTnaEventExConfig,
BS_ReadXSTnaEventExConfig,
BS_WriteXSSaveImageEventConfig,
BS_ReadXSSaveImageEventConfig,
BS_WriteXSInputConfig,
BS_ReadXSInputConfig,
BS_WriteXSWiegandConfig,
BS_ReadXSWiegandConfig,
BS_WriteXS485NetworkConfig,
BS_ReadXS485NetworkConfig,
BS_WriteXSSerialConfig,
BS_ReadXSSerialConfig,
BS_WriteXSOPModeConfig,
BS_ReadXSOPModeConfig,
BS_WriteXSDisplayConfig,
BS_ReadXSDisplayConfig are added.
Server API
BS_SetImageLogCallback is added.
1.5
2011
Incorporated BioStation2.
June 30
Configuration API
BS_WriteBS2TnaEventConfig,
BS_ReadBS2TnaEventConfig,
BS_WriteBS2TnaEventExConfig,
BS_ReadBS2TnaEventExConfig,
BS_WriteBS2SaveImageEventConfig,
BS_ReadBS2SaveImageEventConfig,
BS_WriteBS2InputConfig,
BS_ReadBS2InputConfig,
BS_WriteBS2WiegandConfig,
BS_ReadBS2WiegandConfig,
BS_WriteBS2485NetworkConfig,
BS_ReadBS2485NetworkConfig,
BS_WriteBS2SerialConfig,
BS_ReadBS2SerialConfig,
BS_WriteBS2OPModeConfig,
BS_ReadBS2OPModeConfig,
BS_WriteBS2DisplayConfig,
BS_ReadBS2DisplayConfig,
BS_WriteBS2FingerprintConfig,
BS_ReadBS2FingerprintConfig,
BS_WriteBS2WLANConfig,
BS_ReadBS2WLANConfig,
BS_WriteBS2InterphoneConfig,
BS_ReadBS2InterphoneContifg are added.
1.52
2011
Jan 16
1.6
2012
Incorporated FaceStation.
Apr 10
FSSaveImageEventConfig is added.
FSDisplayConfig is added.
FSInterphoneConfig is added.
FSOPModeConfig is added.
FSFaceConfig is added.
FSInputConfig is added.
FSWiegandConfig is added.
Configuration API
BS_WriteFSTnaEventConfig,
BS_ReadFSTnaEventConfig,
BS_WriteFSTnaEventExConfig,
BS_ReadFSTnaEventExConfig,
BS_WriteFSSaveImageEventConfig,
BS_ReadFSSaveImageEventConfig,
BS_WriteFSInputConfig,
BS_ReadFSInputConfig,
BS_WriteFSWiegandConfig,
BS_ReadFSWiegandConfig,
BS_WriteFS485NetworkConfig,
BS_ReadFS485NetworkConfig,
BS_WriteFSSerialConfig,
BS_ReadFSSerialConfig,
BS_WriteFSOPModeConfig,
BS_ReadFSOPModeConfig,
BS_WriteFSDisplayConfig,
BS_ReadFSDisplayConfig,
BS_WriteFSFaceConfig,
BS_ReadFSFaceConfig,
BS_WriteFSWLANConfig,
BS_ReadFSWLANConfig,
BS_WriteFSInterphoneConfig,
BS_ReadFSInterphoneConfig,
BS_WriteFSUSBConfig,
BS_ReadFSUSBConfig,
BS_WriteBSVideophoneConfig,
BS_ReadBSVideophoneConfig are added.
1.61
1.62
2012
Incorporated BioEntry W
Jun 25
2013
Jan 2
Miscellaneous API
BS_UTF8ToString is added.
BS_UTF16ToString is added.
BS_EncryptSHA256 is added.
1.7
2013
Aug 30
Configuration API
BS_WriteDSInterphoneConfig is added.
BS_ReadDSInterphoneConfig is added.
BS_WriteXSInterphoneConfig is added.
BS_ReadXSInterphoneConfig is added.
BS_WriteXSPINOnlyModeConfig is added.
BS_ReadXSPINOnlyModeConfig is added.
1.8
2014
Apr 25
Important Notice
Information in this document is provided in connection with Suprema products. No license, express
or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document.
Except as provided in Supremas Terms and Conditions of Sale for such products, Suprema assumes
no liability whatsoever, and Suprema disclaims any express or implied warranty, relating to sale
and/or use of Suprema products including liability or warranties relating to fitness for a particular
purpose, merchantability, or infringement of any patent, copyright or other intellectual property
right. Suprema products are not intended for use in medical, life saving, life sustaining applications,
or other applications in which the failure of the Suprema product could create a situation where
personal injury or death may occur. Should Buyer purchase or use Suprema products for any such
unintended or unauthorized application, Buyer shall indemnify and hold Suprema and its officers,
employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and
expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal
injury or death associated with such unintended or unauthorized use, even if such claim alleges that
Suprema was negligent regarding the design or manufacture of the part.
Suprema reserves the right to make changes to specifications and product descriptions at any time
without notice to improve reliability, function, or design.
Designers must not rely on the absence or characteristics of any features or instructions marked
"reserved" or "undefined." Suprema reserves these for future definition and shall have no
responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
Contact your local Suprema sales office or your distributor to obtain the latest specifications and
before placing your product order.
Copyright by Suprema Inc., 2010
*Third-party brands and names are the property of their respective owners.
11
Contents
1.
Introduction ...................................................................... 21
1.1. Contents of the SDK .............................................................. 21
1.2. Usage .................................................................................. 21
1.2.1. Compilation ..............................................................................21
1.2.2. Using the DLL ...........................................................................22
1.2.3. Auxiliary DLL ............................................................................22
2.
12
3.
API Specification................................................................ 42
3.1. Return Codes ........................................................................ 42
3.2. Communication API ............................................................... 45
BS_InitSDK........................................................................................46
BS_OpenSocket ..................................................................................47
BS_OpenSocketEx ..............................................................................48
BS_CloseSocket .................................................................................49
BS_OpenInternalUDP ..........................................................................50
BS_CloseInternalUDP ..........................................................................51
BS_OpenSerial ...................................................................................52
BS_CloseSerial ...................................................................................53
BS_OpenSerial485 ...........................................................................54
BS_CloseSerial485 ...........................................................................56
BS_OpenUSB .....................................................................................57
BS_OpenUSBEx ..................................................................................58
BS_CloseUSB .....................................................................................59
BS_OpenUSBMemory ..........................................................................60
BS_CloseUSBMemory ..........................................................................61
13
BS_CheckSystemStatus.......................................................................73
BS_Reset ...........................................................................................74
BS_ResetUDP .....................................................................................75
BS_ResetLAN .....................................................................................76
BS_UpgradeEx ...................................................................................77
BS_Disable ........................................................................................78
BS_Enable .........................................................................................79
BS_DisableCommunication ..................................................................80
BS_EnableCommunication ...................................................................81
BS_ChangePasswordBEPlus .................................................................82
BS_FactoryDefault ..............................................................................83
14
15
16
17
BS_WriteSerialConfig/BS_ReadSerialConfig.......................................... 312
BS_WriteDSSerialConfig/BS_ReadDSSerialConfig .................................. 314
BS_WriteXSSerialConfig/BS_ReadXSSerialConfig .................................. 315
BS_WriteBS2SerialConfig/BS_ReadBS2SerialConfig .............................. 316
BS_WriteFSSerialConfig/BS_ReadFSSerialConfig ................................... 317
BS_Write485NetworkConfig/BS_Read485NetworkConfig ........................ 318
BS_WriteDS485NetworkConfig/BS_ReadDS485NetworkConfig ................ 320
BS_WriteXS485NetworkConfig/BS_ReadXS485NetworkConfig ................ 322
BS_WriteBS2485NetworkConfig/BS_ReadBS2485NetworkConfig ............. 324
BS_WriteFS485NetworkConfig/BS_ReadFS485NetworkConfig ................. 326
BS_WriteUSBConfig/BS_ReadUSBConfig .............................................. 328
BS_WriteBS2USBConfig/BS_ReadBS2USBConfig ................................... 329
BS_WriteFSUSBConfig/BS_ReadFSUSBConfig ....................................... 330
BS_WriteEncryptionConfig/BS_ReadEncryptionConfig ............................ 331
BS_WriteWiegandConfig/BS_ReadWiegandConfig ................................. 332
BS_WriteDSWiegandConfig/BS_ReadDSWiegandConfig ......................... 334
BS_WriteXSWiegandConfig/BS_ReadXSWiegandConfig .......................... 337
BS_WriteBS2WiegandConfig/BS_ReadBS2WiegandConfig ...................... 340
BS_WriteFSWiegandConfig/BS_ReadFSWiegandConfig .......................... 343
BS_WriteZoneConfigEx/BS_ReadZoneConfigEx ..................................... 346
BS_WriteCardReaderZoneConfig/BS_ReadCardReaderZoneConfig ........... 354
BS_WriteDoorConfig/BS_ReadDoorConfig ............................................ 356
BS_WriteInputConfig/BS_ReadInputConfig .......................................... 361
BS_WriteDSInputConfig/BS_ReadDSInputConfig .................................. 365
BS_WriteXSInputConfig/BS_ReadXSInputConfig ................................... 369
BS_WriteBS2InputConfig/BS_ReadBS2InputConfig ............................... 373
BS_WriteFSInputConfig/BS_ReadFSInputConfig ................................... 377
BS_WriteOutputConfig/BS_ReadOutputConfig ...................................... 381
BS_WriteEntranceLimitConfig/BS_ReadEntranceLimitConfig ................... 386
BS_WriteDSSaveImageEventConfig/BS_ReadDSSaveImageEventConfig .. 388
BS_WriteXSSaveImageEventConfig/BS_ReadXSSaveImageEventConfig ... 390
Copyright 2013 by Suprema Inc.
18
BS_WriteBS2SaveImageEventConfig/BS_ReadBS2SaveImageEventConfig392
BS_WriteFSSaveImageEventConfig/BS_ReadFSSaveImageEventConfig ... 394
BS_WriteDSInterphoneConfig/BS_ReadDSInterphoneConfig................... 396
BS_WriteXSInterphoneConfig/BS_ReadXSInterphoneConfig ................... 398
BS_WriteBS2InterphoneConfig/BS_ReadBS2InterphoneConfig ............... 400
BS_WriteFSInterphoneConfig/BS_ReadFSInterphoneConfig .................... 402
BS_WriteXSPINOnlyModeConfig/BS_ReadXSPINOnlyModeConfig............. 404
BS_WriteConfig/BS_ReadConfig for BioEntry Plus ................................. 406
BS_WriteConfig/BS_ReadConfig for BioLite Net .................................... 419
BS_WriteConfig/BS_ReadConfig for Xpass and Xpass Slim ..................... 433
BS_GetAvailableSpace....................................................................... 445
BS_WriteCardReaderConfig/BS_ReadCardReaderConfig ......................... 446
19
20
1.
21
Introduction
1.1.
Directory
Sub Directory
Contents
SDK
Document
Include
Header files
Lib
Example
1.2.
Usage
1.2.1. Compilation
To call APIs defined in the SDK, BS_API.h should be included in the source files
and Include should be added to the include directories. To link user application
with the SDK, BS_SDK.lib should be added to library modules.
The following snippet shows a typical source file.
#include BS_API.h
int main()
{
// First, initialize the SDK
BS_RET_CODE result = BS_InitSDK();
1
The Visual Basic example does not work with BioLite Net.
Copyright 2013 by Suprema Inc.
22
1.2.2.
To run applications compiled with the SDK, the BS_SDK.dll file should be in the
system directory or in the same directory of the application.
1.2.3.
Auxiliary DLL
1.3.
BioStar, Supremas new access control software will replace BioAdmin. BioStation
SDK, on which BioAdmin is based, will also be superseded by BioStar SDK. From
the viewpoint of developers, the differences between the two SDKs are
incremental. You can think of BioStar SDK as an upgraded version of BioStation
SDK. Most APIs of BioStation SDK will work in BioStar SDK without modification.
However, the descriptions of the deprecated APIs of BioStation SDK are removed
from this manual. For the general differences between BioAdmin and BioStar, refer
to the BioStar Migration Guide.
To make use of new features of BioStar SDK, the firmware of BioStation, BioEntry
Plus, and BioLite Net should meet the following requirements.
Firmware
23
D-Station
BioStation
BioEntry Plus
BioLite Net
X-Station
V1.0 or later
V1.5 or later
V1.2 or later
V1.0 or later
V1.0 or later
Xpass
BioStation T2
Xpass Slim
FaceStation
BioEntry W
V1.0 or later
V1.0 or later
V1.0 or later
V1.0 or later
V1.0 or later
Version
Firmware
Version
1.4.
BioLite Net has been incorporated into BioStar SDK since version 1.1. BioLite Net
shares most of the APIs with BioEntry Plus. When there is a difference in the usage
of an API between the two devices, it is explained explicitly in the corresponding
section.
1.5.
Xpass has been incorporated into BioStar SDK since version 1.26. Xpass shares
most of the APIs with BioEntry Plus and BioLite Net. When there is a difference in
the usage of an API between the two devices, it is explained explicity in the
corresponding section.
1.6.
D-Station
D-Station has been incorporated into BioStar SDK since version 1.3. D-Station
shares many APIs with BioStation but has a lot of exclusive API with other device.
When there is a difference in the usage of an API between the two devices, it is
explained explicity in the corresponding section.
1.7.
X-Station
X-Station has been incorporated into BioStar SDK since version 1.35. X-Station
shares many APIs with D-Station but doesnt support fingerprint and face
templates. When there is a difference in the usage of an API between the two
devices, it is explained explicity in the corresponding section.
1.8.
24
BioStation T2
BioStation T2 has been incorporated into BioStar SDK since version 1.5. BioStation
T2 shares many APIs with D-Station but doesnt support face recognition. When
there is a difference in the usage of an API between the three devices, it is
explained explicity in the corresponding section.
1.9.
Xpass Slim
Xpass Slim has been incorporated into BioStar SDK since version 1.52. Xpass
Slim shares most of the APIs with Xpass. When there is a difference in the usage
of
an API between the two devices, it is explained explicity in the corresponding
section.
1.10. FaceStation
FaceStation has been incorporated into BioStar SDK since version 1.6. FaceStation
shares many APIs with D-Station but doesnt support fingerprint. FaceStation
supports different face templates from D-Station. When there is a difference in the
usage of an API between the two devices, it is explained explicity in the
corresponding section.
1.11. BioEntry W
BioEntry W has been incorporated into BioStar SDK since version 1.61. BioEntry W
shares most of the APIs with Xpass. When there is a difference in the usage of
an API between the two devices, it is explained explicity in the corresponding
section.
2.
25
QuickStart Guide
This chapter is for developers who want to get started quickly with BioStar SDK. It
shows how to do the most common tasks for writing BioStar applications. Only
snippets of C++ source codes will be listed below. You can find out more detailed
examples written in C++, C#, and Visual Basic in the Example directory of the
SDK.
2.1.
Initialization
First of all, you have to initialize the SDK. The BS_InitSDK should be called once
before calling any other functions.
2.2.
Connect to Devices
The second task is to open a communication channel to the device. The available
network options vary according to the device type. D-Station, X-Station,
BioStation T2, FaceStation, BioStation, BioEntry Plus, BioEntry W, BioLite Net,
Xpass and Xpass Slim support Ethernet and RS485, while USB, USB memory,
RS232, and WLAN(optional) are available for BioStation, D-Station, BioStation T2,
and FaceStation only.
2.2.1.
Ethernet
The LAN connection between BioStar applications and devices has two modes
direct and server. As for the differences between the two modes, refer to the
BioStar Administrator Guide and the Ethernet Troubleshooting Guide. To connect
to a device using BioStar SDK, you have to use direct mode.
You also have to know the IP address and the TCP port of the device. If you do not
know this information, you have to search the devices, first. The
BS_SearchDevicesInLAN function is provided for this purpose. You can find
multiple devices in a subnet using this function.
// (1) Open a UDP port
int udpHandle;
BS_OpenInternalUDP( &udpHandle );
26
==
==
==
==
==
BS_DEVICE_BIOSTATION ||
BS_DEVICE_DSTATION ||
BS_DEVICE_XSTATION ||
BS_DEVICE_BIOSTATION2 ||
BS_DEVICE_FSTATION)
char ipAddrBuf[32];
sprintf(ipAddrBuf, "%d.%d.%d.%d", ipAddress[i] & 0xff, (ipAddress[i]
& 0xff00) >> 8, (ipAddress[i] & 0xff0000) >> 16, (ipAddress[i] &
0xff000000) >> 24 );
result = BS_OpenSocket( ipAddrBuf, port, &tcpHandle );
result = BS_SetDeviceID( tcpHandle, deviceID[i], deviceType[i] );
// do something
//
BS_CloseSocket( tcpHandle );
}
Of course, if you already know this information, you can call BS_OpenSocket
directly. After acquiring a handle for a communication interface, you have to call
BS_SetDeviceID before sending any other commands.
2.2.2.
RS485
For BioEntry Plus, BioLite Net, Xpass and Xpass Slim the serialMode of
BEConfigData should be SERIAL_PC. See BS_WriteConfig for details.
27
The RS485 port of a device can also be used for transferring data between devices.
See BS_OpenSerial485 and BS_Search485Slaves for details.
2.2.3.
Miscellaneous
In addition to Ethernet and RS485, BioStation also provides USB, USB memory,
RS232, and WLAN(only for wireless models). The connection procedure to the
WLAN devices is same as that of Ethernet, as long as the wireless parameters are
configured correctly using BS_WriteWLANConfig.
Copyright 2013 by Suprema Inc.
28
As for USB, USB memory, and RS232, the connection procedure is much simpler.
You only have to open the corresponding network interface using BS_OpenUSB,
BS_OpenUSBEx, BS_OpenUSBMemory, and BS_OpenSerial respectively.
2.2.4.
Wiegand
29
But in extended mode, totally different view applies. Even if one RF device is
attached to Suprema device via Wiegand interface as the case of legacy mode,
that RF device is regarded as a independent device which will have its own I/O
port, door, and zone configuration. By SDK APIs added in V1.2, you can assign ID
of RF device, configure input, output, and door for it and include it in a zone.
Please note that RF device ID should be set as follows for proper operation.
RF device id = Wmaster ID 16 + 14
where Wmaster means the Suprema device to which this RF device is attached
For example, if a RF device is attached to BioLite Net with ID 11578 should have
its ID of 185262(11578 16 + 14 = 185262).
if( deviceType == BS_DEVICE_BIOSTATION )
{
// (1) Read the configuration first
BSIOConfig ioConfig;
result = BS_ReadIOConfig( handle, &ioConfig );
// (2) Change the corresponding fields
ioConfig.wiegandMode = BS_IO_WIEGAND_MODE_EXTENDED;
ioConfig.input[0] = BS_IO_INPUT_WIEGAND_CARD;
ioConfig.input[1] = BS_IO_INPUT_WIEGAND_CARD;
ioConfig.cardReaderID = (deviceID * 16 + 14);
// (3) Write the configuration
result = BS_WriteIOConfig( handle, &ioConfig );
// (4) Configure input/output/door for RF device
BSCardReaderConfigData rfConfig;
result = BS_ReadCardReaderConfig( handle, &rfConfig );
30
==
==
==
==
BS_DEVICE_BIOENTRY_PLUS ||
BS_DEVICE_BIOENTRY_W ||
BS_DEVICE_XPASS ||
BS_DEVICE_XPASS_SLIM)
31
32
33
2.3.
Configure Devices
2.4.
Enroll Users
To enroll users to devices, you have to fill the header information correctly in
addition to the fingerprint templates. The following table shows the APIs for
managing users for FaceStation, BioStation T2, D-Station, X-Statation, BioStation,
BioEntry Plus, BioEntry W, BioLite Net, Xpass and Xpass Slim.
BioEntry Plus/
BioStation
BioLite Net/Xpass/Xpass
Slim
User header
BSUserHdrEx
BEUserHdr
Enroll a user
BS_EnrollUserEx
BS_EnrollUserBEPlus
BS_EnrollMultipleUserEx
BS_EnrollMultipleUserBEPlus
BS_GetUserInfoEx
BS_GetUserInfoBEPlus
BS_GetAllUserInfoEx
BS_GetAllUserInfoBEPlus
information
BS_GetUserEx
34
BS_GetUserBEPlus
including template
Delete a user
BS_DeleteUser
BS_DeleteAllUser
BS_DeleteMultipleUsers
BS_GetUserDBInfo
DSUserHdr
Enroll a user
BS_EnrollUserDStation
BS_EnrollMultipleUserDStation
BS_EnrollFace
BS_GetUserInfoDStation
information
BS_GetAllUserInfoDStation
BS_GetUserDStation
BS_GetUserFaceInfo
Delete a user
BS_DeleteUser
BS_DeleteAllUser
BS_DeleteMultipleUsers
XSUserHdr
Enroll a user
BS_EnrollUserXStation
BS_EnrollMultipleUserXStation
BS_GetUserInfoXStation
information
BS_GetAllUserInfoXStation
BS_GetUserXStation
Delete a user
BS_DeleteUser
BS_DeleteAllUser
BS_DeleteMultipleUsers
BS2UserHdr
Enroll a user
BS_EnrollUserBioStation2
BS_EnrollMultipleUserBioStation2
BS_GetUserInfoBioStation2
information
BS_GetAllUserInfoBioStation2
BS_GetUserBioStation2
Delete a user
BS_DeleteUser
BS_DeleteAllUser
BS_DeleteMultipleUsers
35
36
The following table shows the APIs for managing users for FaceStation. If the
FaceStations firmware version is less than or equal to 1.1, use FSUserHdr,
BS_EnrollUserFStation, BS_EnrollMultipleUserFStation, BS_GetUserInfoFStation,
BS_GetAllUserInfoFStation, BS_GetUserFStation. If the firmware version is 1.2 or
later, use FSUserHdrEx, BS_EnrollUserFStationEx, BS_EnrollMultipleUserFStationEx,
BS_GetUserInfoFStationEx, BS_GetAllUserInfoFStationEx, BS_GetUserFStationEx.
FaceStation (FW ver <= 1.1)
User header
FSUserHdr
FSUserHdrEx
Enroll a user
BS_EnrollUserFStation
BS_EnrollUserFStationEx
BS_EnrollMultipleUserFStation
BS_EnrollMultipleUserFStationEx
BS_GetUserInfoFStation
BS_GetUserInfoFStationEx
BS_GetAllUserInfoFStation
BS_GetAllUserInfoFStationEx
BS_GetUserFStation
BS_GetUserFStationEx
Delete a user
BS_DeleteUser
BS_DeleteAllUser
information
BS_DeleteMultipleUsers
Table 7-4 FaceStation User Management APIs
2.4.1.
User Header
37
Scan templates
You can use SFR300, SFR400, SFR410, SFR500 USB reader for capturing
fingerprint templates. You can also use BioStation T2, D-Station, BioStation,
BioEntry Plus, or BioLite Net as an enroll station. For the latter case,
BS_ScanTemplate function is provided.
// If you are to enroll a user with one finger two fingerprint
// templates - to a BioEntry Plus device
BEUserHdr userHdr;
// fill other fields of userHdr
// ..
userHdr.numOfFinger = 1;
unsigned char* templateBuf = (unsigned char*)malloc( 384 *
userHdr.numOfFinger * 2 );
int bufPos = 0;
for( int i = 0; i < userHdr.numOfFinger * 2; i++ )
{
BS_RET_CODE result = BS_ScanTemplate( handle, templateBuf + bufPos );
bufPos += 384;
}
2.4.3.
You can use D-Station for capturing face templates and images.
BS_ReadFaceData function is provided.
// If you are to enroll a user with ones face three face
// templates - to a D-Station device
DSUserHdr userHdr;
// fill other fields of userHdr
// ..
userHdr.numOfFace = 1;
unsigned char* imageBuf = (unsigned char*)malloc( 50*1024 *
useHdr.numOfFace );
unsigned char* templateBuf = (unsigned char*)malloc( 2284 *
userHdr.numOfFace );
int imagePos = 0;
int templatePos = 0;
for( int i = 0; i < userHdr.numOfFace; i++ )
{
BS_RET_CODE result = BS_ReadFaceData( handle, imageLen, imageBuf +
imagePos, templateBuf + templatePos);
imagePos += imageLen;
templatePos += 2284;
38
2.4.4.
You can use FaceStation for capturing face templates and images.
BS_ScanFaceTemplate function is provided.
// If you are to enroll a user with ones face 25 face
// templates - to a FaceStation device
FSUserTemplateHdr userTemplateHdr;
2.4.5.
Scan RF cards
One of major advantages of BioStar system is that you can combine diverse
authentication modes. To assign a RF card to a user, you have to read it first using
BS_ReadCardIDEx from Suprema device or using BS_ReadRFCardIDEx from
3rd party RF device. Then, you can assign 4 byte card ID and 1 byte custom ID to
the user header structrure.
2.5.
Slim to 50,000 log records respectively. The log records are managed as a circular
queue; when the log space is full, the oldest log records will be erased
automatically. As for the event types, refer to Table 9 Log Event Types.
2.5.1.
There are two APIs for reading past log records; BS_ReadLog and
Copyright 2013 by Suprema Inc.
39
Depending on your applications, you might have to read log records in real-time.
For this purpose, FaceStation, BioStation T2, D-Station, BioStation, BioEntry Plus,
BioEntry W, BioLite Net, X-Station, Xpass, Xpass Slim manage a log cache, which
can store up to 128 log records.
// Clears the cache first
BS_RET_CODE result = BS_ClearLogCache( handle );
BSLogRecord logRecords[128];
int numOfLog;
// Monitoring loop
while( 1 ) {
result = BS_ReadLogCache( handle, &numOfLog, logRecords );
// do something with the log records
//
}
In case of FaceStation, BioStation T2, D-Station and X-Station, use Extended API
as below.
Copyright 2013 by Suprema Inc.
40
2.6.
Demo Project
The SDK includes simple examples written in C++, C#, and Visual Basic. You can
compile and test them by yourselves. Inspecting the source codes would be the
fastest way to be acquainted with the SDK.
The demo applications written in C++ and C# have the same user interface. You
can test them as follows;
(1) Press Search button to discover devices using BS_SearchDeviceInLAN.
(2) Select a device in the Device list and press Network Config button.
(3) If necessary, change the network configuration of the device. Then, press
Connect button to connect to the device. If connection succeeds, the
device will be added to the Connected Device List.
(4) Select a device in the Connected Device list.
(5) Select one of the three buttons, Time, User and Log for further test.
Copyright 2013 by Suprema Inc.
41
3.
42
API Specification
3.1.
Return Codes
Most APIs in the SDK return BS_RET_CODE. The return codes and their meanings
are as follows;
Code
Description
BS_SUCCESS
BS_ERR_NO_AVAILABLE_CHANNEL
BS_ERR_INVALID_COMM_HANDLE
BS_ERR_CANNOT_WRITE_CHANNEL
BS_ERR_WRITE_CHANNEL_TIMEOUT
Write timeout.
BS_ERR_CANNOT_READ_CHANNEL
BS_ERR_READ_CHANNEL_TIMEOUT
Read timeout.
BS_ERR_CHANNEL_OVERFLOW
BS_ERR_CANNOT_INIT_SOCKET
BS_ERR_CANNOT_OPEN_SOCKET
BS_ERR_CANNOT_CONNECT_SOCKET
BS_ERR_CANNOT_OPEN_SERIAL
BS_ERR_CANNOT_OPEN_USB
Copyright 2013 by Suprema Inc.
43
the USB device driver is properly
installed.
BS_ERR_BUSY
BS_ERR_INVALID_PACKET
BS_ERR_CHECKSUM
BS_ERR_UNSUPPORTED
BS_ERR_FILE_IO
BS_ERR_DISK_FULL
BS_ERR_NOT_FOUND
BS_ERR_INVALID_PARAM
BS_ERR_RTC
BS_ERR_MEM_FULL
BS_ERR_DB_FULL
BS_ERR_INVALID_ID
BS_ERR_USB_DISABLED
BS_ERR_COM_DISABLED
BS_ERR_WRONG_PASSWORD
BS_ERR_INVALID_USB_MEMORY
BS_ERR_TRY_AGAIN
BS_ERR_EXIST_FINGER
44
enrolled.
Table 8 Error Codes
3.2.
45
Communication API
BS_OpenUSBEx: opens a USB port with FaceStation, BioStation T2, DStation, X-Station and BioStation.
46
BS_InitSDK
Initializes the SDK. This function should be called once before any other functions
are executed.
BS_RET_CODE BS_InitSDK()
Parameters
None
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/ D-Station/BioStation/BioEntry Plus/ BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
47
BS_OpenSocket
Opens a TCP socket with the specified IP address and port number. With
FaceStation, BioStation T2, D-Station, BioStation, BioLite Net and X-Station, you
can find out this information in the LCD menu of the device. With BioEntry Plus,
BioEntry W, Xpass and Xpass Slim, you have to search the device first by
BS_SearchDevicesInLAN.
BS_RET_CODE BS_OpenSocket( const char* ipAddr, int port, int* handle )
Parameters
ipAddr
IP address of the device.
port
TCP port number. The default is 1470, 1471.
1470 for FaceStation, BioStation T2, D-Station, BioStation, X-Station.
1471 for BioEntry Plus, BioLite Net, Xpass, Xpass Slim.
handle
Pointer to the handle to be assigned.
Return Values
If a socket is opened successfully, return BS_SUCCESS with the assigned handle.
Otherwise, return the corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
48
BS_OpenSocketEx
This function accomplishes the same roll as BS_OpenSocket. But this function can
assign the IP address of the local network interface which is required to
communicate with devices.
BS_RET_CODE BS_OpenSocketEx( const char* deviceipAddr, int port,
const char* hostipAddr, int* handle )
Parameters
deviceipAddr
IP address of the device.
port
TCP port number. The default is 1470, 1471.
1470 for FaceStation, BioStation T2, D-Station,BioStation, X-Station.
1471 for BioEntry Plus,BioEntry W, BioLite Net, Xpass, Xpass Slim.
handle
Pointer to the handle to be assigned.
hostipAddr
IP address of the local network interface to be required.
Return Values
If a socket is opened successfully, return BS_SUCCESS with the assigned handle.
Otherwise, return the corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
BS_CloseSocket
Closes the socket.
BS_RET_CODE BS_CloseSocket( int handle )
Parameters
handle
Handle of the TCP socket acquired by BS_OpenSocket.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
49
50
BS_OpenInternalUDP
FaceStation, BioStation T2, D-Station, X-Station, BioStation(V1.5 or later),
BioEntry Plus, BioEntry W, Xpass, Xpass Slim and BioLite Net reserve a UDP port
for internal communication. You can use this port for searching devices in a subnet.
Or you can reset a device for troubleshooting purposes. See
BS_SearchDeviceInLAN and BS_ResetUDP.
BS_RET_CODE BS_OpenInternalUDP( int* handle )
Parameters
handle
Pointer to the handle to be assigned.
Return Values
If a socket is opened successfully, return BS_SUCCESS with the assigned handle.
Otherwise, return the corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation(V1.5 or later)/BioEntry
Plus/BioEntry W/BioLite Net/X-Station/Xpass/Xpass Slim
BS_CloseInternalUDP
Closes the UDP socket.
BS_RET_CODE BS_CloseInternalUDP( int handle )
Parameters
handle
Handle of the UDP socket acquired by BS_OpenInternalUDP.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation(V1.5 or later)/BioEntry
Plus/BioEntry W/BioLite Net/X-Station/Xpass/Xpass Slim
51
BS_OpenSerial
Opens a RS232 port with the specified baud rate.
BS_RET_CODE BS_OpenSerial( const char* port, int baudrate, int*
handle )
Parameters
port
Pointer to a null-terminated string that specifies the name of the serial port.
baudrate
Specifies the baud rate at which the serial port operates. Available baud rates
are 9600, 19200, 38400, 57600, and 115200bps. The default is 115200bps.
handle
Pointer to the handle to be assigned.
Return Values
If the function succeeds, return BS_SUCCESS with the assigned handle.
Otherwise, return the corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
52
BS_CloseSerial
Closes the serial port.
BS_RET_CODE BS_CloseSerial( int handle )
Parameters
handle
Handle of the serial port acquired by BS_OpenSerial.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
53
54
BS_OpenSerial485
Opens a RS485 port with the specified baud rate. To communicate with a device
connected to the host PC through RS485, the RS485 mode should be set as
follows;
For BioEntry Plus, BioEntry W, Xpass and Xpass Slim the serialMode of
BEConfigData should be SERIAL_PC. See BS_WriteConfig for details.
In a half-duplex RS485 network, only one device should initiate all communication
activity. We call this device host, and all the other devices slaves. Each
FaceStation, BioStation T2, D-Station, X-Station, BioStation, BioEntry Plus,
BioEntry W, Xpass, Xpass Slim or BioLite Net has one RS485 port, which can be
used for connection to PC or other devices. FaceStastion, BioStation T2, D-Station
and X-Station has two RS485 port but RS485-0 port is only used.for PC connection,
so RS485-1 port supports the host/slave connection. The RS485 Mode setting of
the device should be configured to one of the following modes;
PC Connection: The RS485 port is used for connecting to the PC. Maximum
31 devices can be connected to the PC through a RS485 network. In this
case, the PC acts as the host device. Note that there is no zone support in
55
this configuration.
searching
slave
devices
attached
to
host,
refer
to
BS_Search485Slaves.
Slave: The slave device is connected to the host through RS485. It can
communicate with the PC through the host device.
BS_CloseSerial485
Closes the serial port.
BS_RET_CODE BS_CloseSerial485( int handle )
Parameters
handle
Handle of the serial port acquired by BS_OpenSerial485.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net /Xpass/Xpass Slim
56
BS_OpenUSB
Open a USB communication channel with BioStation. To use the USB channel,
libusb-win32 library and the device driver should be installed first. These are
included in BioStar and BioAdmin packages.
57
58
BS_OpenUSBEx
Open a USB communication channel with D-Station, X-Station, BioStation T2, and
FaceStation. To use the USB channel, libusb-win32 library and the device driver
should be installed first. These are included in BioStar packages.
BS_CloseUSB
Closes the USB channel.
BS_RET_CODE BS_CloseUSB( int handle )
Parameters
handle
Handle of the USB channel acquired by BS_OpenUSB.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
59
60
BS_OpenUSBMemory
USB memory sticks can be used for transferring data between the host PC and
BioStation terminals. After creating a virtual terminal in a memory stick, you can
communicate with it in the same way as other communication channels. If the
corresponding function is not supported for the virtual terminal,
BS_ERR_UNSUPPORTED will be returned.
BS_CloseUSBMemory
Closes the USB memory.
BS_RET_CODE BS_CloseUSBMemory( int handle )
Parameters
handle
Handle of the USB memory acquired by BS_OpenUSBMemory.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
61
3.3.
62
Device API
63
BS_GetDeviceID
To communicate with a device, you have to know its ID and device type. In most
cases, this is the first function to be called after a communication channel is
opened. After acquiring the ID and type, you have to call BS_SetDeviceID.
64
BS_SetDeviceID
After acquiring the ID and type of a device using BS_GetDeviceID,
BS_SearchDevice, or BS_SearchDeviceInLAN, you have to call
BS_SetDeviceID. It will initialize the device-related settings of the
communication handle.
BS_RET_CODE BS_SetDeviceID( int handle, unsigned deviceID, int
deviceType )
Parameters
handle
Handle of the communication channel.
deviceID
ID of the device.
deviceType
Type of the device. It is either BS_DEVICE_FSTATION,
BS_DEVICE_BIOSTATION2, BS_DEVICE_DSTATION, BS_DEVICE_XSTATION
BS_DEVICE_BIOSTATION, BS_DEVICE_BIOENTRY_PLUS, BS_DEVICE_BIOLITE,
BS_DEVICE_XPASS, BS_DEVICE_XPASS_SLIM.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
BS_SearchDevice
Searches devices in a RS485 network. Up to 31 devices can be connected to the
PC through RS485.
65
BS_Search485Slaves
Searches slave devices connected to a host device by RS485. As for the general
description of RS485 configuration, see BS_OpenSerial485. To search slave
devices, the following conditions should be met.
(1) The host and slave devices should be connected by RS485.
(2) The host device should be connected to LAN.
(3) The RS485 mode of the host and slave devices should be set to Host and
Slave respectively. Refer to BS_WriteConfig and
BS_Write485NetworkConfig for details.
Descriptions
2
slaveType
ID of the device
BS_DEVICE_FSTATION
BS_DEVICE_BIOSTATION T2
BS_DEVICE_DSTATION
BS_DEVICE_XSTATION
BS_DEVICE_BIOSTATION
66
67
BS_DEVICE_BIOENTRY_PLUS
BS_DEVICE_BIOLITE
BS_DEVICE_XPASS
BS_DEVICE_XPASS_SLIM
numOfSlaves
Pointer to the number of slave devices to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation(V1.5 or later)/BioEntry
Plus(V1.2 or later)/BioEntry W/BioLite Net/Xpass/Xpass Slim
Example
PC
Ethernet
Host
192.168.1.1
RS485
Secure
I/O
Slave
Slave
Slave
68
69
BS_SearchDeviceInLAN
Searches devices in LAN environment by UDP protocol. It sends a UDP broadcast
packet to all the devices in a subnet. To call this function, a UDP handle should be
acquired by BS_OpenInternalUDP.
70
int deviceTypes[64];
unsigned deviceAddrs[64];
result = BS_SearchDeviceInLAN( udpHandle, &numOfDevice, deviceIDs,
deviceTypes, deviceAddrs );
for( int i = 0; i < numOfDevice; i++ )
{
int tcpHandle;
char buf[32];
sprintf( buf, "%d.%d.%d.%d", deviceAddrs[i] & 0xff, (deviceAddrs[i] &
0xff00) >> 8, (deviceAddrs[i] & 0xff0000) >> 16, (deviceAddrs[i] &
0xff000000) >> 24 );
if( deviceTypes[i] == BS_DEVICE_BIOSTATION ||
deviceTypes[i] == BS_DEVICE_DSTATION ||
deviceTypes[i] == BS_DEVICE_XSTATION ||
deviceTypes[i] == BS_DEVICE_BIOSTATION2 ||
deviceTypes[i] == BS_DEVICE_FSTATION)
{
result = BS_OpenSocket( buf, 1470, &tcpHandle );
}
else if( deviceTypes[i] == BS_DEVICE_BIOENTRY_PLUS ||
deviceTypes[i] == BS_DEVICE_BIOLITE ||
deviceTypes[i] == BS_DEVICE_XPASS ||
deviceTypes[i] == BS_DEVICE_XPASS_SLIM)
{
Result = BS_OpenSocket( buf, 1471, &tcpHandle );
}
BS_SetDeviceID( tcpHandle, deviceIDs[i], deviceTypes[i] );
// do something
BS_CloseSocket( tcpHandle );
}
71
BS_GetTime
Gets the time of a device. All the time values in this SDK represent local time, not
Coordinated Universal Time(UTC). To convert a UTC value into a local time,
BS_ConvertToLocalTime can be used.
BS_RET_CODE BS_GetTime( int handle, time_t* timeVal )
Parameters
handle
Handle of the communication channel.
timeVal
Pointer to the number of seconds elapsed since midnight (00:00:00), January
1, 1970, according to the system clock. Please note that it is local time, not
UTC.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
BS_SetTime
Sets the time of a device.
BS_RET_CODE BS_SetTime( int handle, time_t timeVal )
Parameters
handle
Handle of the communication channel.
timeVal
Number of seconds elapsed since midnight (00:00:00), January 1, 1970.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
Example
// Synchronize the time of a device with that of PC
time_t currentTime = BS_ConvertToLocalTime( time( NULL ) );
BS_RET_CODE result = BS_SetTime( handle, currentTime );
72
73
BS_CheckSystemStatus
Checks if a device is connected to the channel.
Differently from other devices, FaceStation, BioStation T2, D-Station and X-Station
keep the connection for only 10 minutes. Being timed with no action, the
connection will be closed. So, in case of FaceStation, BioStation T2, D-Station and
X-Station, BS_CheckSystemStatus should be called more frequently than every
10 minutes to prevent connection close.
BS_RET_CODE BS_CheckSystemStatus( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
BS_Reset
Resets a device.
BS_RET_CODE BS_Reset( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
74
BS_ResetUDP
Resets a device by UDP protocol. In some rare cases, you cannot connect to a
device, even if you can search it in BioAdmin or BioStar. In those cases, you can
reset it by this function.
BS_RET_CODE BS_ResetUDP( int handle, unsigned targetAddr, unsigned
targetID )
Parameters
handle
Handle of the communication channel returned by BS_OpenInternalUDP.
targetAddr
IP address of the target device.
targetID
ID of the target device.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation(V1.5 or later)/BioEntry
Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
75
BS_ResetLAN
Reestablishes the IP configuration of BioStation. When you call
BS_WriteIPConfig, the changes are not taken into account immediately. If you
want to reassign the IP address using the new configuration, you have to call
BS_ResetLAN. On the contrary, BioEntry Plus, BioEntry W or BioLite Net will
reacquire the IP address automatically if its IP configuration is changed.
BS_RET_CODE BS_ResetLAN( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
76
BS_UpgradeEx
Upgrades the firmware of a device. The device should not be turned off when
upgrade is in progress.
77
78
BS_Disable
When communicating with a BioStation terminal, data corruption may occur if
users are manipulating it at the terminal simultaneously. For example, if a user is
placing a finger while the terminal is deleting fingerprints, the result might be
inconsistent. To prevent such cases, developers would be well advised to call
BS_Disable before sending commands which will change the status of a terminal.
After this function is called, the BioStation will ignore keypad and fingerprint inputs,
and process only the commands delivered through communication channels. For
the terminal to revert to normal status, BS_Enable should be called afterwards.
BS_RET_CODE BS_Disable( int handle, int timeout )
Parameters
handle
Handle of the communication channel.
timeout
If there is no command during this timeout interval, the terminal will get back
to normal status automatically. The maximum timeout value is 60 seconds.
Return Values
If the terminal is processing another command, BS_ERR_BUSY will be returned.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
Example
// Enroll users
BS_RET_CODE result = BS_Disable( handle, 20 ); // timeout is 20 seconds
if( result == BS_SUCCESS )
{
result = BS_EnrollUserEx( );
//
BS_Enable( handle );
}
BS_Enable
Enables the terminal. See BS_Disable for details.
BS_RET_CODE BS_Enable( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
79
BS_DisableCommunication
Disables all communication channels. After this function is called, the device will
return BS_ERR_COM_DISABLED to all functions except for
BS_EnableCommunication, BS_GetDeviceID, and search functions.
BS_RET_CODE BS_DisableCommunication( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
80
BS_EnableCommunication
Re-enables all the communication channels.
BS_RET_CODE BS_EnableCommunication( int handle, const char*
masterPassword )
Parameters
handle
Handle of the communication channel.
masterPassword
16 byte master password. The default password is a string of 16 NULL
characters. To change the master password of a BioStation terminal, please
refer to the BioStation User Guide. You can change the master password of a
BioEntry Plus or BioLite Net using BS_ChangePasswordBEPlus().
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2D-Station/X-Station/BioStation/BioEntry Plus/BioLite
Net/Xpass/Xpass Slim
81
BS_ChangePasswordBEPlus
Changes the master password of a BioEntry Plus or BioLite Net.
BS_RET_CODE BS_ChangePasswordBEPlus( int handle, const char*
oldPassword, const char* newPassword )
Parameters
handle
Handle of the communication channel.
oldPassword
16 byte old password to be replaced. If it does not match,
BS_ERR_WRONG_PASSWORD will be returned.
newPassword
16 byte new password.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
82
83
BS_FactoryDefault
Resets the status of a FaceStation, BioStation T2, X-Station, D-Station, BioStation,
BioEntry Plus, BioEntry W, BioLite Net, Xpass or Xpass Slim to the factory default.
BS_RET_CODE BS_FactoryDefault( int handle, unsigned mask )
Parameters
handle
Handle of the communication channel.
mask
Mask
Descriptions
BS_FACTORY_DEFAULT_CONFIG
BS_FACTORY_DEFAULT_USER
BS_FACTORY_DEFAULT_LOG
BS_FACTORY_DEFAULT_LED
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
Example
// Resets system parameters and deletes all users and log records
BS_RET_CODE result = BS_FactoryDefault( handle, BS_FACTORY_DEFAULT_CONFIG |
BS_FACTORY_DEFAULT_USER | BS_FACTORY_DEFAULT_LOG );
3.4.
84
85
typedef struct {
unsigned char event;
unsigned char subEvent;
unsigned short tnaEvent;
time_t eventTime;
// 32 bits type
unsigned userID;
unsigned reserved2;
} BSLogRecord;
typedef struct {
Enum {
NO_IMAGE = -1;
WRITE_ERROR = -2;
};
unsigned char event;
unsigned char subEvent;
unsigned short tnaKey;
time_t eventTime;
// 32 bits type
unsigned userID;
unsigned deviceID;
short imageSlot;
short reserved1;
int reserved2;
} BSLogRecordEx;
1. event
The type of log record. The event codes and their meanings are as follows.
Category
Event Code
Value
Description
System
SYS_STARTED
0x6A
TIME_SET
0xD2
RELAY_ON
0x80
Door is opened. It is
Door
superseded by 0x8A
and 0x8B since
BioStation V1.4.
RELAY_OFF
0x81
Door is closed.
DOOR0_OPEN
0x82
Door 0 is opened.
DOOR1_OPEN
0x83
Door 1 is opened.
DOOR0_CLOSED
0x84
Door 0 is closed.
DOOR1_CLOSED
0x85
Door 1 is closed.
DOOR0_FORCED_OPEN
0x86
Door 0 is opened by
force.
86
0x87
Door 1 is opened by
force.
DOOR0_HELD_OPEN
0x88
DOOR1_HELD_OPEN
0x89
DOOR0_RELAY_ON
0x8A
DOOR1_RELAY_ON
0x8B
DOOR_HELD_OPEN_ALARM
0xE0
DOOR_FORCED_OPEN
0xE1
_ALARM
DOOR_HELD_OPEN_ALARM
force.
0xE2
_CLEAR
DOOR_FORCED_OPEN_ALARM
0xE3
_CLEAR
I/O
Door is opened by
TAMPER_SW_ON
0x64
TAMPER_SW_OFF
0x65
DETECT_INPUT0
0x54
DETECT_INPUT1
0x55
INTERNAL_INPUT0
0xA0
Detect a signal at
INTERNAL_INPUT1
0xA1
SECONDARY_INPUT0
0xA2
SECONDARY_INPUT1
0xA3
SIO0_INPUT0
0xB0
SIO0_INPUT1
0xB1
SIO0_INPUT2
0xB2
SIO0_INPUT3
0xB3
SIO1_INPUT0
0xB4
SIO1_INPUT1
0xB5
SIO1_INPUT2
0xB6
SIO1_INPUT3
0xB7
87
SIO2_INPUT0
0xB8
SIO2_INPUT1
0xB9
SIO2_INPUT2
0xBA
SIO2_INPUT3
0xBB
SIO3_INPUT0
0xBC
SIO3_INPUT1
0xBD
SIO3_INPUT2
0xBE
SIO3_INPUT3
0xBF
Access
IDENTIFY_NOT_GRANTED
0x6D
Control
VERIFY_NOT_GRANTED
0x6E
at this time.
NOT_GRANTED
0x78
APB_FAIL
0x73
Anti-passback is
violated.
COUNT_LIMIT
0x74
TIME_INTERVAL_LIMIT
0x75
INVALID_AUTH_MODE
0x76
The authentication
mode is not supported
at this time.
EXPIRED_USER
0x77
1:1
VERIFY_SUCCESS
0x27
matching
VERIFY_FAIL
0x28
VERIFY_NOT_GRANTED
0x6E
VERIFY_DURESS
0x62
Duress finger is
detected.
1:N
IDENTIFY_SUCCESS
0x37
matching
1:N matching
succeeds.
IDENTIFY_FAIL
0x38
IDENTIFY_NOT_GRANTED
0x6D
IDENTIFY_DURESS
0x63
Duress finger is
detected.
User
ENROLL_SUCCESS
0x17
A user is enrolled.
Mifare
88
ENROLL_FAIL
0x18
DELETE_SUCCESS
0x47
A user is deleted.
DELETE_FAIL
0x48
DELETE_ALL_SUCCESS
0x49
CARD_ENROLL_SUCCESS
0x20
Card
successfully.
CARD_ENROLL_FAIL
0x21
CARD_VERIFY_DURESS
0x95
Duress finger is
detected.
CARD_VERIFY_SUCCESS
0x97
CARD_VERIFY_FAIL
0x98
CARD_APB_FAIL
0x99
Anti-passback is
violated.
CARD_COUNT_LIMIT
0x9A
CARD_TIME_INTERVAL
0x9B
_LIMIT
CARD_INVALID_AUTH
0x9C
_MODE
The authentication
mode is not supported
at this time.
CARD_EXPIRED_USER
0x9D
Zone
CARD_NOT_GRANTED
0x9E
BLACKLISTED
0xC2
User is blacklisted.
ARMED
0xC3
DISARMED
0xC4
Alarm zone is
disarmed.
ALARM_ZONE_INPUT
0xC5
An input point is
activated in an armed
zone.
FIRE_ALARM_ZONE_INPUT
0xC6
An input point is
activated in a fire alarm
zone.
89
0xC7
0xC8
_CLEAR
FIRE_ALARM_ZONE_INPUT
_CLEAR
released.
APB_ZONE_ALARM
0xC9
Anti-passback is
violated.
ENTLIMIT_ZONE_ALARM
0xCA
Entrance limitation is
violated.
APB_ZONE_ALARM_CLEAR
0xCB
Anti-passback alarm is
released.
ENTLIMIT_ZONE_ALARM
0xCC
_CLEAR
Network
Entrance limitation
alarm is released.
SOCK_CONN
0xD3
Connection is
established from PC.
SOCK_DISCONN
0xD4
Connection is closed.
SERVER_SOCK_CONN
0xD5
Connected to BioStar
server.
SERVER_SOCK_DISCONN
0xD6
Disconnected from
BioStar server.
LINK_CONN
0xD7
Ethernet link is
connected.
LINK_DISCONN
0xD8
Ethernet link is
disconnected.
INIT_IP
0xD9
IP configuration is
initialized.
INIT_DHCP
0xDA
DHCP is initialized.
DHCP_SUCCESS
0xDB
Acquired an IP address
from the DHCP server.
2. subEvent
The additional information which is meaningful only in case that events
are VERIFY_SUCCESS and IDENTIFY_SUCCESS. The event codes and their
meanings are as follows.
Copyright 2013 by Suprema Inc.
90
Event Code
Value
Description
VERIFY_FINGER
0x2B
VERIFY_PIN
0x2C
VERIFY_CARD_FINGER
0x2D
VERIFY_CARD_PIN
0x2E
VERIFY_CARD
0x2F
VERIFY_CARD_FINGER_PIN
0x30
VERIFY_FINGER_PIN
0x31
VERIFY_FACE
0x32
VERIFY_CARD_FACE
0x33
VERIFY_CARD_FACE_PIN
0x34
VERIFY_FACE_PIN
0x35
Event Code
Value
Description
IDENTIFY_FINGER
0x3A
IDENTIFY_FINGER_PIN
0x3B
IDENTIFY_FACE
0x3D
IDENTIFY_FACE_PIN
0x3E
3. tnaEvent
The index of TNA event, which is between BS_TNA_F1 and BS_TNA_ESC.
See BS_WriteTnaEventConfig for details. It will be 0xffff if it is not a
TNA event.
4. eventTime
The local time at which the event occurred. It is represented by the
number of seconds elapsed since midnight (00:00:00), January 1, 1970.
5. userID
The user ID related to the log event. If it is not a user-related event, it will
be 0.
6. deviceID
The device ID is only for the BSLogRecordEx. It is stored with the device
Copyright 2013 by Suprema Inc.
91
ID.
7. imageSlot
The imageSlot is only for the BSLogRecordEx. The imageSlot is managed
as a circular queue (0 ~ 4999); when the image log space is full, the
oldest image log records will be erased automatically.
If there is no image log, then be BSLogRecordEx:NO_IMAGE (-1), and
there is image log, but fail to write image log in terminal, then reture
BSLogRecordEx:WRITE_ERROR (-2).
8. reserved2
It is only for BSLogRecord. When the log synchronization option is on in a
zone, the log records of the member devices will be stored in the master
device, too. In this case, this field will be used for the device ID. Otherwise,
this field should be 0.
BS_GetLogCount
Retrieves the number of log records.
BS_RET_CODE BS_GetLogCount( int handle, int* numOfLog )
Parameters
handle
Handle of the communication channel.
numOfLog
Pointer to the number of log records stored in a device.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
92
BS_ClearLogCache
BioStation, BioEntry Plus, BioEntry W, BioLite Net, Xpass and Xpass Slim have a
cache which keeps 128 latest log records. This is useful for real-time monitoring.
BS_ClearLogCache clears this cache for initializing or restarting real-time
monitoring.
BS_RET_CODE BS_ClearLogCache( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation/BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
Example
// Clears the cache first
BS_RET_CODE result = BS_ClearLogCache( handle );
BSLogRecord logRecords[128];
int numOfLog;
// Monitoring loop
while( 1 ) {
result = BS_ReadLogCache( handle, &numOfLog, logRecords );
// do something
}
93
94
BS_ClearLogCacheEx
FaceStation, BioStation T2, D-Station and X-Station have a cache which keeps 128
latest log records. This is useful for real-time monitoring. BS_ClearLogCacheEx
clears this cache for initializing or restarting real-time monitoring.
BS_RET_CODE BS_ClearLogCacheEx( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
Example
// Clears the cache first
BS_RET_CODE result = BS_ClearLogCacheEx( handle );
BSLogRecordEx logRecords[128];
int numOfLog;
// Monitoring loop
while( 1 ) {
result = BS_ReadLogCacheEx( handle, &numOfLog, logRecords );
// do something
}
BS_ReadLogCache
Reads the log records in the cache. After reading, the cache will be cleared.
BS_RET_CODE BS_ReadLogCache( int handle, int* numOfLog,
BSLogRecord* logRecord )
Parameters
handle
Handle to the communication channel.
numOfLog
Pointer to the number of log records in the cache.
logRecord
Pointer to the log records to be returned. This pointer should be preallocated
large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation/BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
95
BS_ReadLogCacheEx
Reads the log records in the cache. After reading, the cache will be cleared.
BS_RET_CODE BS_ReadLogCacheEx( int handle, int* numOfLog,
BSLogRecordEx* logRecord )
Parameters
handle
Handle to the communication channel.
numOfLog
Pointer to the number of log records in the cache.
logRecord
Pointer to the log records to be returned. This pointer should be preallocated
large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceSatation/BioStation T2/D-Station/X-Station
96
97
BS_ReadLog
Reads log records which were written in the specified time interval. Although a
BioStation terminal can store up to 1,000,000 log records, the maximum number
of log records to be returned by this function is limited to 32,768. As for BioEntry
Plus, BioEntry W, BioLite Net, Xpass and Xpass Slim, which can store up to 50,000
log records, the maximum number is 8,192. Therefore, users should call
BS_ReadLog repetitively if the number of log records in the time interval is larger
than these limits.
BS_RET_CODE BS_ReadLog( int handle, time_t startTime, time_t endTime,
int* numOfLog, BSLogRecord* logRecord )
Parameters
handle
Handle of the communication channel.
startTime
Start time of the interval. If it is set to 0, the log records will be read from the
start.
endTime
End time of the interval. If it is set to 0, the log records will be read to the end.
numOfLog
Pointer to the number of log records to be returned.
logRecord
Pointer to the log records to be returned. This pointer should be preallocated
large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation/BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
Example
int numOfLog;
98
99
BS_ReadLogEx
Reads log records which were written in the specified time interval. Although a
FaceStation, BioStation T2, D-Station and X-Station terminals can store up to
1,000,000 log records, the maximum number of log records to be returned by this
function is limited to 21,845. Therefore, users should call BS_ReadLogEx
repetitively if the number of log records in the time interval is larger than these
limits.
BS_RET_CODE BS_ReadLogEx( int handle, time_t startTime, time_t
endTime, int* numOfLog, BSLogRecordEx* logRecord )
Parameters
handle
Handle of the communication channel.
startTime
Start time of the interval. If it is set to 0, the log records will be read from the
start.
endTime
End time of the interval. If it is set to 0, the log records will be read to the end.
numOfLog
Pointer to the number of log records to be returned.
logRecord
Pointer to the log records to be returned. This pointer should be preallocated
large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
Example
int numOfLog;
BSLogRecordEx* logRecord = (BSLogRecordEx*)malloc( .. );
100
101
BS_ReadNextLog
BS_ReadNextLog searches log records starting from the last record read by
BS_ReadLog or BS_ReadNextLog. It is useful for reading lots of log records in
succession.
BS_RET_CODE BS_ReadNextLog( int handle, time_t startTime, time_t
endTime, int* numOfLog, BSLogRecord* logRecord )
Parameters
handle
Handle of the communication channel.
startTime
Start time of the interval. If it is set to 0, it will be ignored.
endTime
End time of the interval. If it is set to 0, it will be ignored.
numOfLog
Pointer to the number of log records to be returned.
logRecord
Pointer to the log records to be returned. This pointer should be preallocated
large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation/BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
Example
// read all the log records from a BioEntry Plus
const int MAX_LOG = 1000000; // 1000000 for BioStation
const int MAX_READ_LOG = 8192; // 32768 for BioStation
int numOfReadLog = 0;
int numOfLog = 0;
BSLogRecord* logRecord = (BSLogRecord*)malloc( MAX_LOG );
102
103
BS_ReadNextLogEx
BS_ReadNextLogEx searches log records starting from the last record read by
BS_ReadLogEx or BS_ReadNextLogEx. It is useful for reading lots of log
records in succession.
BS_RET_CODE BS_ReadNextLogEx( int handle, time_t startTime, time_t
endTime, int* numOfLog, BSLogRecordEx* logRecord )
Parameters
handle
Handle of the communication channel.
startTime
Start time of the interval. If it is set to 0, it will be ignored.
endTime
End time of the interval. If it is set to 0, it will be ignored.
numOfLog
Pointer to the number of log records to be returned.
logRecord
Pointer to the log records to be returned. This pointer should be preallocated
large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
Example
// read all the log records from a BioEntry Plus
const int MAX_LOG = 10000000; // 1000000 for BioStation T2
const int MAX_READ_LOG = 21845;
int numOfReadLog = 0;
int numOfLog = 0;
BSLogRecordEx* logRecord = (BSLogRecordEx*)malloc( MAX_LOG );
104
105
BS_DeleteLog
Deletes oldest log records. Please note that BioEntry Plus, BioEntry W, BioLite Net,
Xpass and Xpass Xlim support only BS_DeleteAllLog().
BS_RET_CODE BS_DeleteLog( int handle, int numOfLog, int*
numOfDeletedLog )
Parameters
handle
Handle of the communication channel.
numOfLog
Number of log records to be deleted.
numOfDeletedLog
Pointer to the number of deleted log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
106
BS_DeleteAllLog
Deletes all log records.
BS_RET_CODE BS_DeleteAllLog( int handle, int numOfLog, int*
numOfDeletedLog )
Parameters
handle
Handle of the communication channel.
numOfLog
This filed is ignored.
numOfDeletedLog
Pointer to the number of deleted log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
BS_GetImageLogCount
Retrieves the number of image log records from FaceStation, BioStation T2, DStation and X-Station.
BS_RET_CODE BS_GetImageLogCount( int handle, int* numOfLog )
Parameters
handle
Handle of the communication channel.
numOfLog
Pointer to the number of image log records stored in a device.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
107
108
BS_ReadImageLog
Reads image log records which were written in the specified time interval.
Although a FaceStation, BioStation T2, D-Station and X-Station terminals can store
up to 5,000 image log records. Therefore, users will get all image log records by
one call BS_ReadImaeLog.
BS_RET_CODE BS_ReadImageLog( int handle, time_t startTime, time_t
endTime, int* numOfLog, unsigned char* imageLogData )
Parameters
handle
Handle of the communication channel.
startTime
Start time of the interval. If it is set to 0, the log records will be read from the
start.
endTime
End time of the interval. If it is set to 0, the log records will be read to the end.
numOfLog
Pointer to the number of image log records to be returned.
imageLogData
Pointer to the image log records to be returned, numOfLog times repeated
data, each consisted of ( BSImageLogHdr + imageData). This pointer should
be preallocated large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStationt T2/D-Station/X-Station
Example
int numOfLog=0;
BS_RET_CODE result = BS_GetImageLogCount( handle, &numOfLog );
int bufsize = numOfLog * (sizeof(BSImageLogHdr) +
109
110
BS_ReadSpecificImageLog
Reads image log records which were written in the specified time and event id
from FaceStation, BioStation T2, D-Station and X-Station.
BS_RET_CODE BS_ReadSpecificImageLog( int handle, time_t logTime, int
event, int* size, unsigned char* imageLogData )
Parameters
handle
Handle of the communication channel.
logTime
The time of the image log saved. You can get it from the BSLogRecordEx data,
get from calling BS_ReadLogEx or BS_ReadNextLogEx API.
event
The log records event id. You can get it from the BSLogRecordEx data, get
from calling BS_ReadLogEx or BS_ReadNextLogEx API.
size
Size of packet to be returned. It is sum of BSImageLogHdr size and image
data length.
imageLogData
Pointer to the image log records to be returned, numOfLog times repeated
data, each consisted of ( BSImageLogHdr + imageData). This pointer should
be preallocated large enough to store the log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
Example
// Reads the log records of latest 24 hours
time_t currentTime = BS_ConvertToLocalTime( time( NULL ) );
111
BS_DeleteImageLog
Deletes oldest image log records of FaceStation, BioStation T2, D-Station and XStation.
BS_RET_CODE BS_DeleteImageLog( int handle, int numOfLog, int*
numOfDeletedLog )
Parameters
handle
Handle of the communication channel.
numOfLog
Number of log records to be deleted.
numOfDeletedLog
Pointer to the number of deleted image log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
112
BS_DeleteAllImageLog
Deletes all image log records of FaceStation, BioStation T2, D-Station and XStation.
BS_RET_CODE BS_DeleteAllImageLog( int handle, int numOfLog, int*
numOfDeletedLog )
Parameters
handle
Handle of the communication channel.
numOfLog
This filed is ignored.
numOfDeletedLog
Pointer to the number of deleted image log records.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
113
3.5.
114
Users can customize the background images and sound effects using the following
functions. The size of an image or sound file should not exceed 512KB.
115
BS_SetBackground
BioStation has three types of background logo, slide show, and notice. Users can
customize these images using BS_SetBackground and BS_SetSlideShow.
BS_SetBackground( int handle, int bgIndex, const char* fileName )
Parameters
handle
Handle of the communication channel.
bgIndex
Background index. It should be one of BS_BACKGROUND_LOGO,
BS_BACKGROUND_NOTICE, and BS_BACKGROUND_PDF.
D-Station, BioStation support as below
BS_BACKGROUND_LOGO
BS_BACKGROUND_NOTICE
FaceStation, BioStation T2, X-Station support as below
BS_BACKGROUND_LOGO
BS_BACKGROUND_NOTICE
BS_BACKGROUND_PDF
fileName
Name of the image file or PDF file. If the file is an image file, it should be a
320x240 PNG file. If PDF file, the file size must be less than 512KB.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
BS_SetSlideShow
Sets an image of the slide show. The maximum number of images is 16.
BS_RET_CODE BS_SetSlideShow( int handle, int numOfPicture, int
imageIndex, const char* pngFile )
Parameters
handle
Handle of the communication channel.
numOfPicture
Total number of the images in the slide show.
imageIndex
Index of the image in the slide show.
pngFile
Name of the image file. It should be a 320x240 PNG file.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
116
BS_DeleteSlideShow
Deletes all the images of the slide show.
BS_RET_CODE BS_DeleteSlideShow( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
117
118
BS_SetSound
There are 15 sound effects in BioStation. Users can replace these sounds using
BS_SetSound.
BS_RET_CODE BS_SetSound( int handle, int soundIndex, const char*
wavFile )
Parameters
handle
Handle of the communication channel.
soundIndex
Index of the sound effect.
The available sound effects of D-Station, X-Station and BioStation are as
follows;
Index
When to play
BS_SOUND_START
BS_SOUND_CLICK
BS_SOUND_SUCCESS
BS_SOUND_QUESTION
BS_SOUND_ERROR
BS_SOUND_SCAN
BS_SOUND_FINGER_ONLY
BS_SOUND_PIN_ONLY
BS_SOUND_CARD_ONLY
BS_SOUND_FINGER_PIN
BS_SOUND_FINGER_CARD
BS_SOUND_TNA_F1
119
When authentication succeeds
after F2 button is pressed
BS_SOUND_TNA_F3
BS_SOUND_TNA_F4
When to play
BS2_SOUND_START
BS2_SOUND_AUTH_SUCCESS
BS2_SOUND_UNREGISTER_USER
BS2_SOUND_SCAN_TIMEOUT
BS2_SOUND_AUTH_FAIL
BS2_SOUND_ENROLL_SUCCESS
BS2_SOUND_ENROLL_FAIL
BS2_SOUND_TAKE_PHOTO
BS2_SOUND_CONFIG_SUCCESS
BS2_SOUND_CONFIG_FAIL
BS2_SOUND_TRANSFER
BS2_SOUND_KEY_0
BS2_SOUND_KEY_1
BS2_SOUND_KEY_2
BS2_SOUND_KEY_3
BS2_SOUND_KEY_4
BS2_SOUND_KEY_5
BS2_SOUND_KEY_6
BS2_SOUND_KEY_7
BS2_SOUND_KEY_8
BS2_SOUND_KEY_9
BS2_SOUND_TOUCH
BS2_SOUND_CLICK
BS2_SOUND_FINGER_SCAN
BS2_SOUND_CARD_READ
BS2_SOUND_CONFRIM
120
BS2_SOUND_ALARM
BS2_SOUND_ARM_WAIT
BS2_SOUND_DISARM_WAIT
BS2_SOUND_ARM_SUCCESS
BS2_SOUND_ARM_FAIL
BS2_SOUND_DISARM_SUCCESS
BS2_SOUND_DISARM_FAIL
BS2_SOUND_TRY_AUTH_IN_ARM
BS2_SOUND_REQUEST_FINGER
BS2_SOUND_REQUEST_CARD
BS2_SOUND_REQUEST_ID
BS2_SOUND_REQUEST_PIN
BS2_SOUND_REQUEST_FINGER_PIN
BS2_SOUND_REQUEST_FINGER_CARD_ID
BS2_SOUND_REQUEST_FINGER_CARD
BS2_SOUND_REQUEST_FINGER_ID
BS2_SOUND_REQUEST_CARD_ID
wavFile
Filename of the sound file. It should be a signed 16bit, 22050Hz, mono WAV
file.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
BS_DeleteSound
Clears the sound file set by BS_SetSound.
BS_RET_CODE BS_DeleteSound( int handle, int soundIndex )
Parameters
handle
Handle of the communication channel.
soundIndex
Index of the sound effect. See BS_SetSound.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
121
122
BS_SetLanguageFile
BioStation supports two languages - Korean and English. It also provides a custom
language option to support other languages. For further details of custom
language option, please contact sales@supremainc.com.
BS_RET_CODE BS_SetLanguageFile( int handle, int languageIndex, const
char* languageFile )
Parameters
handle
Handle of the communication channel.
languageIndex
Available options are BS_LANG_ENGLISH, BS_LANG_KOREAN, and
BS_LANG_CUSTOM.
languageFile
Name of the language resource file.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioLite Net
BS_SendNotice
Sends the notice message, which will be displayed on BioStation when the
background is set to BS_UI_BG_NOTICE.
BS_SendNotice( int handle, const char* msg )
Parameters
handle
Handle of the communication channel.
msg
Pointer to the notice message. The maximum length is 1024 bytes.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
123
124
BS_SendNoticeEx
Sends the notice message, which will be displayed on FaceStation, BioStation T2,
D-Station, BioStation or X-Station when the background is set to
BS_UI_BG_NOTICE.
BS_SendNoticeEx( int handle, const char* msg, bool bUTF16 )
Parameters
handle
Handle of the communication channel.
msg
Pointer to the notice message. The maximum length is 1024 bytes.
bUTF16
Select encode type. D-Station uses UTF16 so true, and BioStation uses UTF8
so false.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
3.6.
125
These APIs provide user management functions such as enroll and delete. Note
that the user header structures of BioStation, BioEntry Plus, BioEntry W, BioLite
Net, Xpass, and Xpass Slim are different. See the Compatibility section of each
API to choose the right function.
126
127
BS_GetUserDBInfo
Retrieves the number of enrolled users and fingerprint templates.
BS_RET_CODE BS_GetUserDBInfo( int handle, int* numOfUser, int*
numOfTemplate )
Parameters
handle
Handle of the communication channel.
numOfUser
Pointer to the number of enrolled users.
numOfTemplate
Pointer to the number of enrolled templates.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation/BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
128
129
BS_EnrollUserEx
Enrolls a user to BioStation. Maximum 5 fingers can be enrolled per user.
BS_RET_CODE BS_EnrollUserEx( int handle, BSUserHdrEx* hdr, unsigned
char* templateData )
Parameters
handle
Handle of the communication channel.
Hdr
BSUserHdrEx is defined as follows.
typedef struct{
unsigned ID;
unsigned short reserved1;
unsigned short adminLevel;
unsigned short securityLevel;
unsigned short statusMask; // internally used by BioStation
unsigned accessGroupMask;
char name[BS_MAX_NAME_LEN + 1];
char department[BS_MAX_NAME_LEN + 1];
char password[BS_MAX_PASSWORD_LEN + 1];
unsigned short numOfFinger;
unsigned short duressMask;
unsigned short checksum[5];
unsigned short authMode;
unsigned short authLimitCount; // 0 for no limit
unsigned short reserved;
unsigned short timedAntiPassback; // in minutes. 0 for no limit
unsigned cardID; // 0 for not used
bool bypassCard;
bool disabled;
unsigned expireDateTime;
unsigned customID; //card Custom ID
int version; // card Info Version
unsigned startDateTime;
} BSUserHdrEx;
Descriptions
adminLevel
BS_USER_ADMIN
BS_USER_NORMAL
accessGroupMask
duressMask
checksum
authMode
130
131
BS_AUTH_FINGER_N_PASSWORD
BS_AUTH_FINGER_OR_PASSWORD
BS_AUTH_PASS_ONLY
BS_AUTH_CARD_ONLY
authLimitCount
timedAntiPassback
cardID
bypassCard
disabled
expireDateTime
customID
version
startDateTime
templateData
Fingerprint templates of the user. Two templates should be enrolled per each
finger.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
132
Example
BSUserHdrEx userHeader;
// initialize header
memset( &userHdr, 0, sizeof( BSUserHdrEx ) );
userHdr.ID = 1; // 0 cannot be assigned as a user ID
userHdr.startDateTime = 0; // no check for start date
userHdr.expireDateTime = 0; // no check for expiry date
userHeader.adminLevel = BS_USER_NORMAL;
userHeader.securityLevel = BS_USER_SECURITY_DEFAULT;
userHeader.authMode = BS_AUTH_MODE_DISABLED; // use the authentication mode
// of the device
userHeader.accessGroupMask = 0xffff0201; // a member of Group 1 and Group
2;
strcpy( userHeader.name, John );
strcpy( userHeader.departments, RND );
strcpy( userHeader.password, ); // no password is enrolled. Password
// should be longer than 4 bytes.
// read card IDs
BS_RET_CODE result = BS_ReadCardIDEx( handle, &userHeader.cardID,
&userHdr.customID );
userHdr.version = CARD_INFO_VERSION;
userHdr.bypassCard = 0;
// scan templates
userHeader.numOfFinger = 2;
unsigned char* templateBuf = (unsigned char*)malloc( userHeader.numOfFinger
* 2 * BS_TEMPLATE_SIZE );
int bufPos = 0;
for( int i = 0; i < userHeader.numOfFinger * 2; i++ )
{
result = BS_ScanTemplate( handle, templateBuf + bufPos );
bufPos += BS_TEMPLATE_SIZE;
}
userHeader.duressMask = 0; // no duress finger
for( int i = 0; i < userHeader.numOfFinger * 2; i++ )
{
if( i % 2 == 0 )
{
userHeader.checksum[i/2] = 0;
}
unsigned char* templateData = templateBuf + i * BS_TEMPLATE_SIZE;
133
134
BS_EnrollMultipleUserEx
Enrolls multiple users to BioStation. By combining user information, the enrollment
time will be reduced.
BS_RET_CODE BS_EnrollMultipleUserEx( int handle, int numOfUser,
BSUserHdrEx* hdr, unsigned char* templateData )
Parameters
handle
Handle of the communication channel.
numOfUser
Number of users to be enrolled.
hdr
Array of user headers to be enrolled.
templateData
Fingerprint templates of the all users.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
Example
int numOfUser = 2;
BSUserHdrEx hdr1, hdr2;
unsigned char *templateBuf1, *templateBuf2;
// fill the header and template data here
//
BSUserHdrEx* hdr = (BSUserHdrEx*)malloc( numOfUser *
sizeof( BSUserHdrEx ) );
unsigned char* templateBuf = (unsigned char*)malloc( hdr1.numOfFinger * 2 *
BS_TEMPLATE_SIZE + hdr2.numOfFinger * 2 * BS_TEMPLATE_SIZE );
135
136
BS_EnrollUserBEPlus
Enroll a user to BioEntry Plus, BioEntry W, BioLite Net, Xpass or Xpass Slim.
In using BioEntry Plus and BioLite Net, Maximum 2 fingers can be enrolled per user.
The only difference between BioEntry Plus and BioLite Net is that only the latter
uses the password field.
In using Xpass, numOfFinger field of BEUserHdr and templateData parameter are
ignored because Xpass has been designed for the card only product.
BS_RET_CODE BS_EnrollUserBEPlus( int handle, BEUserHdr* hdr,
unsigned char* templateData )
Parameters
handle
Handle of the communication channel.
Hdr
BEUserHdr is defined as follows.
typedef struct {
// card Flag
NORMAL_CARD = 0x00,
BYPASS_CARD = 0x01,
// card Version
CARD_VERSION_1 = 0x13,
// Admin level
USER_LEVEL_NORMAL = 0,
USER_LEVEL_ADMIN = 1,
// Security leve
USER_SECURITY_DEFAULT = 0,
USER_SECURITY_LOWER = 1,
USER_SECURITY_LOW = 2,
USER_SECURITY_NORMAL = 3,
USER_SECURITY_HIGH = 4,
USER_SECURITY_HIGHER = 5,
};
int version;
unsigned userID;
time_t startTime;
Descriptions
version
0x01.
userID
User ID.
startTime
expiryTime
cardID
cardCustomID
commandCardFlag
cardFlag
NORMAL_CARD
BYPASS_CARD
cardVersion
CARD_VERSION_1
adminLevel
USER_LEVEL_NORMAL
USER_LEVEL_ADMIN
securityLevel
137
numOfFinger
fingerChecksum
isDuress
disabled
opMode
138
139
dualMode
password
fullCardCustomID
templateData
Fingerprint templates of the user. Two templates should be enrolled per each
finger.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
Example
BEUserHdr userHeader;
// initialize header
memset( &userHeader, 0, sizeof( BEUserHdr ) );
userHeader.version = 0x01;
userHeader.userID = 0x01;
userHeader.startTime = 0; // no start time check
userHeader.expiryTime = US_ConvertToLocalTime( time( NULL ) ) + 365 * 24 *
60 * 60; // 1 year from today
userHeader.adminLevel = BEUserHdr::USER_LEVEL_NOMAL;
userHeader.securityLevel = BEUserHdr::USER_SECURITY_DEFAULT;
userHeader.accessGroupMask = 0xffff0201; // a member of Group 1 and Group
2;
userHeader.opMode = BS_AUTH_MODE_DISABLED; // use the authentication mode
// of the device
// read card IDs
BS_RET_CODE result = BS_ReadCardIDEx( handle, &userHeader.cardID,
&userHdr.cardCustomID );
userHdr.cardVersion = BEUserHdr::CARD_VERSION_1;
userHdr.cardFlag = BEUserHdr::NORMAL_CARD;
// scan templates
140
userHeader.numOfFinger = 2;
unsigned char* templateBuf = (unsigned char*)malloc( userHeader.numOfFinger
* 2 * BS_TEMPLATE_SIZE );
int bufPos = 0;
for( int i = 0; i < userHeader.numOfFinger * 2; i++ )
{
result = BS_ScanTemplate( handle, templateBuf + bufPos );
bufPos += BS_TEMPLATE_SIZE;
}
for( int i = 0; i < userHeader.numOfFinger * 2; i++ )
{
if( i % 2 == 0 )
{
userHeader.fingerChecksum[i/2] = 0;
}
unsigned char* templateData = templateBuf + i * BS_TEMPLATE_SIZE;
for( int j = 0; j < BS_TEMPLATE_SIZE; j++ )
{
userHeader.checksum[i/2] += templateData[j];
}
}
result = BS_EnrollUserBEPlus( handle, &userHeader, templateBuf );
BS_EnrollMultipleUserBEPlus
Enrolls multiple users to BioEntry Plus or BioLite Net. By combining user
information, you can reduce the enrollment time.
BS_RET_CODE BS_EnrollMultipleUserBEPlus( int handle, int numOfUser,
BEUserHdr* hdr, unsigned char* templateData )
Parameters
handle
Handle of the communication channel.
numOfUser
Number of users to be enrolled.
hdr
Array of user headers to be enrolled.
templateData
Fingerprint templates of the all users.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus/BioEntry W/BioLite Net
Example
See the Example of BS_EnrollMultipleUserEx.
141
BS_EnrollUserDStation
Enrolls a user to D-Station. Maximum 10 fingers and 3 face can be enrolled per
user.
BS_RET_CODE BS_EnrollUserDStation( int handle, DSUserHdr* hdr,
unsigned char* templateData, unsigned char* faceTemplate )
Parameters
handle
Handle of the communication channel.
Hdr
DSUserHdr is defined as follows.
typedef struct{
enum{
DS_MAX_NAME_LEN = 48,
DS_MAX_PASSWORD_LEN = 16,
DS_MIN_PASSWORD_LEN = 4,
DS_TEMPLATE_SIZE = 384,
DS_FACE_TEMPLATE_SIZE = 2284,
MAX_FINGER = 10,
MAX_FINGER_TEMPLATE = 20,
MAX_FACE = 5,
MAX_FACE_TEMPLATE = 5,
USER_NORMAL = 0,
USER_ADMIN = 1,
}
unsigned ID;
unsigned short headerVersion;
unsigned short adminLevel;
unsigned short securityLevel;
unsigned short statusMask; // internally used by BioStation
unsigned accessGroupMask;
unsigned short name[DS_MAX_NAME_LEN];
unsigned short department[DS_MAX_NAME_LEN];
unsigned short password[DS_MAX_PASSWORD_LEN];
unsigned short numOfFinger;
unsigned short numOfFace;
unsigned char duress[MAX_FINGER];
unsigned char reserved1[2];
unsigned char fingerType[MAX_FINGER];
unsigned fingerChecksum[MAX_FINGER];
unsigned faceChecksum[MAX_FACE_TEMPLATE];
142
Descriptions
adminLevel
USER_ADMIN
USER_NORMAL
securityLevel
accessGroupMask
duress
fingerType
143
facechecksum
authMode
bypassCard
disabled
cardID
customID
startDateTime
expireDateTime
144
145
templateData
Fingerprint templates of the user. Two templates should be enrolled per each
finger.
faceTemplate
Face templates of the user. Three templates should be enrolled per each user.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Example
DSUserHdr userHeader;
// initialize header
memset( &userHdr, 0, sizeof( DSUserHdr ) );
userHdr.ID = 1; // 0 cannot be assigned as a user ID
userHdr.startDateTime = 0; // no check for start date
userHdr.expireDateTime = 0; // no check for expiry date
userHeader.adminLevel = BS_USER_NORMAL;
userHeader.securityLevel = BS_USER_SECURITY_DEFAULT;
userHeader.authMode = BS_AUTH_MODE_DISABLED; // use the authentication mode
// of the device
userHeader.accessGroupMask = 0xffff0201; // a member of Group 1 and Group
2;
strcpy( userHeader.name, John );
strcpy( userHeader.departments, RND );
strcpy( userHeader.password, ); // no password is enrolled. Password
// should be longer than 4 bytes.
// read card IDs
BS_RET_CODE result = BS_ReadCardIDEx( handle, &userHeader.cardID,
&userHdr.customID );
userHdr.bypassCard = 0;
// scan finger templates
userHeader.numOfFinger = 2;
unsigned char* templateBuf = (unsigned char*)malloc( userHeader.numOfFinger
* 2 * BS_TEMPLATE_SIZE );
146
147
148
BS_EnrollMultipleUserDStation
Enrolls multiple users to D-Station. By combining user information, the enrollment
time will be reduced.
BS_RET_CODE BS_EnrollMultipleUserDStation( int handle, int numOfUser,
DSUserHdr* hdr, unsigned char* templateData, unsigned char*
faceTemplate )
Parameters
handle
Handle of the communication channel.
numOfUser
Number of users to be enrolled.
hdr
Array of user headers to be enrolled.
templateData
Fingerprint templates of the all users.
faceTemplate
Face templates of the all users.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Example
int numOfUser = 2;
DSUserHdr hdr1, hdr2;
unsigned char *templateBuf1, *templateBuf2;
unsigned char *faceTemplate1, *faceTemplate2;
// fill the header and template data here
//
DSUserHdr* hdr = (DSUserHdr*)malloc( numOfUser * sizeof( DSUserHdr ) );
149
// header
unsigned char* templateBuf = (unsigned char*)malloc( hdr1.numOfFinger * 2 *
BS_TEMPLATE_SIZE + hdr2.numOfFinger * 2 * BS_TEMPLATE_SIZE );
memcpy( hdr, &hdr1, sizeof( DSUserHdr ) );
memcpy( hdr + sizeof( DSUserHdr ), &hdr2, sizeof( DSUserHdr ) );
// fingerprint template
memcpy( templateBuf, templateBuf1, hdr1.numOfFinger * 2 *
BS_TEMPLATE_SIZE );
memcpy( templateBuf + hdr1.numOfFinger * 2 * BS_TEMPLATE_SIZE, templateBuf2,
hdr2.numOfFinger * 2 * BS_TEMPLATE_SIZE );
// face template
unsigned char* faceTemplateBuf = (unsigned char*)malloc( hdr1.numOfFace *
BS_FACE_TEMPLATE_SIZE + hdr2.numOfFace * BS_FACE_TEMPLATE_SIZE );
memcpy( faceTemplateBuf, faceTemplateBuf1, hdr1.numOfFace *
BS_FACE_TEMPLATE_SIZE );
memcpy( faceTemplateBuf + hdr1.numOfFace * BS_FACE_TEMPLATE_SIZE,
faceTemplateBuf2, hdr2.numOfFace * BS_FACE_TEMPLATE_SIZE );
// enroll multiple
BS_RET_CODE result = BS_EnrollMultipleUserDStation( handle, numOfUser, hdr,
templateBuf, faceTemplate );
150
BS_EnrollFace
Enrolls users face template to D-Station. By combining user id, maximum 3 faces
can be enrolled pre user.
BS_RET_CODE BS_EnrollFace( int handle, unsigned int userID, int
numOfFace,
Parameters
handle
Handle of the communication channel.
userID
ID of user to be enrolled.
numOfFace
Number of faces to be enrolled.
faceTemplate
Face templates of the user.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Example
int userID = 0;
int numOfFace = 3;
unsigned char *face1, *face2, *face3;
// fill the user id and face template data here
//
// face template
unsigned char* faceTemplate = (unsigned char*)malloc(numOfFace *
BS_FACE_TEMPLATE_SIZE);
151
152
BS_EnrollUserXStation
Enrolls a user to X-Station. In using X-Station, numOfFinger field of XSUserHdr and
templateData parameter are ignored because XStation has been designed for the
card only product.
BS_RET_CODE BS_EnrollUserXStation( int handle, XSUserHdr* hdr)
Parameters
handle
Handle of the communication channel.
Hdr
XSUserHdr is defined as follows.
typedef struct{
enum{
DS_MAX_NAME_LEN = 48,
DS_MAX_PASSWORD_LEN = 16,
DS_MIN_PASSWORD_LEN = 4,
DS_TEMPLATE_SIZE = 384,
DS_FACE_TEMPLATE_SIZE = 2284,
MAX_FINGER = 10,
MAX_FINGER_TEMPLATE = 20,
MAX_FACE = 5,
MAX_FACE_TEMPLATE = 5,
USER_NORMAL = 0,
USER_ADMIN = 1,
}
unsigned ID;
unsigned short headerVersion;
unsigned short adminLevel;
unsigned short securityLevel;
unsigned short statusMask; // internally used by BioStation
unsigned accessGroupMask;
unsigned short name[DS_MAX_NAME_LEN];
unsigned short department[DS_MAX_NAME_LEN];
unsigned short password[DS_MAX_PASSWORD_LEN];
unsigned short numOfFinger;
unsigned short numOfFace;
unsigned char duress[MAX_FINGER];
unsigned char reserved1[2];
unsigned char fingerType[MAX_FINGER];
unsigned fingerChecksum[MAX_FINGER];
Descriptions
adminLevel
USER_ADMIN
USER_NORMAL
securityLevel
accessGroupMask
duress
fingerType
153
facechecksum
authMode
bypassCard
disabled
cardID
customID
startDateTime
expireDateTime
6
154
155
expires.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
Example
XSUserHdr userHeader;
// initialize header
memset( &userHdr, 0, sizeof( XSUserHdr ) );
userHdr.ID = 1; // 0 cannot be assigned as a user ID
userHdr.startDateTime = 0; // no check for start date
userHdr.expireDateTime = 0; // no check for expiry date
userHeader.adminLevel = BS_USER_NORMAL;
userHeader.securityLevel = BS_USER_SECURITY_DEFAULT;
userHeader.authMode = BS_AUTH_MODE_DISABLED; // use the authentication mode
// of the device
userHeader.accessGroupMask = 0xffff0201; // a member of Group 1 and Group
2;
strcpy( userHeader.name, John );
strcpy( userHeader.departments, RND );
strcpy( userHeader.password, ); // no password is enrolled. Password
// should be longer than 4 bytes.
// read card IDs
BS_RET_CODE result = BS_ReadCardIDEx( handle, &userHeader.cardID,
&userHdr.customID );
userHdr.bypassCard = 0;
// enroll the user
result = BS_EnrollUserXStation( handle, &userHeader );
156
BS_EnrollMultipleUserXStation
Enrolls multiple users to X-Station. By combining user information, the enrollment
time will be reduced.
BS_RET_CODE BS_EnrollMultipleUserXStation( int handle, int numOfUser,
XSUserHdr* hdr, )
Parameters
handle
Handle of the communication channel.
numOfUser
Number of users to be enrolled.
hdr
Array of user headers to be enrolled.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
Example
int numOfUser = 2;
XSUserHdr hdr1, hdr2;
unsigned char *templateBuf1, *templateBuf2;
unsigned char *faceTemplate1, *faceTemplate2;
// fill the header and template data here
//
XSUserHdr* hdr = (XSUserHdr*)malloc( numOfUser * sizeof( XSUserHdr ) );
// header
memcpy( hdr, &hdr1, sizeof( XSUserHdr ) );
memcpy( hdr + sizeof( XSUserHdr ), &hdr2, sizeof( XSUserHdr ) );
157
BS_EnrollUserBioStation2
Enrolls a user to BioStation T2. Maximum 10 fingers per user.
BS_RET_CODE BS_EnrollUserBioStation2(int handle, BS2UserHdr* hdr,
unsigned char* templateData)
Parameters
handle
Handle of the communication channel.
Hdr
BS2UserHdr is defined as follows.
typedef struct{
enum{
DS_MAX_NAME_LEN = 48,
DS_MAX_PASSWORD_LEN = 16,
DS_MIN_PASSWORD_LEN = 4,
DS_TEMPLATE_SIZE = 384,
DS_FACE_TEMPLATE_SIZE = 2284,
MAX_FINGER = 10,
MAX_FINGER_TEMPLATE = 20,
MAX_FACE = 5,
MAX_FACE_TEMPLATE = 5,
USER_NORMAL = 1,
USER_ADMIN = 1,
}
unsigned ID;
unsigned short headerVersion;
unsigned short adminLevel;
unsigned short securityLevel;
unsigned short statusMask; // internally used by BioStation
unsigned accessGroupMask;
unsigned short name[DS_MAX_NAME_LEN];
unsigned short department[DS_MAX_NAME_LEN];
unsigned short password[DS_MAX_PASSWORD_LEN];
unsigned short numOfFinger;
unsigned short numOfFace;
unsigned char duress[MAX_FINGER];
unsigned char reserved1[2];
unsigned char fingerType[MAX_FINGER];
unsigned fingerChecksum[MAX_FINGER];
unsigned faceChecksum[MAX_FACE_TEMPLATE];
158
Descriptions
adminLevel
BS_USER_ADMIN
BS_USER_NORMAL
securityLevel
accessGroupMask
duress
fingerType
159
160
authMode
bypassCard
disabled
cardID
customID
startDateTime
expireDateTime
templateData
Fingerprint templates of the user. Two templates should be enrolled per each
finger.
7
161
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
Example
BS2UserHdr userHeader;
// initialize header
memset( &userHdr, 0, sizeof( BS2UserHdr ) );
userHdr.ID = 1; // 0 cannot be assigned as a user ID
userHdr.startDateTime = 0; // no check for start date
userHdr.expireDateTime = 0; // no check for expiry date
userHeader.adminLevel = BS_USER_NORMAL;
userHeader.securityLevel = BS_USER_SECURITY_DEFAULT;
userHeader.authMode = BS_AUTH_MODE_DISABLED; // use the authentication mode
// of the device
userHeader.accessGroupMask = 0xffff0201; // a member of Group 1 and Group
2;
strcpy( userHeader.name, John );
strcpy( userHeader.departments, RND );
strcpy( userHeader.password, ); // no password is enrolled. Password
// should be longer than 4 bytes.
// read card IDs
BS_RET_CODE result = BS_ReadCardIDEx( handle, &userHeader.cardID,
&userHdr.customID );
userHdr.bypassCard = 0;
// scan finger templates
userHeader.numOfFinger = 2;
unsigned char* templateBuf = (unsigned char*)malloc( userHeader.numOfFinger
* 2 * BS_TEMPLATE_SIZE );
int bufPos = 0;
for( int i = 0; i < userHeader.numOfFinger * 2; i++ )
{
result = BS_ScanTemplate( handle, templateBuf + bufPos );
bufPos += BS_TEMPLATE_SIZE;
}
162
163
BS_EnrollMultipleUserBioStation2
Enrolls multiple users to BioStation T2. By combining user information, the
enrollment time will be reduced.
BS_RET_CODE BS_EnrollMultipleUserBioStation2( int handle, int
numOfUser, BS2UserHdr* hdr, unsigned char* templateData)
Parameters
handle
Handle of the communication channel.
numOfUser
Number of users to be enrolled.
hdr
Array of user headers to be enrolled.
templateData
Fingerprint templates of the all users.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
Example
int numOfUser = 2;
BS2UserHdr hdr1, hdr2;
unsigned char *templateBuf1, *templateBuf2;
// fill the header and template data here
//
BS2UserHdr* hdr = (BS2UserHdr*)malloc( numOfUser * sizeof( BS2UserHdr ) );
// header
unsigned char* templateBuf = (unsigned char*)malloc( hdr1.numOfFinger * 2 *
BS_TEMPLATE_SIZE + hdr2.numOfFinger * 2 * BS_TEMPLATE_SIZE );
164
165
BS_EnrollUserFStation
Enrolls a user to FaceStation Maximum 25 facetemplates per user. The
FSUserHdr::MAX_FACE is sum of numOfFace and numOfUpdatedFace.
FSUserHdr::MAX_FACE = numOfFace(20) + numOfUpdatedFace(5)
BS_RET_CODE BS_EnrollUserFStation(int handle, FSUserHdr* hdr,
unsigned char* faceTemplate)
Parameters
handle
Handle of the communication channel.
Hdr
FSUserHdr is defined as follows.
typedef struct{
enum{
MAX_NAME_LEN
= 48,
MAX_PASSWORD_LEN
= 16,
MIN_PASSWORD_LEN
= 4,
MAX_FACE
= 25,
FACE_TEMPLATE_SIZE = 2000,
MAX_FACE_RAW
= 20,
FACE_RAW_TEMPLATE_SIZE = 37500,
MAX_IMAGE_SIZE = 8*1024,
USER_NORMAL = 0,
USER_ADMIN = 1,
USER_SECURITY_DEFAULT = 0,
USER_SECURITY_LOWER
= 1,
USER_SECURITY_LOW = 2,
USER_SECURITY_NORMAL
= 3,
USER_SECURITY_HIGH = 4,
USER_SECURITY_HIGHER
};
= 5,
typedef struct{
enum{
MAX_FACE
= 25,
MAX_FACE_RAW
= 20,
};
166
Descriptions
adminLevel
USER_ADMIN
USER_NORMAL
securityLevel
accessGroupMask
numOfFace
numOfUpdatedFace
faceLen
faceTemp
faceChecksum
167
bypassCard
disabled
cardID
customID
startDateTime
expireDateTime
faceUpdatedIndex
faceTemplate
Face templates of the user. 25 templates should be enrolled per each user.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
8
168
169
170
171
BS_EnrollUserFStationEx
BS_EnrollUserFStationEx can enroll a user to FaceStation Maximum 5 faces. Each
face has 20 ~ 25 face templates. A user can have Maximum 125 face templates.
125 = FSUserHdrEx::MAX_FACE_TYPE * FSUserHdrEx ::MAX_FACE.
FSUserHdrEx::MAX_FACE_TYPE = 5
FSUserHdrEx::MAX_FACE = numOfFace(20) + numOfUpdatedFace(5).
BS_RET_CODE BS_EnrollUserFStationEx(int handle, FSUserHdrEx* hdr,
unsigned char* imageData, unsigned char* faceTemplate)
Parameters
handle
Handle of the communication channel.
Hdr
FSUserHdrEx is defined as follows.
typedef struct{
enum
{
MAX_NAME_LEN
= 48,
MAX_PASSWORD_LEN
= 16,
MIN_PASSWORD_LEN
= 4,
MAX_FACE_TYPE
MAX_FACE
= 5,
= 25,
FACE_TEMPLATE_SIZE = 2000,
MAX_FACE_RAW
= 20,
FACE_RAW_TEMPLATE_SIZE = 37500,
MAX_IMAGE_SIZE = 8*1024,
USER_NORMAL = 0,
USER_ADMIN = 1,
USER_SECURITY_DEFAULT = 0,
USER_SECURITY_LOWER
= 1,
172
USER_SECURITY_LOW = 2,
USER_SECURITY_NORMAL
= 3,
USER_SECURITY_HIGH = 4,
USER_SECURITY_HIGHER
= 5,
};
unsigned ID;
unsigned short headerVersion;
unsigned short adminLevel;
unsigned short securityLevel;
unsigned short statusMask;
unsigned accessGroupMask;
short authMode;
unsigned char bypassCard;
unsigned char disabled;
unsigned cardID;
unsigned customID;
unsigned startDateTime;
unsigned expireDateTime;
} FSUserHdrEx;
typedef struct{
enum{
MAX_FACE
= 25,
MAX_FACE_RAW
= 20,
};
Descriptions
adminLevel
USER_ADMIN
USER_NORMAL
securityLevel
accessGroupMask
173
numOfFace
numOfUpdatedFace
faceLen
faceChecksum
faceUpdatedIndex
faceStillcutLen
faceTemp
authMode
174
175
disabled
cardID
customID
startDateTime
expireDateTime
imageData
Face images which represent the face templates. Maximum 5 face images can
be enrolled per each user.
faceTemplate
Face templates of the user. Maximum 125 templates can be enrolled per each
user.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation, Firmware version 1.2 or later
Example
FSUserHdrEx userHdr;
// initialize header
memset( &userHdr, 0, sizeof( FSUserHdrEx ) );
userHdr.ID = 1; // 0 cannot be assigned as a user ID
userHdr.startDateTime = 0; // no check for start date
userHdr.expireDateTime = 0; // no check for expiry date
userHdr.adminLevel = FSUserHdrEx::USER_NORMAL;
userHdr.securityLevel = FSUserHdrEx::USER_SECURITY_DEFAULT;
userHdr.authMode = BS_AUTH_MODE_DISABLED; // use the authentication mode
// of the device
176
177
178
179
BS_EnrollMultipleUserFStation
Enrolls multiple users to FStation. By combining user information, the enrollment
time will be reduced.
BS_RET_CODE BS_EnrollMultipleUserFStation( int handle, int numOfUser,
FSUserHdr* hdr, unsigned char* faceTemplate)
Parameters
handle
Handle of the communication channel.
numOfUser
Number of users to be enrolled.
hdr
Array of user headers to be enrolled.
faceTemplate
Face templates of the all users.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation, Firmware version less than or equal to 1.1.
Example
int numOfUser = 2;
FSUserHdr hdr1, hdr2;
unsigned char *faceTemplate1, *faceTemplate2;
// fill the header and template data here
//
FSUserHdr* hdr = (FSUserHdr*)malloc( numOfUser * sizeof( FSUserHdr ) );
// header
int nSize1 = 0;
int nSize2 = 0;
180
181
BS_EnrollMultipleUserFStationEx
Enrolls multiple users to FStation. By combining user information, the enrollment
time will be reduced. It support up to 5 face type per a user.
BS_RET_CODE BS_EnrollMultipleUserFStationEx( int handle, int
numOfUser, FSUserHdrEx* hdr, unsigned char* imageData, unsigned
char* faceTemplate)
Parameters
handle
Handle of the communication channel.
numOfUser
Number of users to be enrolled.
hdr
Array of user headers to be enrolled.
imageData
Face images of the all users face templates, which represent each face
templates.
faceTemplate
Face templates of the all users.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation, Firmware version 1.2 or later.
Example
int numOfUser = 2;
//
FSUserHdrEx hdr1, hdr2;
unsigned char *image1, *image2;
unsigned char *faceTemplate1, *faceTemplate2;
182
183
184
BS_GetUserEx
Retrieves the header information and template data of a user from BioStation.
BS_RET_CODE BS_GetUserEx( int handle, unsigned userID, BSUserHdrEx*
hdr, unsigned char* templateData )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
templateData
Pointer to the template data to be returned. This pointer should be
preallocated large enough to store the template data.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
BioStation
BS_GetUserInfoEx
Retrieves the header information of a user from BioStation.
BS_GetUserInfoEx( int handle, unsigned userID, BSUserHdrEx* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
BioStation
185
BS_GetAllUserInfoEx
Retrieves the header information of all enrolled users from BioStation.
186
187
BS_GetUserBEPlus
Retrieves the header information and template data of a user from BioEntry Plus
or BioLite Net.
BS_RET_CODE BS_GetUserBEPlus( int handle, unsigned userID,
BEUserHdr* hdr, unsigned char* templateData )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
templateData
Pointer to the template data to be returned. This pointer should be
preallocated large enough to store the template data.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
BS_GetUserInfoBEPlus
Retrieves the header information of a user from BioEntry Plus or BioLite Net.
BS_RET_CODE BS_GetUserInfoBEPlus( int handle, unsigned userID,
BEUserHdr* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
188
189
BS_GetAllUserInfoBEPlus
Retrieves the header information of all enrolled users from BioEntry Plus or BioLite
Net.
190
BS_GetUserDStation
Retrieves the header information, fingerprint template data and face template data
of a user from D-Station.
BS_RET_CODE BS_GetUserDStation( int handle, unsigned userID,
DSUserHdr* hdr, unsigned char* templateData , unsigned char*
faceTemplate )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
templateData
Pointer to the fingerprint template data to be returned. This pointer should be
preallocated large enough to store the template data.
faceTemplate
Pointer to the face template data to be returned. This pointer should be
preallocated large enough to store the template data.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
D-Station
BS_GetUserFaceInfo
Retrieves the number of enrolled users and face templates.
BS_RET_CODE BS_GetUserFaceInfo( int handle, int* numOfUser, int*
numOfFaceTemplate )
Parameters
handle
Handle of the communication channel.
numOfUser
Pointer to the number of enrolled users.
numOfFaceTemplate
Pointer to the number of enrolled face templates.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station/FaceStation
191
BS_GetUserInfoDStation
Retrieves the header information of a user from D-Station.
BS_RET_CODE BS_GetUserInfoDStation( int handle, unsigned userID,
DSUserHdr* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
D-Station
192
BS_GetAllUserInfoDStation
Retrieves the header information of all enrolled users from D-Station.
193
BS_GetUserXStation
Retrieves the header information of a user from X-Station.
BS_RET_CODE BS_GetUserXStation( int handle, unsigned userID,
XSUserHdr* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
X-Station
194
BS_GetUserInfoXStation
Retrieves the header information of a user from X-Station.
BS_RET_CODE BS_GetUserInfoXStation( int handle, unsigned userID,
XSUserHdr* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
X-Station
195
196
BS_GetAllUserInfoXStation
Retrieves the header information of all enrolled users from X-Station.
197
BS_GetUserBioStation2
Retrieves the header information, fingerprint template data and face template data
of a user from BioStation T2.
BS_RET_CODE BS_GetUserBioStation2( int handle, unsigned userID,
BS2UserHdr* hdr, unsigned char* templateData)
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
templateData
Pointer to the fingerprint template data to be returned. This pointer should be
preallocated large enough to store the template data.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
BioStation T2
198
BS_GetUserInfoDStation
Retrieves the header information of a user from BioStation.T2
BS_RET_CODE BS_GetUserInfoBioStation2( int handle, unsigned userID,
BS2UserHdr* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
BioStation T2
BS_GetAllUserInfoBioStation2
Retrieves the header information of all enrolled users from BioStation.T2
199
BS_GetUserFStation
Retrieves the header information, face template of a user from FaceStation.
BS_RET_CODE BS_GetUserFStation( int handle, unsigned userID,
FSUserHdr* hdr, unsigned char* faceTemplate )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
faceTemplate
Pointer to the face template data to be returned. This pointer should be
preallocated large enough to store the template data.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
FaceStation, Firmware version less than or equal to 1.1.
200
BS_GetUserFStationEx
Retrieves the header information, face template of a user from FaceStation. It
supports FSUserHdrEx.
BS_RET_CODE BS_GetUserFStationEx( int handle, unsigned userID,
FSUserHdrEx* hdr, unsigned char* faceTemplate )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
faceTemplate
Pointer to the face template data to be returned. This pointer should be
preallocated large enough to store the template data.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
FaceStation, Firmware version 1.2 or later.
201
BS_GetUserInfoFStation
Retrieves the header information of a user from FaceStation.
BS_RET_CODE BS_GetUserInfoFStation( int handle, unsigned userID,
FSUserHdr* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
FaceStation, Firmware version less than or equal to 1.1.
202
BS_GetUserInfoFStationEx
Retrieves the header information of a user from FaceStation. It supports
FSUserHdrEx.
BS_RET_CODE BS_GetUserInfoFStationEx( int handle, unsigned userID,
FSUserHdrEx* hdr )
Parameters
handle
Handle of the communication channel.
userID
User ID.
hdr
Pointer to the user header to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
FaceStation, Firmware version 1.2 or later.
203
204
BS_GetAllUserInfoFStation
Retrieves the header information of all enrolled users from FaceStation.
205
BS_GetAllUserInfoFStationEx
Retrieves the header information of all enrolled users from FaceStation. It
supports FSUserHdrEx.
BS_DeleteUser
Deletes a user.
BS_RET_CODE BS_DeleteUser( int handle, unsigned userID )
Parameters
handle
Handle of the communication channel.
userID
ID of the user to be deleted.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
FaceStation/BoStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
206
207
BS_DeleteMultipleUsers
Deletes multiple users.
BS_RET_CODE BS_DeleteMultipleUsers( int handle, int numberOfUser,
unsigned* userID )
Parameters
handle
Handle of the communication channel.
numberOfUser
Number of users to be deleted.
userID
Array of user IDs to be deleted.
Return Values
If the function succeeds, return BS_SUCCESS. If no user is enrolled with the ID,
return BS_ERR_NOT_FOUND. Otherwise, return the corresponding error code.
Compatibility
FaceStation/BoStation T2/D-Station/X-Station/BioStation(V1.5 or later)/BioEntry
Plus(V1.2 or later)/BioEntry W/BioLite Net/Xpass/Xpass Slim
BS_DeleteAllUser
Deletes all enrolled users.
BS_RET_CODE BS_DeleteAllUser( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BoStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
208
209
BS_SetPrivateInfo
Set the private information of the specified user. The private information includes
greeting messages and customized images
BS_RET_CODE BS_SetPrivateInfo(int handle, int type, const
BSPrivateInfo* privateInfo, const char* imagePath )
Parameters
handle
Handle of the communication channel.
privateInfo
BSPrivateInfo is defined as follows.
typedef struct{
unsigned ID;
char department[BS_MAX_NAME_LEN + 1];
char greetingMsg[BS_MAX_PRIVATE_MSG_LEN + 1];
int useImage;
unsigned duration;
unsigned countPerDay;
unsigned imageChecksum;
int reserved[4];
} BSPrivateInfo;
Descriptions
ID
User ID
department
Department name
greetingMsg
useImage
duration
countPerDay
imageChecksum
210
211
BS_GetPrivateInfo
Get the private information of the specified user.
BS_RET_CODE BS_GetPrivateInfo(int handle, BSPrivateInfo* privateInfo )
Parameters
handle
Handle of the communication channel.
privateInfo
Pointer to the private information to be returned.
Return Values
If the function is successful, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
212
BS_GetAllPrivateInfo
Get the private information of all users.
BS_RET_CODE BS_GetAllPrivateInfo( int handle, BSPrivateInfo*
privateInfo, int* numOfUser )
Parameters
handle
Handle of the communication channel.
privateInfo
Pointer to the BSPrivateInfo array to be returned. It should be preallocated
large enough.
numOfUser
Pointer to the number of users having the private information.
Return Values
If the function is successful, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
BS_SetUserImage
Set the customiszed profile image of a user to FaceStation, BoStation T2, DStation or X-Station.
BS_RET_CODE BS_SetUserImage(int handle, int userID, int imageLen,
unsigned char* imageData )
Parameters
handle
Handle of the communication channel.
userID
UserID.
imageLen
Length of the image data.
imageData
The user profile image data .
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BoStation T2/D-Station/X-Station
213
214
BS_GetUserImage
Get the profile image of the specified user from FaceStation, BoStation T2, DStation or X-Staion.
BS_RET_CODE BS_GetUserImage(int handle, int userID, int * imageLen,
unsigned char* imageData )
Parameters
handle
Handle of the communication channel.
userID
UserID.
imageLen
Pointer to the length of enrolled user image to be returned.
imageData
Pointer to the profile image data to be returned.
Return Values
If the function is successful, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BoStation T2/D-Station/X-Station
215
BS_ScanTemplate
Scans a fingerprint on a BioStation T2, D-Station, BioStation, BioEntry Plus, or
BioLite Net and retrieves the template of it. This function is useful when the device
is used as an enroll station. If it called on D-Station, the left scan is used.
BS_RET_CODE BS_ScanTemplate( int handle, unsigned char*
templateData )
Parameters
handle
Handle of the communication channel.
templateData
Pointer to the 384 byte template data to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BoStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite Net
216
BS_ScanTemplateEx
Scans a fingerprint with selected sensor on a D-Station and retrieves the template
of it. This function is useful when the device is used as an enroll station.
BS_RET_CODE BS_ScanTemplateEx( int handle, int sensorID, int unsigned
char* templateData )
Parameters
handle
Handle of the communication channel.
sensorID
Index of sensor ID between two sensor. The value 0 is lefte sensor and 1 is the
right one.
templateData
Pointer to the 384 byte template data to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
BS_ReadFaceData
Captures
a user face on a D-Station camera and retrieves the face image and
face template of it. This function is useful when the device is used as an enroll
station.
BS_RET_CODE BS_ReadFaceData( int handle, int imageLen, unsigned
char* imageData, unsigned char* faceTemplate )
Parameters
handle
Handle of the communication channel.
imageLen
Pointer to the length of captured face image to be returned.
imageData
Pointer to the face image data to be returned.
faceTemplate
Pointer to the 2284 byte face template data to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
217
218
BS_ScanFaceTemplate
Captures
a user face on a FaceStation camera and retrieves the face image and
face template of it. This function is useful when the device is used as an enroll
station.
BS_RET_CODE BS_ScanFaceTemplate( int handle, FSUserTemplateHdr*
userTemplateHdr, unsigned char* imageData, unsigned char*
faceTemplate )
Parameters
handle
Handle of the communication channel.
userTemplateHdr
Pointer to the FSUserTemplateHdr to be returned.
imageData
Pointer to the face image data to be returned.
faceTemplate
Pointer to the face template data to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
219
BS_ReadCardIDEx
Read a card on a FaceStation, BioStation T2, D-Station, BioStation, BioEntry Plus,
BioLite Net, X-Station, Xpass or Xpass Slim and retrieve the ID of it.
This function is useful when the device is used as an enrollment station.
BS_RET_CODE BS_ReadCardIDEx( int handle, unsigned int* cardID, int*
customID )
Parameters
handle
Handle of the communication channel.
cardID
Pointer to the 4 byte card ID to be returned.
customID
Pointer to the 1 byte custom ID to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
220
BS_ReadRFCardIDEx
Read a card and retrieve the ID of it on a 3rd party RF device attached toaceStation,
BioStation T2, D-Station, X-Stationm BioStation, BioEntry Plus, BioEntry W, BioLite
Net, Xpass or Xpass Slim via Wiegand I/F. This function only works when the
FaceStation, BioStation T2, D-Station, X-Station, BioStation, BioEntry Plus,
BioEntry W, BioLite Net, Xpass or Xpass Slim is configured as extended Wiegand
mode and an appropriate ID is assigned to that RF device.
This function is useful when the RF device is used as an enrollment station.
Refer to 2.2.4 for configuration of extended Wiegand mode.
BS_RET_CODE BS_ReadRFCardIDEx( int handle, unsigned readerID,
unsigned int* cardID, int* customID )
Parameters
handle
Handle of the communication channel.
readerID
Pre-assigned ID of attached 3rd party RF device
cardID
Pointer to the 4 byte card ID to be returned.
customID
Pointer to the 1 byte custom ID to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
221
BS_ReadImage
Reads an image of the last scanned fingerprint. This function is useful when the
device is used as an enroll station.
BS_RET_CODE BS_ReadImage( int handle, int imageType, unsigned char*
bitmapImage, int* imageLen )
Parameters
handle
Handle of the communication channel.
imageType
This field plays different roles depending on the device type. For BioStation, it
specifies the image type as follows;
0 - binary image, 1 - gray image.
For BioEntry Plus or BioLite Net, it specifies whether to scan new image or not.
If it is 0xff, BioEntry Plus or BioLite Net returns the last scanned image in gray
format. Otherwise, it waits for new fingerprint scan and returns the image of it
in gray format.
bitmapImage
Pointer to the image data to be returned. The bimtmapImage should be
allocated before calling this function.
imageLen
Pointer to the length of the image data to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite Net
222
BS_ReadImageEx
Reads an image of the last scanned fingerprint by sensor index. This function is
useful when the device is used as an enroll station for the two sensor device as
D-Station.
BS_RET_CODE BS_ReadImageEx( int handle, int imageType, int index,
unsigned char* bitmapImage, int* imageLen )
Parameters
handle
Handle of the communication channel.
imageType
This field plays different roles depending on the device type. For BioStation, it
specifies the image type as follows;
0 - binary image, 1 - gray image.
For BioEntry Plus or BioLite Net, it specifies whether to scan new image or not.
If it is 0xff, BioEntry Plus or BioLite Net returns the last scanned image in gray
format. Otherwise, it waits for new fingerprint scan and returns the image of it
in gray format.
index
Index of the sensor for two sensor Device as D-Station. The value 0 is left
sensor, 1 is right one.
bitmapImage
Pointer to the image data to be returned. The bimtmapImage should be
allocated before calling this function.
imageLen
Pointer to the length of the image data to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Copyright 2013 by Suprema Inc.
3.7.
223
Configuration API
BS_ReadDisplayConfig
BS_ReadDSDisplayConfig
BS_ReadXSDisplayConfig
BS_ReadBS2DisplayConfig
BS_ReadFSDisplayConfig
BS_ReadOPModeConfig
BS_ReadDSOPModeConfig
BS_ReadXSOPModeConfig
BS_ReadBS2OPModeConfig
BS_ReadFSOPModeConfig
BS_ReadTnaEventConfig
BS_ReadTnaEventExConfig
BS_ReadDSTnaEventConfig
BS_ReadDSTnaEventExConfig
BS_ReadXSTnaEventConfig
BS_ReadXSTnaEventExConfig
BS_ReadBS2TnaEventConfig
BS_ReadBS2TnaEventExConfig
BS_ReadFSTnaEventConfig
BS_ReadFSTnaEventExConfig
BS_ReadIPConfig
BS_ReadWLANConfig
BS_ReadDSWLANConfig
BS_ReadBS2WLANConfig
224
225
BS_ReadFSWLANConfig
BS_ReadFingerprintConfig
BS_ReadDSFingerprintConfig
BS_ReadBS2FingerprintConfig
BS_ReadIOConfig
BS_ReadSerialConfig
BS_ReadDSSerialConfig
BS_ReadXSSerialConfig
BS_ReadBS2SerialConfig
BS_ReadFSSerialConfig
BS_Read485NetworkConfig
BS_ReadDS485NetworkConfig
BS_ReadXS485NetworkConfig
BS_ReadBS2485NetworkConfig
BS_ReadFS485NetworkConfig
226
BS_ReadUSBConfig
BS_ReadBS2USBConfig
BS_ReadFSUSBConfig
BS_ReadEncryptionConfig
BS_ReadWiegandConfig
BS_ReadDSWiegandConfig
BS_ReadXSWiegandConfig
BS_ReadBS2WiegandConfig
BS_ReadFSWiegandConfig
BS_ReadZoneConfigEx
BS_ReadCardReaderZoneConfig
BS_ReadDoorConfig
BS_ReadInputConfig
BS_ReadDSInputConfig
BS_ReadXSInputConfig
BS_ReadBS2InputConfig
BS_ReadFSInputConfig
227
BS_ReadOutputConfig
BS_ReadEntranceLimitConfig
BS_ReadDSSaveImageEventConfig
BS_ReadXSSaveImageEventConfig
BS_ReadBS2SaveImageEventConfig
BS_ReadFSSaveImageEventConfig
BS_ReadDSFaceConfig
BS_ReadFSFaceConfig
BS_ReadConfig
BS_ReadCardReaderConfig
BS_ReadBS2InterphoneConfig
BS_ReadFSInterphoneConfig
BS_ReadVideoPhoneConfig.
228
BS_ReadSysInfoConfig
Reads the system information of D-Station / BioStation.
BS_RET_CODE BS_ReadSysInfoConfig( int handle, BSSysInfoConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSSysInfoConfig is defined as follows;
typedef struct {
unsigned ID;
char macAddr[32];
char productName[32];
char boardVer[16];
char firmwareVer[16];
char blackfinVer[16];
char kernelVer[16];
int language;
char reserved[32];
} BSSysInfoConfig;
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
229
230
BS_WriteDisplayConfig/BS_ReadDisplayConfig
Write/read the display configurations.
BS_RET_CODE BS_WriteDisplayConfig( int handle, BSDisplayConfig*
config )
BS_RET_CODE BS_ReadDisplayConfig( int handle, BSDisplayConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSDisplayConfig is defined as follows;
typedef struct {
int language;
int background;
int bottomInfo;
int reserved1;
int timeout; // menu timeout in seconds, 0 for infinite
int volume; // 0(mute) ~ 100
int msgTimeout;
int usePrivateAuth; // private authentication : 1 use, 0 dont use
int dateType;
int disableAuthResult;
int reserved2[6];
} BSDisplayConfig;
Options
language
BS_UI_LANG_KOREAN
BS_UI_LANG_ENGLISH
BS_UI_LANG_CUSTOM
background
bottomInfo
msgTimeout
BS_UI_DATE_TYPE_AM DD/MM
BS_UI_DATE_TYPE_EU MM/DD
disableAuthResult
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
Example
BSDisplayConfig dispConfig;
BS_RET_CODE result = BS_ReadDisplayConfig( handle, &dispConfig );
// modify the configuration if necessary
result = BS_Disable( handle, 10 ); // communication-only mode
if( result == BS_SUCCESS )
{
result = BS_WriteDisplayConfig( handle, &dispConfig );
}
BS_Enable( handle );
231
BS_WriteDSDisplayConfig/BS_ReadDSDisplayConfig
Write/read the display configurations.
BS_RET_CODE BS_WriteDSDisplayConfig( int handle, DSDisplayConfig*
config )
BS_RET_CODE BS_ReadDSDisplayConfig( int handle, DSDisplayConfig*
config )
Parameters
handle
Handle of the communication channel.
config
DSDisplayConfig is defined as follows;
typedef struct {
enum
{
// background
BG_LOGO = 0,
BG_NOTICE = 1,
BG_PICTURE = 2,
// timeout
TIMEOUT_INDEFINITE = 0,
// date type
DATE_TYPE_AM = 0,
DATE_TYPE_EU = 1,
};
int background;
int theme;
int timeout;
int volume;
int msgTimeout;
int dateType;
int backlightTimeout;
unsigned char timeFormat;
unsigned char reserved[78];
} DSDisplayConfig;
Options
232
theme
timeout
volume
msgTimeout
dateType
BS_UI_DATE_TYPE_AM DD/MM
BS_UI_DATE_TYPE_EU MM/DD
backlightTimeout
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Example
DSDisplayConfig dispConfig;
BS_RET_CODE result = BS_ReadDSDisplayConfig( handle, &dispConfig );
// modify the configuration if necessary
result = BS_Disable( handle, 10 ); // communication-only mode
233
234
BS_WriteXSDisplayConfig/BS_ReadXSDisplayConfig
Write/read the display configurations.
BS_RET_CODE BS_WriteXSDisplayConfig( int handle, XSDisplayConfig*
config )
BS_RET_CODE BS_ReadXSDisplayConfig( int handle, XSDisplayConfig*
config )
Parameters
handle
Handle of the communication channel.
config
XSDisplayConfig is defined as follows;
typedef struct {
enum
{
//language
KOREAN = 0,
ENGLISH = 1,
CUSTOM = 2,
//background
BG_LOGO = 0,
BG_NOTICE = 1,
BG_SLIDE = 2,
//bgTheme
BG_THEME_01 = 0,
BG_THEME_02 = 1,
//timeout
TIMEOUT_INDEFINITE = 0,
//dateType
DATE_TYPE_AM = 0,
DATE_TYPE_EU = 1,
//displayDateTime
NOT_USE = 0,
USE = 1,
};
235
Options
Language
background
timeout
volume
msgTimeout
dateType
BS_UI_DATE_TYPE_AM DD/MM
BS_UI_DATE_TYPE_EU MM/DD
backlightTimeout
bgTheme
displayDateTime
Return Values
Copyright 2013 by Suprema Inc.
236
237
238
BS_WriteBS2DisplayConfig/BS_ReadBS2DisplayConfig
Write/read the display configurations.
BS_RET_CODE BS_WriteBS2DisplayConfig( int handle, BS2DisplayConfig*
config )
BS_RET_CODE BS_ReadBS2DisplayConfig( int handle, BS2DisplayConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BS2DisplayConfig is defined as follows;
typedef struct {
enum
{
//language
KOREAN = 0,
ENGLISH = 1,
CUSTOM = 2,
//background
BG_LOGO = 0,
BG_NOTICE = 1,
BG_PDF = 2,
//bgTheme
BG_THEME_01 = 0,
BG_THEME_02 = 1,
BG_THEME_03 = 2,
BG_THEME_04 = 3,
//timeout
TIMEOUT_INDEFINITE = 0,
//dateType
DATE_TYPE_AM = 0,
DATE_TYPE_EU = 1,
//displayDateTime
NOT_USE = 0,
Options
Language
background
timeout
volume
msgTimeout
dateType
BS_UI_DATE_TYPE_AM DD/MM
BS_UI_DATE_TYPE_EU MM/DD
backlightTimeout
bgTheme
239
useVoice
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
Example
BS2DisplayConfig dispConfig;
BS_RET_CODE result = BS_ReadBS2DisplayConfig( handle, &dispConfig );
// modify the configuration if necessary
result = BS_Disable( handle, 10 ); // communication-only mode
if( result == BS_SUCCESS )
{
result = BS_WriteBS2DisplayConfig( handle, &dispConfig );
}
BS_Enable( handle );
240
BS_WriteFSDisplayConfig/BS_ReadFSDisplayConfig
Write/read the display configurations.
BS_RET_CODE BS_WriteFSDisplayConfig( int handle, FSDisplayConfig*
config )
BS_RET_CODE BS_ReadFSDisplayConfig( int handle, FSDisplayConfig*
config )
Parameters
handle
Handle of the communication channel.
config
FSDisplayConfig is defined as follows;
typedef struct {
enum
{
//language
KOREAN = 0,
ENGLISH = 1,
CUSTOM = 2,
//background
BG_LOGO = 0,
BG_NOTICE = 1,
BG_PDF = 2,
//bgTheme
BG_THEME_01 = 0,
BG_THEME_02 = 1,
BG_THEME_03 = 2,
BG_THEME_04 = 3,
//timeout
TIMEOUT_INDEFINITE = 0,
//dateType
DATE_TYPE_AM = 0,
DATE_TYPE_EU = 1,
//displayDateTime
NOT_USE = 0,
241
Options
Language
background
timeout
volume
msgTimeout
dateType
BS_UI_DATE_TYPE_AM DD/MM
BS_UI_DATE_TYPE_EU MM/DD
backlightTimeout
bgTheme
242
useVoice
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
Example
FS2DisplayConfig dispConfig;
BS_RET_CODE result = BS_ReadFSDisplayConfig( handle, &dispConfig );
// modify the configuration if necessary
result = BS_Disable( handle, 10 ); // communication-only mode
if( result == BS_SUCCESS )
{
result = BS_WriteFSDisplayConfig( handle, &dispConfig );
}
BS_Enable( handle );
243
BS_WriteOPModeConfig/BS_ReadOPModeConfig
Write/read the operation mode configurations.
BS_RET_CODE BS_WriteOPModeConfig( int handle, BSOPModeConfig*
config )
BS_RET_CODE BS_ReadOPModeConfig( int handle, BSOPModeConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSOPModeConfig is defined as follows;
typedef struct {
int authMode;
int identificationMode;
int tnaMode;
unsigned short tnaChange;
unsigned char useWiegandCardBypass; // 1 - use, 0 - not use
unsigned char dualModeOption; //1 - use, 0 - not use
unsigned char authSchedule[MAX_AUTH_COUNT];
unsigned char identificationSchedule;
unsigned char dualMode;
unsigned char dualSchedule;
unsigned char version;
unsigned short cardMode;
unsigned char useFastIDMatching;
unsigned char cardIdFormatType;
unsigned char authScheduleEx[MAX_AUTH_EX_COUNT];
unsigned char usePrivateAuthMode;
unsigned char cardIdByteOrder;
unsigned char cardIdBitOrder;
} BSOPModeConfig;
Options
authMode
244
245
BS_1TON_DISABLE identification is
disabled.
tnaMode
tnaChange
authSchedule
identificationSchedule
dualSchedule
version
cardMode
useFastIDMatching
authScheduleEx
The schedule of
BS_AUTH_FINGER_N_PASSWORD.
usePrivateAuthMode
cardIdByteOrder
cardIdBitOrder
246
247
248
BS_WriteDSOPModeConfig/BS_ReadDSOPModeConfig
Write/read the operation mode configurations.
BS_RET_CODE BS_WriteDSOPModeConfig( int handle, DSOPModeConfig*
config )
BS_RET_CODE BS_ReadDSOPModeConfig( int handle, DSOPModeConfig*
config )
Parameters
handle
Handle of the communication channel.
config
DSOPModeConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
USE = 1,
//Auth Schedule
DS_PRIVATE_AUTH_DISABLE = -1,
DS_MAX_AUTH_COUNT = 5,
DS_FINGER_INDEX = 0,
DS_PIN_INDEX = 1,
DS_FINGER_PIN_INDEX = 2,
DS_CARD_INDEX = 3,
DS_FINGER_N_PIN_INDEX = 4,
//identificationMode
IDENTIFY_DISABLE = 0,
IDENTIFY_FREESCAN = 1,
IDENTIFY_BUTTON = 2,
//tnaMode
TNA_DISABLE = 0,
TNA_FUNCTION_KEY = 1,
TNA_AUTO_CHANGE = 2,
TNA_MANUAL_CHANGE = 3,
TNA_FIXED = 4,
// cardMode
CARD_DISABLE = 0,
249
CARD_CSN = 1,
CARD_TEMPLATE = 2,
//cardIdFormatType
CARD_ID_FORMAT_NORMAL = 0,
CARD_ID_FORMAT_WIEGAND = 1,
// cardIdByteOrder, cardIdBitOrder
CARD_ID_MSB = 0,
CARD_ID_LSB = 1,
// enhancedMode
FUSION_NOT_USE = 0,
FUSION_FINGER_FINGER = 1,
FUSION_FINGER_FACE = 2,
};
unsigned char identificationMode;
unsigned char tnaMode;
unsigned char cardMode;
unsigned char authSchedule[DS_MAX_AUTH_COUNT];
unsigned char identificationSchedule;
unsigned char dualSchedule;
unsigned char usePrivateAuthMode;
unsigned char cardIdFormatType;
unsigned char cardIdByteOrder;
unsigned char cardIdBitOrder;
unsigned char enhancedMode;
unsigned char fusionType;
unsigned char fusionTimeout;
unsigned char useDetectFace;
unsigned char useWiegandCardBypass; // 1 - use, 0 - not use
unsigned char dualModeOption; //1 - use, 0 - not use
unsigned char reserved[80];
} DSOPModeConfig;
Options
identificationMode
IDENTIFY_DISABLE identification is
disabled.
Copyright 2013 by Suprema Inc.
cardMode
authSchedule
identificationSchedule
dualSchedule
usePrivateAuthMode
cardIdFormatType
cardIdByteOrder
250
cardIdBitOrder
enhancedMode
fusionType
fusionTimeout
useDetectFace
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
251
252
BS_WriteXSOPModeConfig/BS_ReadXSOPModeConfig
Write/read the operation mode configurations.
BS_RET_CODE BS_WriteXSOPModeConfig( int handle, XSOPModeConfig*
config )
BS_RET_CODE BS_ReadXSOPModeConfig( int handle, XSOPModeConfig*
config )
Parameters
handle
Handle of the communication channel.
config
XSOPModeConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
USE = 1,
//Auth Schedule
DS_MAX_AUTH_COUNT = 2,
AUTH_DISABLE = -1,
DS_CARD_INDEX = 0, //card bypass
DS_PIN_INDEX = 1, //card + pin
//tnaMode
TNA_DISABLE = 0,
TNA_FUNCTION_KEY = 1,
TNA_AUTO_CHANGE = 2,
TNA_MANUAL_CHANGE = 3,
TNA_FIXED = 4,
// cardMode
CARD_DISABLE = 0,
CARD_CSN = 1,
CARD_DATA = 2,
//cardIdFormatType
CARD_ID_FORMAT_NORMAL = 0,
CARD_ID_FORMAT_WIEGAND = 1,
253
// cardIdByteOrder, cardIdBitOrder
CARD_ID_MSB = 0,
CARD_ID_LSB = 1,
};
unsigned char reserved1;
unsigned char tnaMode;
unsigned char cardMode;
unsigned char authSchedule[MAX_AUTH_COUNT];
unsigned char reserved2[4];
unsigned char dualSchedule;
unsigned char usePrivateAuthMode;
nsigned char cardIdFormatType;
unsigned char cardIdByteOrder;
unsigned char cardIdBitOrder;
nsigned char reserved3[3];
unsigned char useDetectFace;
unsigned char useServerMatching;
unsigned char matchTimeout;
unsigned char useWiegandCardBypass; // 1 - use, 0 - not use
unsigned char dualModeOption;
Options
tnaMode
cardMode
authSchedule
dualSchedule
usePrivateAuthMode
cardIdByteOrder
cardIdBitOrder
useDetectFace
userServerMatching
matchTimeout
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
Copyright 2013 by Suprema Inc.
254
255
BS_WriteBS2OPModeConfig/BS_ReadBS2OPModeConfig
Write/read the operation mode configurations.
BS_RET_CODE BS_WriteBS2OPModeConfig( int handle,
BS2OPModeConfig* config )
BS_RET_CODE BS_ReadBS2OPModeConfig( int handle,
BS2OPModeConfig* config )
Parameters
handle
Handle of the communication channel.
config
BS2OPModeConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
USE = 1,
//Auth Type
AUTH_TYPE_FINGER = 0,
AUTH_TYPE_CARD = 1,
AUTH_TYPE_ID = 2,
//Auth Schedule
FINGER_AUTH_COUNT = 4,
CARD_AUTH_COUNT = 5,
ID_AUTH_COUNT = 4,
AUTH_FINGER_ONLY = 0,
AUTH_FINGER_PIN = 1,
AUTH_KEY_FINGER = 2,
AUTH_KEY_FINGER_PIN = 3,
AUTH_CARD_ONLY = 0,
AUTH_CARD_PIN = 1,
AUTH_CARD_FINGER = 2,
AUTH_CARD_FINGER_PIN = 3,
AUTH_CARD_FINGER_N_PIN = 4,
AUTH_ID_PIN = 0,
AUTH_ID_FINGER = 1,
256
257
Options
fingerAuthSchedule
cardAuthSchedule
idAuthSchedule
258
cardMode
dualSchedule
usePrivateAuthMode
cardIdFormatType
cardIdByteOrder
cardIdBitOrder
259
userServerMatching
matchTimeout
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
260
261
BS_WriteFSOPModeConfig/BS_ReadFSOPModeConfig
Write/read the operation mode configurations.
BS_RET_CODE BS_WriteFSOPModeConfig( int handle, FSOPModeConfig*
config )
BS_RET_CODE BS_ReadFSOPModeConfig( int handle, FSOPModeConfig*
config )
Parameters
handle
Handle of the communication channel.
config
FSOPModeConfig is defined as follows;
typedef struct{
enum{
NOT_USE = 0,
USE = 1,
AUTH_TYPE_FACE = 0,
AUTH_TYPE_CARD = 1,
AUTH_TYPE_ID = 2,
AUTH_DISABLE = -1,
//Auth Schedule
FACE_AUTH_COUNT = 6,
CARD_AUTH_COUNT = 5,
ID_AUTH_COUNT = 4,
AUTH_FACE_ONLY = 0,
AUTH_FACE_PIN = 1,
AUTH_KEY_FACE = 2,
AUTH_KEY_FACE_PIN = 3,
AUTH_FACE_KEY = 4,
AUTH_FACE_PIN_KEY = 5,
AUTH_CARD_ONLY = 0,
AUTH_CARD_PIN = 1,
AUTH_CARD_FACE = 2,
AUTH_CARD_FACE_PIN = 3,
AUTH_CARD_FACE_N_PIN = 4,
AUTH_ID_PIN = 0,
AUTH_ID_FACE = 1,
AUTH_ID_FACE_PIN = 2,
AUTH_ID_FACE_N_PIN= 3,
//Private Auth
PAUTH_FACE_ONLY = 0,
PAUTH_FACE_PIN = 1,
PAUTH_CARD_ONLY = 2,
PAUTH_CARD_PIN = 3,
PAUTH_CARD_FACE = 4,
PAUTH_CARD_FACE_PIN = 5,
PAUTH_CARD_FACE_N_PIN = 6,
PAUTH_ID_PIN = 7,
PAUTH_ID_FACE = 8,
PAUTH_ID_FACE_PIN = 9,
PAUTH_ID_FACE_N_PIN = 10,
PAUTH_FACE_KEY = 11,
PAUTH_FACE_PIN_KEY = 12,
//tnaMode
TNA_DISABLE = 0,
TNA_FUNCTION_KEY = 1,
TNA_AUTO_CHANGE = 2,
TNA_MANUAL_CHANGE = 3,
TNA_FIXED = 4,
// cardMode
CARD_DISABLE = 0,
262
//cardIdFormatType
CARD_ID_FORMAT_NORMAL = 0,
CARD_ID_FORMAT_WIEGAND = 1,
// cardIdByteOrder, cardIdBitOrder
CARD_ID_MSB = 0,
CARD_ID_LSB = 1,
};
Options
faceAuthSchedule
263
idAuthSchedule
tnaMode
cardMode
dualSchedule
usePrivateAuthMode
264
cardIdFormatType
cardIdByteOrder
cardIdBitOrder
useDetectFace
userServerMatching
matchTimeout
265
266
267
BS_WriteTnaEventConfig/BS_ReadTnaEventConfig
Writes/reads the TNA event configurations.
BS_RET_CODE BS_WriteTnaEventConfig( int handle, BSTnaEventConfig*
config )
BS_RET_CODE BS_ReadTnaEventConfig( int handle, BSTnaEventConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSTnaEventConfig is defined as follows;
#define BS_TNA_F1
#define BS_TNA_F2
#define BS_TNA_F3
#define BS_TNA_F4
#define BS_TNA_1
#define BS_TNA_2
#define BS_TNA_3
#define BS_TNA_4
#define BS_TNA_5
#define BS_TNA_6
#define BS_TNA_7
10
#define BS_TNA_8
11
#define BS_TNA_9
12
#define BS_TNA_CALL 13
#define BS_TNA_0
14
#define BS_TNA_ESC 15
#define BS_MAX_TNA_FUNCTION_KEY 16
typedef struct {
unsigned char enabled[BS_MAX_TNA_FUNCTION_KEY];
unsigned char useRelay[BS_MAX_TNA_FUNCTION_KEY];
unsigned short reserved[BS_MAX_TNA_FUNCTION_KEY];
char eventStr[BS_MAX_TNA_FUNCTION_KEY][BS_MAX_TNA_EVENT_LEN];
} BSTnaEventConfig;
Options
useRelay
eventStr
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
Example
BSTnaEventConfig tnaConfig;
tnaConfig.enabled[BS_TNA_F1] = true;
tnaConfig.useRelay[BS_TNA_F1] = true;
strcpy( tnaConfig.eventStr[BS_TNA_F1], In );
tnaConfig.enabled[BS_TNA_F2] = true;
tnaConfig.useRelay[BS_TNA_F2] = false;
strcpy( tnaConfig.eventStr[BS_TNA_F2], Out );
268
BS_WriteTnaEventExConfig/BS_ReadTnaEventExConfig
Writes/reads the TNA mode configurations. Refer to BS_WriteTnaEventConfig
for the related settings.
BS_RET_CODE BS_WriteTnaEventExConfig( int handle,
BSTnaEventExConfig* config )
BS_RET_CODE BS_ReadTnaEventExConfig( int handle,
BSTnaEventExConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSTnaEventExConfig is defined as follows;
typedef struct {
int fixedTnaIndex;
int manualTnaIndex;
int timeSchedule[BS_MAX_TNA_FUNCTION_KEY];
} BSTnaEventExConfig;
Options
fixedTnaIndex
manualTnaIndex
timeSchedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
269
BS_WriteDSTnaEventConfig/BS_ReadDSTnaEventConfig
Writes/reads the TNA event configurations.
BS_RET_CODE BS_WriteDSTnaEventConfig( int handle,
DSTnaEventConfig* config )
BS_RET_CODE BS_ReadDSTnaEventConfig( int handle,
DSTnaEventConfig* config )
Parameters
handle
Handle of the communication channel.
config
DSTnaEventConfig is defined as follows;
#define BS_TNA_F1
#define BS_TNA_F2
#define BS_TNA_F3
#define BS_TNA_F4
#define BS_TNA_1
#define BS_TNA_2
#define BS_TNA_3
#define BS_TNA_4
#define BS_TNA_5
#define BS_TNA_6
#define BS_TNA_7
10
#define BS_TNA_8
11
#define BS_TNA_9
12
#define BS_TNA_CALL 13
#define BS_TNA_0
14
#define BS_TNA_ESC 15
#define BS_MAX_TNA_FUNCTION_KEY 16
typedef struct {
unsigned char enabled[BS_MAX_TNA_FUNCTION_KEY];
unsigned char useRelay[BS_MAX_TNA_FUNCTION_KEY];
unsigned short reserved[BS_MAX_TNA_FUNCTION_KEY];
char eventStr[BS_MAX_TNA_FUNCTION_KEY][BS_MAX_TNA_EVENT_LEN];
} DSTnaEventConfig;
Options
270
useRelay
eventStr
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Example
DSTnaEventConfig tnaConfig;
tnaConfig.enabled[BS_TNA_F1] = true;
tnaConfig.useRelay[BS_TNA_F1] = true;
strcpy( tnaConfig.eventStr[BS_TNA_F1], In );
tnaConfig.enabled[BS_TNA_F2] = true;
tnaConfig.useRelay[BS_TNA_F2] = false;
strcpy( tnaConfig.eventStr[BS_TNA_F2], Out );
271
BS_WriteDSTnaEventExConfig/BS_ReadDSTnaEventExConfig
Writes/reads the TNA mode configurations. Refer to
BS_WriteDSTnaEventConfig for the related settings.
BS_RET_CODE BS_WriteDSTnaEventExConfig( int handle,
DSTnaEventExConfig* config )
BS_RET_CODE BS_ReadDSTnaEventExConfig( int handle,
DSTnaEventExConfig* config )
Parameters
handle
Handle of the communication channel.
config
DSTnaEventExConfig is defined as follows;
typedef struct {
unsigned char fixedTnaIndex;
unsigned char leftFixedTnaIndex;
unsigned char rightFixedTnaIndex;
unsigned char reserved[1];
unsigned char manulTnaIndex;
unsigned char reserved2[3];
int timeSchedule[BS_MAX_TNA_FUNCTION_KEY];
} DSTnaEventExConfig;
Options
fixedTnaIndex
leftFixedTnaIndex
rightFixedTnaIndex
manualTnaIndex
timeSchedule
272
273
BS_WriteXSTnaEventConfig/BS_ReadXSTnaEventConfig
Writes/reads the TNA event configurations.
BS_RET_CODE BS_WriteXSTnaEventConfig( int handle,
XSTnaEventConfig* config )
BS_RET_CODE BS_ReadXSTnaEventConfig( int handle,
XSTnaEventConfig* config )
Parameters
handle
Handle of the communication channel.
config
XSTnaEventConfig is defined as follows;
#define BS_TNA_F1
#define BS_TNA_F2
#define BS_TNA_F3
#define BS_TNA_F4
#define BS_TNA_1
#define BS_TNA_2
#define BS_TNA_3
#define BS_TNA_4
#define BS_TNA_5
#define BS_TNA_6
#define BS_TNA_7
10
#define BS_TNA_8
11
#define BS_TNA_9
12
#define BS_TNA_CALL 13
#define BS_TNA_0
14
#define BS_TNA_ESC 15
#define BS_MAX_TNA_FUNCTION_KEY 16
typedef struct {
unsigned char enabled[BS_MAX_TNA_FUNCTION_KEY];
unsigned char useRelay[BS_MAX_TNA_FUNCTION_KEY];
unsigned short reserved[BS_MAX_TNA_FUNCTION_KEY];
char eventStr[BS_MAX_TNA_FUNCTION_KEY][BS_MAX_TNA_EVENT_LEN];
} XSTnaEventConfig;
Options
274
useRelay
eventStr
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
Example
XSTnaEventConfig tnaConfig;
tnaConfig.enabled[BS_TNA_F1] = true;
tnaConfig.useRelay[BS_TNA_F1] = true;
strcpy( tnaConfig.eventStr[BS_TNA_F1], In );
tnaConfig.enabled[BS_TNA_F2] = true;
tnaConfig.useRelay[BS_TNA_F2] = false;
strcpy( tnaConfig.eventStr[BS_TNA_F2], Out );
275
276
BS_WriteXSTnaEventExConfig/BS_ReadXSTnaEventExConfig
Writes/reads the TNA mode configurations. Refer to BS_WriteXSTnaEventConfig
for the related settings.
BS_RET_CODE BS_WriteXSTnaEventExConfig( int handle,
XSTnaEventExConfig* config )
BS_RET_CODE BS_ReadXSTnaEventExConfig( int handle,
XSTnaEventExConfig* config )
Parameters
handle
Handle of the communication channel.
config
XSTnaEventExConfig is defined as follows;
typedef struct {
unsigned char fixedTnaIndex;
unsigned char reserved[3];
unsigned char manulTnaIndex;
unsigned char reserved2[3];
int timeSchedule[BS_MAX_TNA_FUNCTION_KEY];
} XSTnaEventExConfig;
Options
fixedTnaIndex
manualTnaIndex
timeSchedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
Copyright 2013 by Suprema Inc.
BS_WriteBS2TnaEventConfig/BS_ReadBS2TnaEventConfig
Writes/reads the TNA event configurations.
BS_RET_CODE BS_WriteBS2TnaEventConfig( int handle,
BS2TnaEventConfig* config )
BS_RET_CODE BS_ReadBS2TnaEventConfig( int handle,
BS2TnaEventConfig* config )
Parameters
handle
Handle of the communication channel.
config
BS2TnaEventConfig is defined as follows;
#define BS_TNA_F1
#define BS_TNA_F2
#define BS_TNA_F3
#define BS_TNA_F4
#define BS_TNA_1
#define BS_TNA_2
#define BS_TNA_3
#define BS_TNA_4
#define BS_TNA_5
#define BS_TNA_6
#define BS_TNA_7
10
#define BS_TNA_8
11
#define BS_TNA_9
12
#define BS_TNA_CALL 13
#define BS_TNA_0
14
#define BS_TNA_ESC 15
#define BS_MAX_TNA_FUNCTION_KEY 16
typedef struct {
unsigned char enabled[BS_MAX_TNA_FUNCTION_KEY];
unsigned char useRelay[BS_MAX_TNA_FUNCTION_KEY];
unsigned short reserved[BS_MAX_TNA_FUNCTION_KEY];
char eventStr[BS_MAX_TNA_FUNCTION_KEY][BS_MAX_TNA_EVENT_LEN];
} BS2TnaEventConfig;
Options
277
useRelay
eventStr
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
Example
BS2TnaEventConfig tnaConfig;
tnaConfig.enabled[BS_TNA_F1] = true;
tnaConfig.useRelay[BS_TNA_F1] = true;
strcpy( tnaConfig.eventStr[BS_TNA_F1], In );
tnaConfig.enabled[BS_TNA_F2] = true;
tnaConfig.useRelay[BS_TNA_F2] = false;
strcpy( tnaConfig.eventStr[BS_TNA_F2], Out );
278
BS_WriteFSTnaEventConfig/BS_ReadFSTnaEventConfig
Writes/reads the TNA event configurations.
BS_RET_CODE BS_WriteFSTnaEventConfig( int handle,
FSTnaEventConfig* config )
BS_RET_CODE BS_ReadFSTnaEventConfig( int handle,
FSTnaEventConfig* config )
Parameters
handle
Handle of the communication channel.
config
FSTnaEventConfig is defined as follows;
#define BS_TNA_F1
#define BS_TNA_F2
#define BS_TNA_F3
#define BS_TNA_F4
#define BS_TNA_1
#define BS_TNA_2
#define BS_TNA_3
#define BS_TNA_4
#define BS_TNA_5
#define BS_TNA_6
#define BS_TNA_7
10
#define BS_TNA_8
11
#define BS_TNA_9
12
#define BS_TNA_CALL 13
#define BS_TNA_0
14
#define BS_TNA_ESC 15
#define BS_MAX_TNA_FUNCTION_KEY 16
typedef struct {
unsigned char enabled[BS_MAX_TNA_FUNCTION_KEY];
unsigned char useRelay[BS_MAX_TNA_FUNCTION_KEY];
unsigned short reserved[BS_MAX_TNA_FUNCTION_KEY];
char eventStr[BS_MAX_TNA_FUNCTION_KEY][BS_MAX_TNA_EVENT_LEN];
} BS2TnaEventConfig;
Options
enabled
279
eventStr
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
Example
FSTnaEventConfig tnaConfig;
tnaConfig.enabled[BS_TNA_F1] = true;
tnaConfig.useRelay[BS_TNA_F1] = true;
strcpy( tnaConfig.eventStr[BS_TNA_F1], In );
tnaConfig.enabled[BS_TNA_F2] = true;
tnaConfig.useRelay[BS_TNA_F2] = false;
strcpy(tnaConfig.eventStr[BS_TNA_F2], Out );
280
BS_WriteBS2TnaEventExConfig/BS_ReadBS2TnaEventExConfig
Writes/reads the TNA mode configurations. Refer to
BS_WriteBS2TnaEventConfig for the related settings.
BS_RET_CODE BS_WriteBS2TnaEventExConfig( int handle,
BS2TnaEventExConfig* config )
BS_RET_CODE BS_ReadBS2TnaEventExConfig( int handle,
BS2TnaEventExConfig* config )
Parameters
handle
Handle of the communication channel.
config
BS2TnaEventExConfig is defined as follows;
typedef struct {
unsigned char fixedTnaIndex;
unsigned char reserved[3];
unsigned char manulTnaIndex;
unsigned char reserved2[3];
int timeSchedule[BS_MAX_TNA_FUNCTION_KEY];
} BS2TnaEventExConfig;
Options
fixedTnaIndex
manualTnaIndex
timeSchedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
Copyright 2013 by Suprema Inc.
281
282
BS_WriteFSTnaEventExConfig/BS_ReadFSTnaEventExConfig
Writes/reads the TNA mode configurations. Refer to BS_WriteFSTnaEventConfig
for the related settings.
BS_RET_CODE BS_WriteFSTnaEventExConfig( int handle,
FSTnaEventExConfig* config )
BS_RET_CODE BS_ReadFSTnaEventExConfig( int handle,
FSTnaEventExConfig* config )
Parameters
handle
Handle of the communication channel.
config
FSTnaEventExConfig is defined as follows;
typedef struct {
unsigned char fixedTnaIndex;
unsigned char reserved[3];
unsigned char manulTnaIndex;
unsigned char reserved2[3];
int timeSchedule[BS_MAX_TNA_FUNCTION_KEY];
} FSTnaEventExConfig;
Options
fixedTnaIndex
manualTnaIndex
timeSchedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
Copyright 2013 by Suprema Inc.
283
BS_WriteIPConfig/BS_ReadIPConfig
Writes/reads the IP configuration. Before configuring parameters, you have to
decide on two important options.
(1) DHCP: There are two ways to assign an IP address to a device DHCP or
static IP. DHCP makes network configuration much easier. You dont have
to configure other parameters such as subnet mask and gateway. If your
LAN has a DHCP server, all you have to do is to plug an Ethernet cable to
the device. By default, each device is set to use DHCP mode.
However, DHCP has its own problem. The IP address of a device can be
changed. When an IP address is assigned by a DHCP server, it has limited
lease time. Before the lease time expires, the device has to reacquire an IP
address. Depending on the configuration of DHCP server, the new IP
address can be different from the old one. Since the application doesnt
know this change, it will result in connection loss.
(2) Server/Direct mode: The connection between applications and devices has
two modes direct and server. The server mode is only for BioStar server.
Therefore, you have to use direct mode if you want to connect to the
device in your applications.
BS_RET_CODE BS_WriteIPConfig( int handle, BSIPConfig* config )
BS_RET_CODE BS_ReadIPConfig( int handle, BSIPConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSIPConfig is defined as follows;
#define BS_IP_DISABLE 0
#define BS_IP_ETHERNET 1
#define BS_IP_WLAN 2 // for Wireless version only
typedef struct {
int lanType;
bool useDHCP;
unsigned port;
Options
lanType
BS_IP_DISABLE
BS_IP_ETHERNET
BS_IP_WLAN
useDHCP
port
ipAddr
subnetMask
Subnet mask.
serverIP
maxConnection
useServer
serverPort
syncTimeWithServer
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation, D-Station, X-Station, BioStation T2, FaceStation
284
285
BS_WriteWLANConfig/BS_ReadWLANConfig
Writes/reads Wireless LAN configuration.
BS_RET_CODE BS_WriteWLANConfig( int handle, BSWLANConfig* config )
BS_RET_CODE BS_ReadWLANConfig( int handle, BSWLANConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSWLANConfig is defined as follows;
typedef struct {
char name[BS_MAX_NETWORK_ADDR_LEN];
int operationMode;
short authType;
short encryptionType;
int keyType;
char essid[BS_MAX_NETWORK_ADDR_LEN];
char key1[BS_MAX_NETWORK_ADDR_LEN];
char key2[BS_MAX_NETWORK_ADDR_LEN];
char wpaPassphrase[64];
} BSWLANPreset;
typedef struct {
int selected;
BSWLANPreset preset[BS_MAX_WLAN_PRESET];
} BSWLANConfig;
Options
operationMode
authType
286
Supported encryption
AUTH_OPEN
NO_ENCRYPTION
WEP
keyType
AUTH_SHARED
WEP
WPA_PSK
TKIP_AES
essid
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
Example
BSWLANConfig wlanConfig;
essid: biostation_wep
//
//
essid: biostation_wpa
//
encryption: AES
//
287
BS_WriteDSWLANConfig/BS_ReadDSWLANConfig
Writes/reads Wireless LAN configuration.
BS_RET_CODE BS_WriteDSWLANConfig( int handle, DSWLANConfig*
config )
BS_RET_CODE BS_ReadDSWLANConfig( int handle, DSWLANConfig*
config )
Parameters
handle
Handle of the communication channel.
config
DSWLANConfig is defined as follows;
typedef struct {
enum
{
WLAN_MANAGED = 0,
WLAN_AD_HOC = 1,
AUTH_OPEN = 0,
AUTH_SHARED = 1,
AUTH_WPA_PSK = 2,
NO_ENCRYPTION = 0,
ENC_WEP = 1,
ENC_TKIP_AES = 2,
ENC_AES = 3,
ENC_TKIP = 4,
KEY_ASCII = 0,
KEY_HEX = 1,
};
char name[BS_MAX_NETWORK_ADDR_LEN];
unsigned char operationMode;
unsigned char authType;
unsigned char encryptionType;
unsigned char keyType;
char essid[BS_MAX_NETWORK_ADDR_LEN];
char key1[BS_MAX_NETWORK_ADDR_LEN];
char key2[BS_MAX_NETWORK_ADDR_LEN];
char wpa_key[64];
288
289
Options
operationMode
authType
encryptionType
Supported encryption
AUTH_OPEN
NO_ENCRYPTION
WEP
keyType
AUTH_SHARED
WEP
WPA_PSK
TKIP_AES
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Example
DSWLANConfig wlanConfig;
// (1) AP1
//
essid: biostation_wep
//
//
essid: biostation_wpa
//
encryption: AES
//
290
BS_WriteBS2WLANConfig/BS_ReadBS2WLANConfig
Writes/reads Wireless LAN configuration.
BS_RET_CODE BS_WriteBS2WLANConfig( int handle, BS2WLANConfig*
config )
BS_RET_CODE BS_ReadBS2WLANConfig( int handle, BS2WLANConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BS2WLANConfig is defined as follows;
typedef struct {
enum
{
WLAN_MANAGED = 0,
WLAN_AD_HOC = 1,
AUTH_OPEN = 0,
AUTH_SHARED = 1,
AUTH_WPA_PSK = 2,
NO_ENCRYPTION = 0,
ENC_WEP = 1,
ENC_TKIP_AES = 2,
ENC_AES = 3,
ENC_TKIP = 4,
KEY_ASCII = 0,
KEY_HEX = 1,
};
char name[BS_MAX_NETWORK_ADDR_LEN];
unsigned char operationMode;
unsigned char authType;
unsigned char encryptionType;
unsigned char keyType;
char essid[BS_MAX_NETWORK_ADDR_LEN];
char key1[BS_MAX_NETWORK_ADDR_LEN];
char key2[BS_MAX_NETWORK_ADDR_LEN];
char wpa_key[64];
291
292
Options
operationMode
authType
encryptionType
Supported encryption
AUTH_OPEN
NO_ENCRYPTION
WEP
keyType
AUTH_SHARED
WEP
WPA_PSK
TKIP_AES
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
Example
BS2WLANConfig wlanConfig;
// (1) AP1
//
essid: biostation_wep
//
//
essid: biostation_wpa
//
encryption: AES
//
293
BS_WriteFSWLANConfig/BS_ReadFSWLANConfig
Writes/reads Wireless LAN configuration.
BS_RET_CODE BS_WriteFSWLANConfig( int handle, FSWLANConfig*
config )
BS_RET_CODE BS_ReadFSWLANConfig( int handle, FSWLANConfig*
config )
Parameters
handle
Handle of the communication channel.
config
FS2WLANConfig is defined as follows;
typedef struct {
enum
{
WLAN_MANAGED = 0,
WLAN_AD_HOC = 1,
AUTH_OPEN = 0,
AUTH_SHARED = 1,
AUTH_WPA_PSK = 2,
NO_ENCRYPTION = 0,
ENC_WEP = 1,
ENC_TKIP_AES = 2,
ENC_AES = 3,
ENC_TKIP = 4,
KEY_ASCII = 0,
KEY_HEX = 1,
};
char name[BS_MAX_NETWORK_ADDR_LEN];
unsigned char operationMode;
unsigned char authType;
unsigned char encryptionType;
unsigned char keyType;
char essid[BS_MAX_NETWORK_ADDR_LEN];
char key1[BS_MAX_NETWORK_ADDR_LEN];
char key2[BS_MAX_NETWORK_ADDR_LEN];
char wpa_key[64];
294
295
Options
operationMode
authType
encryptionType
Supported encryption
AUTH_OPEN
NO_ENCRYPTION
WEP
keyType
AUTH_SHARED
WEP
WPA_PSK
TKIP_AES
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
Example
FSWLANConfig wlanConfig;
// (1) AP1
//
essid: biostation_wep
//
//
essid: biostation_wpa
//
encryption: AES
//
296
BS_WriteFingerprintConfig/BS_ReadFingerprintConfig
Write/read the configurations associated with fingerprint authentication.
BS_RET_CODE BS_WriteFingerprintConfig( int handle,
BSFingerprintConfig* config )
BS_RET_CODE BS_ReadFingerprintConfig( int handle,
BSFingerprintConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSFingerprintConfig is defined as follows;
typedef struct {
int security;
int userSecurity;
int fastMode;
int sensitivity; // 0(Least) ~ 7(Most)
int timeout; // 0 for indefinite, 1 ~ 20 sec
int imageQuality;
bool viewImage;
int freeScanDelay;
int useCheckDuplicate;
int matchTimeout;
short useSIF;
short useFakeDetect;
bool useServerMatching;
char reserved[3];
} BSFingerprintConfig;
Options
security
userSecurity
297
BS_FAST_MODE_NORMAL
BS_FAST_MODE_FAST
BS_FAST_MODE_FASTER
BS_FAST_MODE_AUTO
sensitivity
timeout
imageQuality
freeScanDelay
useCheckDuplicate
matchTimeout
templateType
298
useServerMatching
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
299
BS_WriteDSFingerprintConfig/BS_ReadDSFingerprintConfig
Write/read the configurations associated with fingerprint authentication.
BS_RET_CODE BS_WriteDSFingerprintConfig( int handle,
DSFingerprintConfig* config )
BS_RET_CODE BS_ReadDSFingerprintConfig( int handle,
DSFingerprintConfig* config )
Parameters
handle
Handle of the communication channel.
config
DSFingerprintConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
USE = 1,
//security
SECURITY_NORMAL = 0,
SECURITY_SECURE = 1,
SECURITY_MORE_SECURE = 2,
//userSecurity
USER_SECURITY_READER = 0,
USER_SECURITY_USER = 1,
//fastMode
FAST_MODE_NORMAL = 0,
FAST_MODE_FAST = 1,
FAST_MODE_FASTER = 2,
FAST_MODE_AUTO = 3,
//imageQuality
IMAGE_QUALITY_WEAK = 0,
IMAGE_QUALITY_MODERATE = 1,
IMAGE_QUALITY_STRONG = 2,
//templateType
TEMPLATE_TYPE_SUPREMA = 0,
300
301
TEMPLATE_TYPE_ISO = 1,
TEMPLATE_TYPE_ANSI = 2,
};
unsigned char security;
unsigned char userSecurity;
unsigned char fastMode;
unsigned char sensitivity; // 0(Least) ~ 7(Most)
unsigned char timeout; // 0 for indefinite, 1 ~ 20 sec
unsigned char imageQuality;
unsigned char viewImage;
// NOT_USE, USE
// 0~10
//1~20
//NOT_USE, USE
Options
security
userSecurity
fastMode
BS_FAST_MODE_NORMAL
BS_FAST_MODE_FAST
BS_FAST_MODE_FASTER
BS_FAST_MODE_AUTO
sensitivity
timeout
freeScanDelay
useCheckDuplicate
matchTimeout
templateType
useFakeDetect
useServerMatching
302
303
BS_WriteBS2FingerprintConfig/BS_ReadBS2FingerprintConfig
Write/read the configurations associated with fingerprint authentication.
BS_RET_CODE BS_WriteBS2FingerprintConfig( int handle,
BS2FingerprintConfig* config )
BS_RET_CODE BS_ReadBS2FingerprintConfig( int handle,
BS2FingerprintConfig* config )
Parameters
handle
Handle of the communication channel.
config
BS2FingerprintConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
USE = 1,
//security
SECURITY_NORMAL = 0,
SECURITY_SECURE = 1,
SECURITY_MORE_SECURE = 2,
//userSecurity
USER_SECURITY_READER = 0,
USER_SECURITY_USER = 1,
//fastMode
FAST_MODE_NORMAL = 0,
FAST_MODE_FAST = 1,
FAST_MODE_FASTER = 2,
FAST_MODE_AUTO = 3,
TEMPLATE_TYPE_SUPREMA = 0,
TEMPLATE_TYPE_ISO = 1,
TEMPLATE_TYPE_ANSI = 2,
};
unsigned char security;
unsigned char userSecurity;
unsigned char fastMode;
304
305
// NOT_USE, USE
//1~20
//NOT_USE, USE
//NOT_USE, USE
//NOT_USE, USE
Options
security
userSecurity
fastMode
BS_FAST_MODE_NORMAL
BS_FAST_MODE_FAST
BS_FAST_MODE_FASTER
BS_FAST_MODE_AUTO
sensitivity
timeout
viewImage
matchTimeout
templateType
useServerMatching
useProtection
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
306
307
BS_WriteFSFaceConfig/BS_ReadFSFaceConfig
Write/read the configurations associated with face authentication.
BS_RET_CODE BS_WriteFSFaceConfig( int handle, FSFaceConfig* config )
BS_RET_CODE BS_ReadFSFaceConfig( int handle, FSFaceConfig* config )
Parameters
handle
Handle of the communication channel.
config
FSFaceConfig is defined as follows;
typedef struct{
enum{
NOT_USE = 0,
USE = 1,
// security
SECURITY_NORMAL = 0,
SECURITY_SECURE = 1,
SECURITY_MORE_SECURE = 2,
// Mode
FACE_MODE_SINGLE = 0,
FACE_MODE_CONTINUE = 1,
};
// 0~2,0
// 0~3,3
// 0~3,2
// 0~3,8
// 0~1,0
// 0~255,64
// 0~255,255
int calPosX;
// -208~208,0
308
// -272~272,0
int motionThreshold;
// 0~4896000,30000
int fakeThreshold;
// 0~1024,50
// 0~9,4
// 0~255,30
// 0~1,1
Options
security
enrollSensitivity
The others
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
BS_WriteIOConfig/BS_ReadIOConfig
BioStation has two input ports, two output ports, and a tamper switch. These
functions write/read the configurations of these IO ports.
BS_RET_CODE BS_WriteIOConfig( int handle, BSIOConfig* config )
BS_RET_CODE BS_ReadIOConfig( int handle, BSIOConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSIOConfig is defined as follows;
typedef struct {
int input[BS_NUM_OF_INPUT];
int output[BS_NUM_OF_OUTPUT];
int tamper;
int outputDuration;
int inputDuration[BS_NUM_OF_INPUT];
int inputSchedule[BS_NUM_OF_INPUT];
short inputType[BS_NUM_OF_INPUT];
int reserved1;
int wiegandMode;
unsigned cardReaderID;
int reserved2[55];
} BSIOConfig;
Options
input
output
309
outputDuration
inputDuration
inputSchedule
inputType
BS_WriteInputConfig.
wiegandMode
cardReaderID
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Copyright 2013 by Suprema Inc.
310
Compatibility
BioStation
311
312
BS_WriteSerialConfig/BS_ReadSerialConfig
Specifies the baud rate of the RS232 and RS485 ports.
BS_RET_CODE BS_WriteSerialConfig( int handle, BSSerialConfig* config )
BS_RET_CODE BS_ReadSerialConfig( int handle, BSSerialConfig* config )
Parameters
handle
Pointer to the communication channel.
config
BSSerialConfig is defined as follows;
typedef struct {
int rs485;
int rs232;
int useSecureIO;
char activeSecureIO[4]; // 0 ~ 3 - byte[0] ~ byte[3]
unsigned slaveID;
int deviceType;
int reserved[2];
} BSSerialConfig;
Options
rs485
rs232
useSecureIO
activeSecureIO
slaveID
deviceType
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
313
BS_WriteDSSerialConfig/BS_ReadDSSerialConfig
Specifies the baud rate of the RS232 and RS485 ports.
BS_RET_CODE BS_WriteDSSerialConfig( int handle, DSSerialConfig*
config )
BS_RET_CODE BS_ReadDSSerialConfig( int handle, DSSerialConfig*
config )
Parameters
handle
Pointer to the communication channel.
config
DSSerialConfig is defined as follows;
typedef struct {
enum {
NOT_USE = 0,
};
int rs485;
int rs232;
int reserved[6];
} DSSerialConfig;
Options
rs485
rs232
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
314
BS_WriteXSSerialConfig/BS_ReadXSSerialConfig
Specifies the baud rate of the RS232 and RS485 ports.
BS_RET_CODE BS_WriteXSSerialConfig( int handle, XSSerialConfig*
config )
BS_RET_CODE BS_ReadXSSerialConfig( int handle, XSSerialConfig*
config )
Parameters
handle
Pointer to the communication channel.
config
XSSerialConfig is defined as follows;
typedef struct {
enum {
NOT_USE = 0,
};
int rs485;
int rs232;
int reserved[6];
} XSSerialConfig;
Options
rs485
rs232
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
315
BS_WriteBS2SerialConfig/BS_ReadBS2SerialConfig
Specifies the baud rate of the RS232 and RS485 ports.
BS_RET_CODE BS_WriteBS2SerialConfig( int handle, BS2SerialConfig*
config )
BS_RET_CODE BS_ReadBS2SerialConfig( int handle, BS2SerialConfig*
config )
Parameters
handle
Pointer to the communication channel.
config
BS2SerialConfig is defined as follows;
typedef struct {
enum {
NOT_USE = 0,
};
int rs485;
int rs232;
int reserved[6];
} BS2SerialConfig;
Options
rs485
rs232
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
316
BS_WriteFSSerialConfig/BS_ReadFSSerialConfig
Specifies the baud rate of the RS232 and RS485 ports.
BS_RET_CODE BS_WriteFSSerialConfig( int handle, FSSerialConfig*
config )
BS_RET_CODE BS_ReadFSSerialConfig( int handle, FSSerialConfig*
config )
Parameters
handle
Pointer to the communication channel.
config
FSSerialConfig is defined as follows;
typedef struct {
enum {
NOT_USE = 0,
};
int rs485;
int rs232;
int reserved[6];
} FSSerialConfig;
Options
rs485
rs232
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
317
BS_Write485NetworkConfig/BS_Read485NetworkConfig
Specifies the RS485 mode of BioStation. For the general concept of RS485
communication, refer to BS_OpenSerial485.
BS_RET_CODE BS_Write485NetworkConfig( int handle,
BS485NetworkConfig* config )
BS_RET_CODE BS_Read485NetworkConfig( int handle,
BS485NetworkConfig* config )
Parameters
handle
Pointer to the communication channel.
config
BS485NetworkConfig is defined as follows;
typedef struct {
unsigned short deviceType;
unsigned short useIO;
char activeSIO[MAX_NUM_OF_SIO];
BS485SlaveInfo slaveInfo[MAX_NUM_OF_SLAVE];
int reserved[18];
} BS485NetworkConfig;
typedef struct{
unsigned slaveID;
int slaveType;
} BS485SlaveInfo;
Options
deviceType
TYPE_DISABLE
TYPE_CONN_PC 485 port is used for PC
connection.
TYPE_HOST The device plays the role of the host.
TYPE_SLAVE The device is connected to the host
device.
useIO
It should be true.
activeSIO
slaveInfo
318
Compatibility
BioStation
319
BS_WriteDS485NetworkConfig/BS_ReadDS485NetworkConfig
Specifies the RS485 mode of D-Station. For the general concept of RS485
communication, refer to BS_OpenSerial485.
BS_RET_CODE BS_WriteDS485NetworkConfig( int handle,
DS485NetworkConfig* config )
BS_RET_CODE BS_ReadDS485NetworkConfig( int handle,
DS485NetworkConfig* config )
Parameters
handle
Pointer to the communication channel.
config
DS485NetworkConfig is defined as follows;
typedef struct {
enum
{
TYPE_DISABLE = 0,
TYPE_HOST = 4,
TYPE_SLAVE = 5,
MAX_NUM_OF_SIO = 4,
MAX_NUM_OF_SLAVE = 7,
};
int baudRate;
unsigned short deviceType;
unsigned short reserved;
char activeSIO[MAX_NUM_OF_SIO];
BS485SlaveInfo slaveInfo[MAX_NUM_OF_SLAVE];
int reserved[17];
} DS485NetworkConfig;
typedef struct{
unsigned slaveID;
int slaveType;
} BS485SlaveInfo;
Options
320
TYPE_DISABLE
TYPE_CONN_PC 485 port is used for PC
connection.
TYPE_HOST The device plays the role of the host.
TYPE_SLAVE The device is connected to the host
device.
activeSIO
slaveInfo
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
321
BS_WriteXS485NetworkConfig/BS_ReadXS485NetworkConfig
Specifies the RS485 mode of X-Station. For the general concept of RS485
communication, refer to BS_OpenSerial485.
BS_RET_CODE BS_WriteXS485NetworkConfig( int handle,
XS485NetworkConfig* config )
BS_RET_CODE BS_ReadXS485NetworkConfig( int handle,
XS485NetworkConfig* config )
Parameters
handle
Pointer to the communication channel.
config
XS485NetworkConfig is defined as follows;
typedef struct {
enum
{
TYPE_DISABLE = 0,
TYPE_HOST = 4,
TYPE_SLAVE = 5,
MAX_NUM_OF_SIO = 4,
MAX_NUM_OF_SLAVE = 7,
};
int baudRate;
unsigned short deviceType;
unsigned short reserved;
char activeSIO[MAX_NUM_OF_SIO];
BS485SlaveInfo slaveInfo[MAX_NUM_OF_SLAVE];
int reserved[17];
} XS485NetworkConfig;
typedef struct{
unsigned slaveID;
int slaveType;
} BS485SlaveInfo;
Options
322
TYPE_DISABLE
TYPE_CONN_PC 485 port is used for PC
connection.
TYPE_HOST The device plays the role of the host.
TYPE_SLAVE The device is connected to the host
device.
activeSIO
slaveInfo
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
323
BS_WriteBS2485NetworkConfig/BS_ReadBS2485NetworkConfig
Specifies the RS485 mode of BioStation T2. For the general concept of RS485
communication, refer to BS_OpenSerial485.
BS_RET_CODE BS_WriteBS2485NetworkConfig( int handle,
BS2485NetworkConfig* config )
BS_RET_CODE BS_ReadBS2485NetworkConfig( int handle,
BS2485NetworkConfig* config )
Parameters
handle
Pointer to the communication channel.
config
BS2485NetworkConfig is defined as follows;
typedef struct {
enum
{
TYPE_DISABLE = 0,
TYPE_HOST = 4,
TYPE_SLAVE = 5,
MAX_NUM_OF_SIO = 4,
MAX_NUM_OF_SLAVE = 7,
};
int baudRate;
unsigned short deviceType;
unsigned short reserved;
char activeSIO[MAX_NUM_OF_SIO];
BS485SlaveInfo slaveInfo[MAX_NUM_OF_SLAVE];
int reserved[17];
} BS2485NetworkConfig;
typedef struct{
unsigned slaveID;
int slaveType;
} BS485SlaveInfo;
Options
324
TYPE_DISABLE
TYPE_CONN_PC 485 port is used for PC
connection.
TYPE_HOST The device plays the role of the host.
TYPE_SLAVE The device is connected to the host
device.
activeSIO
slaveInfo
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
325
BS_WriteFS485NetworkConfig/BS_ReadFS485NetworkConfig
Specifies the RS485 mode of FaceStation. For the general concept of RS485
communication, refer to BS_OpenSerial485.
BS_RET_CODE BS_WriteFS485NetworkConfig( int handle,
FS485NetworkConfig* config )
BS_RET_CODE BS_ReadFS485NetworkConfig( int handle,
FS485NetworkConfig* config )
Parameters
handle
Pointer to the communication channel.
config
FS485NetworkConfig is defined as follows;
typedef struct {
enum
{
TYPE_DISABLE = 0,
TYPE_HOST = 4,
TYPE_SLAVE = 5,
MAX_NUM_OF_SIO = 4,
MAX_NUM_OF_SLAVE = 7,
};
int baudRate;
unsigned short deviceType;
unsigned short reserved;
char activeSIO[MAX_NUM_OF_SIO];
BS485SlaveInfo slaveInfo[MAX_NUM_OF_SLAVE];
int reserved[17];
} FS485NetworkConfig;
typedef struct{
unsigned slaveID;
int slaveType;
} BS485SlaveInfo;
Options
326
TYPE_DISABLE
TYPE_CONN_PC 485 port is used for PC
connection.
TYPE_HOST The device plays the role of the host.
TYPE_SLAVE The device is connected to the host
device.
activeSIO
slaveInfo
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
327
BS_WriteUSBConfig/BS_ReadUSBConfig
Enables or disables the USB device interface.
BS_RET_CODE BS_WriteUSBConfig( int handle, BSUSBConfig* config )
BS_RET_CODE BS_ReadUSBConfig( int handle, BSUSBConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSUSBConfig is defined as follows;
typedef struct {
bool connectToPC;
int reserved[7];
} BSUSBConfig;
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
328
BS_WriteBS2USBConfig/BS_ReadBS2USBConfig
Enables or disables the USB device interface.
BS_RET_CODE BS_WriteBS2USBConfig( int handle, BS2USBConfig*
config )
BS_RET_CODE BS_ReadBS2USBConfig( int handle, BS2USBConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BS2USBConfig is defined as follows;
typedef struct {
unsigned char connectToPC;
unsigned char connectToMemory;
int reserved[2];
} BS2USBConfig;
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
329
330
BS_WriteFSUSBConfig/BS_ReadFSUSBConfig
Enables or disables the USB device interface.
BS_RET_CODE BS_WriteFSUSBConfig( int handle, FSUSBConfig* config )
BS_RET_CODE BS_ReadFSUSBConfig( int handle, FSUSBConfig* config )
Parameters
handle
Handle of the communication channel.
config
FSUSBConfig is defined as follows;
typedef struct {
unsigned char connectToPC;
unsigned char connectToMemory;
int reserved[2];
} FSUSBConfig;
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
331
BS_WriteEncryptionConfig/BS_ReadEncryptionConfig
For higher security, users can turn on the encryption mode. When the mode is on,
all the fingerprint templates are transferred and saved in encrypted form. To
change the encryption mode, all the enrolled users should be deleted first. And a
256 bit encryption key should be sent, too.
BS_RET_CODE BS_WriteEncryptionConfig( int handle,
BSEncryptionConfig* config )
BS_RET_CODE BS_ReadEncryptionConfig( int handle,
BSEncryptionConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSEncryptionConfig is defined as follows;
typedef struct {
bool useEncryption;
unsigned char password[BS_ENCRYPTION_PASSWORD_LEN];
// 256bit encryption key
int reserved[3];
} BSEncryptionConfig;
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
332
BS_WriteWiegandConfig/BS_ReadWiegandConfig
Configures Wiegand format. Up to 64 bit Wiegand formats are supported. The only
constraint is that each field is limited to 32 bits.
BS_RET_CODE BS_WriteWiegandConfig( int handle, BSWiegandConfig*
config )
BS_RET_CODE BS_ReadWiegandConfig( int handle, BSWiegandConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSWiegandConfig is defined as follows;
typedef enum {
BS_WIEGAND_26BIT
= 0x01,
BS_WIEGAND_PASS_THRU
= 0x02,
BS_WIEGAND_CUSTOM = 0x03,
} BS_WIEGAND_FORMAT;
typedef enum {
BS_WIEGAND_EVEN_PARITY = 0,
BS_WIEGAND_ODD_PARITY
= 1,
} BS_WIEGAND_PARITY_TYPE;
typedef struct {
int bitIndex;
int bitLength;
} BSWiegandField;
typedef struct {
int bitIndex;
BS_WIEGAND_PARITY_TYPE type;
BYTE bitMask[8];
} BSWiegandParity;
typedef struct {
BS_WIEGAND_FORMAT format;
int totalBits;
} BSWiegandFormatHeader;
333
typedef struct {
int numOfIDField;
BSWiegandField field[MAX_WIEGAND_FIELD];
} BSWiegandPassThruData;
typedef struct {
int numOfField;
UINT32 idFieldMask;
BSWiegandField field[MAX_WIEGAND_FIELD];
int numOfParity;
BSWiegandParity parity[MAX_WIEGAND_PARITY];
} BSWiegandCustomData;
typedef union {
BSWiegandPassThruData passThruData;
BSWiegandCustomData customData;
} BSWiegandFormatData;
typedef struct {
unsigned short outWidth;
unsigned short reserved;
unsigned short outInterval;
unsigned char useFailCode;
// 0-0000.. 1-FFFF..
BSWiegandFormatHeader header;
BSWiegandFormatData data;
unsigned fieldValue[MAX_WIEGAND_FIELD];
} BSWiegandConfig;
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
334
BS_WriteDSWiegandConfig/BS_ReadDSWiegandConfig
Configures Wiegand format. Up to 64 bit Wiegand formats are supported. The only
constraint is that each field is limited to 32 bits.
BS_RET_CODE BS_WriteDSWiegandConfig( int handle, DSWiegandConfig*
config )
BS_RET_CODE BS_ReadDSWiegandConfig( int handle, DSWiegandConfig*
config )
Parameters
handle
Handle of the communication channel.
config
DSWiegandConfig is defined as follows;
typedef enum {
BS_WIEGAND_26BIT
= 0x01,
BS_WIEGAND_PASS_THRU
= 0x02,
BS_WIEGAND_CUSTOM = 0x03,
} BS_WIEGAND_FORMAT;
typedef enum {
BS_WIEGAND_EVEN_PARITY = 0,
BS_WIEGAND_ODD_PARITY
= 1,
} BS_WIEGAND_PARITY_TYPE;
typedef struct {
int bitIndex;
int bitLength;
} BSWiegandField;
typedef struct {
int bitIndex;
BS_WIEGAND_PARITY_TYPE type;
BYTE bitMask[8];
} BSWiegandParity;
typedef struct {
BS_WIEGAND_FORMAT format;
int totalBits;
} BSWiegandFormatHeader;
335
typedef struct {
int numOfIDField;
BSWiegandField field[MAX_WIEGAND_FIELD];
} BSWiegandPassThruData;
typedef struct {
int numOfField;
UINT32 idFieldMask;
BSWiegandField field[MAX_WIEGAND_FIELD];
int numOfParity;
BSWiegandParity parity[MAX_WIEGAND_PARITY];
} BSWiegandCustomData;
typedef union {
BSWiegandPassThruData passThruData;
BSWiegandCustomData customData;
} BSWiegandFormatData;
typedef struct {
`
enum {
USER_IN = 0,
CARD_IN = 1,
USER_OUT = 2,
CARD_OUT = 3,
MODE_LEGACY = 0,
MODE_EXTENDED = 1,
MAX_NUM_OF_READER = 9,
};
unsigned short outWidth;
unsigned short outInterval;
unsigned short InOut;
unsigned short mode;
unsigned int cardReaderID[MAX_NUM_OF_READER];
unsigned char useFailCode;
data;
Compatibility
D-Station
336
337
BS_WriteXSWiegandConfig/BS_ReadXSWiegandConfig
Configures Wiegand format. Up to 64 bit Wiegand formats are supported. The only
constraint is that each field is limited to 32 bits.
BS_RET_CODE BS_WriteXSWiegandConfig( int handle, XSWiegandConfig*
config )
BS_RET_CODE BS_ReadXSWiegandConfig( int handle, XSWiegandConfig*
config )
Parameters
handle
Handle of the communication channel.
config
XSWiegandConfig is defined as follows;
typedef enum {
BS_WIEGAND_26BIT
= 0x01,
BS_WIEGAND_PASS_THRU
= 0x02,
BS_WIEGAND_CUSTOM = 0x03,
} BS_WIEGAND_FORMAT;
typedef enum {
BS_WIEGAND_EVEN_PARITY = 0,
BS_WIEGAND_ODD_PARITY
= 1,
} BS_WIEGAND_PARITY_TYPE;
typedef struct {
int bitIndex;
int bitLength;
} BSWiegandField;
typedef struct {
int bitIndex;
BS_WIEGAND_PARITY_TYPE type;
BYTE bitMask[8];
} BSWiegandParity;
typedef struct {
BS_WIEGAND_FORMAT format;
int totalBits;
} BSWiegandFormatHeader;
338
typedef struct {
int numOfIDField;
BSWiegandField field[MAX_WIEGAND_FIELD];
} BSWiegandPassThruData;
typedef struct {
int numOfField;
UINT32 idFieldMask;
BSWiegandField field[MAX_WIEGAND_FIELD];
int numOfParity;
BSWiegandParity parity[MAX_WIEGAND_PARITY];
} BSWiegandCustomData;
typedef union {
BSWiegandPassThruData passThruData;
BSWiegandCustomData customData;
} BSWiegandFormatData;
typedef struct {
`
enum {
USER_IN = 0,
CARD_IN = 1,
USER_OUT = 2,
CARD_OUT = 3,
MODE_LEGACY = 0,
MODE_EXTENDED = 1,
MAX_NUM_OF_READER = 9,
};
unsigned short outWidth;
unsigned short outInterval;
unsigned short InOut;
unsigned short mode;
unsigned int cardReaderID[MAX_NUM_OF_READER];
unsigned char useFailCode;
data;
Compatibility
X-Station
339
340
BS_WriteBS2WiegandConfig/BS_ReadBS2WiegandConfig
Configures Wiegand format. Up to 64 bit Wiegand formats are supported. The only
constraint is that each field is limited to 32 bits.
BS_RET_CODE BS_WriteBS2WiegandConfig( int handle,
BS2WiegandConfig* config )
BS_RET_CODE BS_ReadBS2WiegandConfig( int handle,
BS2WiegandConfig* config )
Parameters
handle
Handle of the communication channel.
config
BS2WiegandConfig is defined as follows;
typedef enum {
BS_WIEGAND_26BIT
= 0x01,
BS_WIEGAND_PASS_THRU
= 0x02,
BS_WIEGAND_CUSTOM = 0x03,
} BS_WIEGAND_FORMAT;
typedef enum {
BS_WIEGAND_EVEN_PARITY = 0,
BS_WIEGAND_ODD_PARITY
= 1,
} BS_WIEGAND_PARITY_TYPE;
typedef struct {
int bitIndex;
int bitLength;
} BSWiegandField;
typedef struct {
int bitIndex;
BS_WIEGAND_PARITY_TYPE type;
BYTE bitMask[8];
} BSWiegandParity;
typedef struct {
BS_WIEGAND_FORMAT format;
int totalBits;
} BSWiegandFormatHeader;
341
typedef struct {
int numOfIDField;
BSWiegandField field[MAX_WIEGAND_FIELD];
} BSWiegandPassThruData;
typedef struct {
int numOfField;
UINT32 idFieldMask;
BSWiegandField field[MAX_WIEGAND_FIELD];
int numOfParity;
BSWiegandParity parity[MAX_WIEGAND_PARITY];
} BSWiegandCustomData;
typedef union {
BSWiegandPassThruData passThruData;
BSWiegandCustomData customData;
} BSWiegandFormatData;
typedef struct {
`
enum {
USER_IN = 0,
CARD_IN = 1,
USER_OUT = 2,
CARD_OUT = 3,
MODE_LEGACY = 0,
MODE_EXTENDED = 1,
MAX_NUM_OF_READER = 9,
};
unsigned short outWidth;
unsigned short outInterval;
unsigned short InOut;
unsigned short mode;
unsigned int cardReaderID[MAX_NUM_OF_READER];
unsigned char useFailCode;
data;
Compatibility
BioStation T2
342
343
BS_WriteFSWiegandConfig/BS_ReadFSWiegandConfig
Configures Wiegand format. Up to 64 bit Wiegand formats are supported. The only
constraint is that each field is limited to 32 bits.
BS_RET_CODE BS_WriteFSWiegandConfig( int handle, FSWiegandConfig*
config )
BS_RET_CODE BS_ReadFSWiegandConfig( int handle, FSWiegandConfig*
config )
Parameters
handle
Handle of the communication channel.
config
FSWiegandConfig is defined as follows;
typedef enum {
BS_WIEGAND_26BIT
= 0x01,
BS_WIEGAND_PASS_THRU
= 0x02,
BS_WIEGAND_CUSTOM = 0x03,
} BS_WIEGAND_FORMAT;
typedef enum {
BS_WIEGAND_EVEN_PARITY = 0,
BS_WIEGAND_ODD_PARITY
= 1,
} BS_WIEGAND_PARITY_TYPE;
typedef struct {
int bitIndex;
int bitLength;
} BSWiegandField;
typedef struct {
int bitIndex;
BS_WIEGAND_PARITY_TYPE type;
BYTE bitMask[8];
} BSWiegandParity;
typedef struct {
BS_WIEGAND_FORMAT format;
int totalBits;
} BSWiegandFormatHeader;
344
typedef struct {
int numOfIDField;
BSWiegandField field[MAX_WIEGAND_FIELD];
} BSWiegandPassThruData;
typedef struct {
int numOfField;
UINT32 idFieldMask;
BSWiegandField field[MAX_WIEGAND_FIELD];
int numOfParity;
BSWiegandParity parity[MAX_WIEGAND_PARITY];
} BSWiegandCustomData;
typedef union {
BSWiegandPassThruData passThruData;
BSWiegandCustomData customData;
} BSWiegandFormatData;
typedef struct {
`
enum {
USER_IN = 0,
CARD_IN = 1,
USER_OUT = 2,
CARD_OUT = 3,
MODE_LEGACY = 0,
MODE_EXTENDED = 1,
MAX_NUM_OF_READER = 9,
};
unsigned short outWidth;
unsigned short outInterval;
unsigned short InOut;
unsigned short mode;
unsigned int cardReaderID[MAX_NUM_OF_READER];
unsigned char useFailCode;
data;
Compatibility
FaceStation
345
346
BS_WriteZoneConfigEx/BS_ReadZoneConfigEx
Zones are used to group a number of devices to have a specific function. A zone
consists of a master device, which plays a role similar to that of a legacy controller,
and the other member devices. Any device FaceStation, BioStation T2, D-Station,
X-Station, BioStation, BioEntry Plus, BioEntry W, BioLite Net, Xpass or Xpass Slim.
- can be a master device. The maximum number of devices in a group is 64.
BioStar Server
PC Connection
Up to 31 devices excluding the PC
No zone support
No Secure I/O
BioStar Client
Ethernet
...
RS485
...
...
Host
Host
RS485
Secure
I/O
...
Slave
Zone
RS485
Slave
Secure
I/O
...
Slave
Slave
Slave
Host/Slave
Up to 7 slaves
Maximum 4 Secure I/Os
Zone support
Zone
347
gain entry. The zone supports two types of anti-passback restrictions: soft and hard.
When a user violates the anti-passback protocol, the soft restriction will record the
action in the user's log. The hard restriction will deny access and record the event
in the log when the antipassback protocol is violated.
Entrance limit zone - Use this zone to restrict the number of times a user can
enter an area. The entrance limit can be tied to a timezone, so that a user is
restricted to a maximum number of entries during a specified time span. You can
also set time limits for reentry to enforce a timed anti-passback restriction.
Alarm zone - Use this zone to group inputs from multiple devices into a single
alarm zone. Devices in the alarm zone can be simultaneously armed or disarmed
via an arm or disarm card or a key or input port.
Fire alarm zone - Use this zone to control how doors will respond during a fire.
External inputs can be fed into the BioStar system to automatically trigger door
releases or perform other actions.
BS_RET_CODE BS_WriteZoneConfigEx( int handle, BSZoneConfigEx*
config )
BS_RET_CODE BS_ReadZoneConfigEx( int handle, BSZoneConfigEx*
config )
Parameters
handle
Handle of the communication channel.
config
BSZoneConfigEx is defined as follows;
typedef struct {
//Common
int numOfMember; //includes master node itself...
unsigned memberId[BS_MAX_NODE_PER_ZONE_EX];
unsigned memberIpAddr[BS_MAX_NODE_PER_ZONE_EX];
int memberStatus[BS_MAX_NODE_PER_ZONE_EX];
int memberInfo[BS_MAX_NODE_PER_ZONE_EX];
int reserved1[8];
//Alarm zone
int zoneStatus;
int alarmStatus; // 0 : disabled, 1 : enabled
int reserved2[3];
348
//0 ~ 255
int zoneType;
int nodeType;
BSZoneMasterEx master;
BSZoneMemberEx member;
BSZonePropertyEx ZoneProperty;
} BSZoneEx;
typedef struct {
int numOfZones; //0 ~ BS_MAX_ZONE_PER_NODE
BSZoneEx zone[BS_MAX_ZONE_PER_NODE];
} BSZoneConfigEx;
Options
numOfMember
349
memberIpAddr
memberStatus
NORMAL
DISCONNECTED
memberInfo
zoneStatus
alarmStatus
BSZoneMemberEx
Fields
Options
masterIpAddr
masterId
authMode
It should be BS_AUTH_DEFERRED.
ioMode
armType
useSound
armKey
350
cardID
customID
disconnProcessType
BSAccessZoneProperty
Fields
Options
fallbackMode
synchTime
synchUser
synchLog
BSAPBZonePropertyEx
Fields
Options
apbType
BS_APB_NONE
BS_APB_SOFT
BS_APB_HARD
apbResetInterval
bypassGroupId
BSEntranceLimitationZonePropertyEx
Fields
Options
351
numOfEntranceLimit
If numOfEntranceLimit is 0, no limitation is
applied. If numOfEntranceLimit is larger
than 0, users can access only during the
specified time intervals.
maxEntry
entryLimitInterval
bypassGroupId
BSAlarmZoneProperty
Fields
Options
accessGroupId
352
353
disarmDelay
BSZoneEx
Fields
Options
zoneId
zoneType
BS_ZONE_TYPE_ACCESS
BS_ZONE_TYPE_APB
BS_ZONE_TYPE_ENTRANCE_LIMIT
BS_ZONE_TYPE_ALARM
BS_ZONE_TYPE_FIRE_ALARM.
nodeType
BS_STANDALONE_NODE
BS_MASTER_NODE
BS_MEMBER_NODE
master
member
ZoneProperty
BSZoneConfigEx
Fields
Options
numOfZones
zone
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation(V1.5 or later)/BioEntry
Plus(V1.2 or later)/BioEntry W/BioLite Net/Xpass/Xpass Slim
354
BS_WriteCardReaderZoneConfig/BS_ReadCardReaderZoneConfig
Since BioStar V1.2 SDK, 3rd party RF device can join a BioStar zone as a member.
For that, Wmaster which can be a BioStation, BioEntry Plus, BioEntry W, or BioLite
Net should be configured as appropriate. Refer to 2.2.4 for details of integration of
3rd party RF devices.
BS_RET_CODE BS_WriteCardReaderZoneConfig( int handle,
BSCardReaderZoneConfig* config )
BS_RET_CODE BS_ReadCardReaderZoneConfig( int handle,
BSCardReaderZoneConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSCardReaderZoneConfig is defined as follows;
typedef struct {
int numOfCardReader;
unsigned readerID[MAX_READER];
BSZoneConfigEx zoneConfigEx[MAX_READER];
} BSCardReaderZoneConfig;
Options
numOfCardReader
readerID
zoneConfigEx
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
355
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
356
BS_WriteDoorConfig/BS_ReadDoorConfig
Up to two device can be attached to a door. You can specify which I/O ports are
used for the relay, RTE, and door sensor. You can also configure the actions for
forced open and held open alarms.
BS_RET_CODE BS_WriteDoorConfig( int handle, BSDoorConfig* config )
BS_RET_CODE BS_ReadDoorConfig( int handle, BSDoorConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSDoorConfig is defined as follows;
struct BSDoor {
int relay;
int useRTE;
int useDoorSensor;
unsigned short openEvent;
unsigned char unlockTriggerOption; //0: Not use, 1: Normal/Admin User,
//2: Admin User
unsigned char inputDelayOn; //Door Input Delay - 0: Off, 1: On
int openTime;
int heldOpenTime;
int forcedOpenSchedule;
int forcedCloseSchedule;
int RTEType;
int sensorType;
short reader[2];
unsigned char useRTEEx;
unsigned char useSoundForcedOpen;
unsigned char useSoundHeldOpen;
unsigned char openOnce;
int RTE;
unsigned char useDoorSensorEx;
unsigned char alarmStatus;
unsigned char reserved2[2];
int doorSensor;
int relayDeviceId;
};
Options
relay
RELAY_DISABLED
PRIMARY_RELAY: its own relay
SECONDARY_RELAY: the relay of another
device, whose ID is relayDeviceId. Both
devices should be connected by RS485.
SECUREIO0_RELAY0
SECUREIO0_RELAY1
SECUREIO1_RELAY0
SECUREIO1_RELAY1
SECUREIO2_RELAY0
SECUREIO2_RELAY1
SECUREIO3_RELAY0
SECUREIO3_RELAY1
useRTE
useDoorSensor
openEvent
357
heldOpenTime
forcedOpenSchedule
forcedCloseSchedule
RTEType
sensorType
reader
Not used.
useRTEEx
useSoundForcedOpen
useSoundHeldOpen
RTE
358
useDoorSensorEx
alarmStatus
doorSensor
relayDeviceId
BSDoorConfig
Fields
Options
doorMode
Not used.
door
apbType
Not used.
apbResetTime
Not used.
359
360
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
361
BS_WriteInputConfig/BS_ReadInputConfig
A BioStation, BioEntry Plus, BioEntry W, or BioLite Net can control up to 4 Secure
I/O devices through RS485 connection. A Secure I/O device has 4 SW inputs. A
BioStation, BioEntry Plus, BioEntry W, BioLite Net, Xpass, or Xpass Slim has 2 SW
inputs.
BS_RET_CODE BS_WriteInputConfig( int handle, BSInputConfig* config )
BS_RET_CODE BS_ReadInputConfig( int handle, BSInputConfig* config )
Parameters
handle
Handle of the communication channel.
config
BSInputConfig is defined as follows;
struct BSInputFunction {
int functionType;
short minimumDuration;
short switchType;
int timeSchedule;
unsigned deviceID;
int reserved[4];
};
struct BSInputConfig {
// host inputs
BSInputFunction hostTamper;
BSInputFunction hostInput[NUM_OF_HOST_INPUT];
// secure I/O
BSInputFunction secureIO[NUM_OF_SECURE_IO][NUM_OF_SECURE_INPUT];
// slave
BSInputFunction slaveTamper;
BSInputFunction slaveInput[NUM_OF_SLAVE_INPUT];
int reserved[32];
};
Options
minimumDuration
switchType
362
deviceID
BSInputConfig
Fields
Options
internalTamper
internal
secureIO
slaveTamper
Not used.
slave
Not used.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation/BioEntry Plus/BioEntry W/BioLite Net/Xpass/Xpass Slim
Example
// (1) Lock the device when the internal tamper is on
// (2) Open all doors when the input port 1 of Secure I/O 0 is activated
BSInputConfig inputConfig;
memset( &inputConfig, 0, sizeof( BSInputConfig ) );
inputConfig.internalTamper.functionType = BSInputFunction::LOCK_READER;
inputConfig.internalTamper.minimumDuration = 100; // 100 ms
inputConfig.internalTamper.switchType = BSDoor::NORMALLY_OPEN;
363
364
inputConfig.internalTamper.timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
inputConfig.secureIO[0][1].functionType = BSInputFunction::EMERGENCY_OPEN;
inputConfig.secureIO[0][1].minimumDuration = 1000; // 1000 ms
inputConfig.secureIO[0][1].switchType = BSDoor::NORMALLY_OPEN;
inputConfig.secureIO[0][1].timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
365
BS_WriteDSInputConfig/BS_ReadDSInputConfig
A D-Station/BioStation, BioEntry Plus, BioEntry W, or BioLite Net can control up to
4 Secure I/O devices through RS485 connection. A Secure I/O device has 4 SW
inputs. A BioStation, BioEntry Plus, BioEntry W, or BioLite Net has 2 SW inputs.
BS_RET_CODE BS_WriteDSInputConfig( int handle, DSInputConfig*
config )
BS_RET_CODE BS_ReadDSInputConfig( int handle, DSInputConfig*
config )
Parameters
handle
Handle of the communication channel.
config
DSInputConfig is defined as follows;
struct BSInputFunction {
int functionType;
short minimumDuration;
short switchType;
int timeSchedule;
unsigned deviceID;
int reserved[4];
};
struct BSInputConfig {
enum {
NUM_OF_INTERNAL_INPUT = 4,
NUM_OF_SECURE_IO = 4,
NUM_OF_SECURE_INPUT = 4,
};
// host inputs
BSInputFunction hostTamper;
BSInputFunction hostInput[NUM_OF_HOST_INPUT];
// secure I/O
BSInputFunction secureIO[NUM_OF_SECURE_IO][NUM_OF_SECURE_INPUT];
int reserved[48];
};
Options
functionType
minimumDuration
366
timeSchedule
deviceID
DSInputConfig
Fields
Options
internalTamper
internal
secureIO
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
Example
// (1) Lock the device when the internal tamper is on
// (2) Open all doors when the input port 1 of Secure I/O 0 is activated
DSInputConfig inputConfig;
memset( &inputConfig, 0, sizeof( BSInputConfig ) );
inputConfig.internalTamper.functionType = BSInputFunction::LOCK_READER;
inputConfig.internalTamper.minimumDuration = 100; // 100 ms
367
368
inputConfig.internalTamper.switchType = BSDoor::NORMALLY_OPEN;
inputConfig.internalTamper.timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
inputConfig.secureIO[0][1].functionType = BSInputFunction::EMERGENCY_OPEN;
inputConfig.secureIO[0][1].minimumDuration = 1000; // 1000 ms
inputConfig.secureIO[0][1].switchType = BSDoor::NORMALLY_OPEN;
inputConfig.secureIO[0][1].timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
369
BS_WriteXSInputConfig/BS_ReadXSInputConfig
A D-Station/BioStation, BioEntry Plus, BioEntry W, BioLite Net or X-Station can
control up to 4 Secure I/O devices through RS485 connection. A Secure I/O device
has 4 SW inputs. A BioStation, BioEntry Plus, BioEntry W, or BioLite Net has 2 SW
inputs.
BS_RET_CODE BS_WriteXSInputConfig( int handle, XSInputConfig*
config )
BS_RET_CODE BS_ReadXSInputConfig( int handle, XSInputConfig*
config )
Parameters
handle
Handle of the communication channel.
config
XSInputConfig is defined as follows;
struct BSInputFunction {
int functionType;
short minimumDuration;
short switchType;
int timeSchedule;
unsigned deviceID;
int reserved[4];
};
struct BSInputConfig {
enum {
NUM_OF_INTERNAL_INPUT = 4,
NUM_OF_SECURE_IO = 4,
NUM_OF_SECURE_INPUT = 4,
};
// host inputs
BSInputFunction hostTamper;
BSInputFunction hostInput[NUM_OF_HOST_INPUT];
// secure I/O
BSInputFunction secureIO[NUM_OF_SECURE_IO][NUM_OF_SECURE_INPUT];
int reserved[48];
Options
functionType
370
switchType
timeSchedule
deviceID
XSInputConfig
Fields
Options
internalTamper
internal
secureIO
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
Example
// (1) Lock the device when the internal tamper is on
// (2) Open all doors when the input port 1 of Secure I/O 0 is activated
XSInputConfig inputConfig;
memset( &inputConfig, 0, sizeof( BSInputConfig ) );
371
372
inputConfig.internalTamper.functionType = BSInputFunction::LOCK_READER;
inputConfig.internalTamper.minimumDuration = 100; // 100 ms
inputConfig.internalTamper.switchType = BSDoor::NORMALLY_OPEN;
inputConfig.internalTamper.timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
inputConfig.secureIO[0][1].functionType = BSInputFunction::EMERGENCY_OPEN;
inputConfig.secureIO[0][1].minimumDuration = 1000; // 1000 ms
inputConfig.secureIO[0][1].switchType = BSDoor::NORMALLY_OPEN;
inputConfig.secureIO[0][1].timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
373
BS_WriteBS2InputConfig/BS_ReadBS2InputConfig
A BioStation T2/D-Station/BioStation, BioEntry Plus, BioEntry W, BioLite Net or XStation can control up to 4 Secure I/O devices through RS485 connection. A
Secure I/O device has 4 SW inputs. A BioStation, BioEntry Plus, BioEntry W or
BioLite Net has 2 SW inputs.
BS_RET_CODE BS_WriteBS2InputConfig( int handle, BS2InputConfig*
config )
BS_RET_CODE BS_ReadBS2InputConfig( int handle, BS2InputConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BS2InputConfig is defined as follows;
struct BSInputFunction {
int functionType;
short minimumDuration;
short switchType;
int timeSchedule;
unsigned deviceID;
int reserved[4];
};
struct BS2InputConfig {
enum {
NUM_OF_INTERNAL_INPUT = 4,
NUM_OF_SECURE_IO = 4,
NUM_OF_SECURE_INPUT = 4,
};
// host inputs
BSInputFunction hostTamper;
BSInputFunction hostInput[NUM_OF_HOST_INPUT];
// secure I/O
BSInputFunction secureIO[NUM_OF_SECURE_IO][NUM_OF_SECURE_INPUT];
int reserved[48];
Options
functionType
374
switchType
timeSchedule
deviceID
BS2InputConfig
Fields
Options
internalTamper
internal
secureIO
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
Example
// (1) Lock the device when the internal tamper is on
// (2) Open all doors when the input port 1 of Secure I/O 0 is activated
BS2InputConfig inputConfig;
memset( &inputConfig, 0, sizeof( BSInputConfig ) );
375
376
inputConfig.internalTamper.functionType = BSInputFunction::LOCK_READER;
inputConfig.internalTamper.minimumDuration = 100; // 100 ms
inputConfig.internalTamper.switchType = BSDoor::NORMALLY_OPEN;
inputConfig.internalTamper.timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
inputConfig.secureIO[0][1].functionType = BSInputFunction::EMERGENCY_OPEN;
inputConfig.secureIO[0][1].minimumDuration = 1000; // 1000 ms
inputConfig.secureIO[0][1].switchType = BSDoor::NORMALLY_OPEN;
inputConfig.secureIO[0][1].timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
377
BS_WriteFSInputConfig/BS_ReadFSInputConfig
A FacerStation can control up to 4 Secure I/O devices through RS485 connection.
A Secure I/O device has 4 SW inputs. A BioStation, BioEntry Plus, BioEntry W, or
BioLite Net has 2 SW inputs.
BS_RET_CODE BS_WriteFSInputConfig( int handle, FSInputConfig*
config )
BS_RET_CODE BS_ReadFSInputConfig( int handle, FSInputConfig*
config )
Parameters
handle
Handle of the communication channel.
config
FSInputConfig is defined as follows;
struct BSInputFunction {
int functionType;
short minimumDuration;
short switchType;
int timeSchedule;
unsigned deviceID;
int reserved[4];
};
struct FSInputConfig {
enum {
NUM_OF_INTERNAL_INPUT = 4,
NUM_OF_SECURE_IO = 4,
NUM_OF_SECURE_INPUT = 4,
};
// host inputs
BSInputFunction hostTamper;
BSInputFunction hostInput[NUM_OF_HOST_INPUT];
// secure I/O
BSInputFunction secureIO[NUM_OF_SECURE_IO][NUM_OF_SECURE_INPUT];
int reserved[48];
};
Options
functionType
minimumDuration
378
timeSchedule
deviceID
FSInputConfig
Fields
Options
internalTamper
internal
secureIO
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
Example
// (1) Lock the device when the internal tamper is on
// (2) Open all doors when the input port 1 of Secure I/O 0 is activated
FSInputConfig inputConfig;
memset( &inputConfig, 0, sizeof( BSInputConfig ) );
inputConfig.internalTamper.functionType = BSInputFunction::LOCK_READER;
inputConfig.internalTamper.minimumDuration = 100; // 100 ms
379
380
inputConfig.internalTamper.switchType = BSDoor::NORMALLY_OPEN;
inputConfig.internalTamper.timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
inputConfig.secureIO[0][1].functionType = BSInputFunction::EMERGENCY_OPEN;
inputConfig.secureIO[0][1].minimumDuration = 1000; // 1000 ms
inputConfig.secureIO[0][1].switchType = BSDoor::NORMALLY_OPEN;
inputConfig.secureIO[0][1].timeSchedule =
BSTimeScheduleEx::ALL_TIME_SCHEDULE; // enabled always
381
BS_WriteOutputConfig/BS_ReadOutputConfig
A BioStation, BioEntry Plus, BioEntry W, or BioLite Net can control up to 4 Secure
I/O devices through RS485 connection. A Secure I/O device has 2 relay outputs. A
BioStation, BioEntry Plus, BioEntry W, or BioLite Net has 1 relay output. Users
can assign multiple output events to each replay port. If one of the given events
occurs, the configured signal will be output to the relay port.
BS_RET_CODE BS_WriteOutputConfig( int handle, BSOutputConfig*
config )
BS_RET_CODE BS_ReadOutputConfig( int handle, BSOutputConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSOutputConfig is defined as follows;
struct BSOutputEvent {
unsigned event; // (8 bit input device ID << 16) | 16 bit event ID
unsigned char outputDeviceID;
unsigned char outputRelayID;
unsigned char relayOn;
unsigned char reserved1;
unsigned short delay;
unsigned short high;
unsigned short low;
unsigned short count;
int priority; // 1(highest) ~ 99(lowest)
unsigned deviceID;
int reserved2[2];
};
struct BSEMOutputEvent {
unsigned short inputType;
unsigned short outputRelayID;
unsigned short inputDuration;
unsigned short high;
unsigned short low;
unsigned short count;
382
int reserved3[5];
};
struct BSOutputConfig {
int numOfEvent;
BSOutputEvent outputEvent[MAX_OUTPUT];
BSEMOutputEvent
emergencyEvent[BSInputConfig::NUM_OF_SECURE_IO][BSInputConfig::NUM_OF_SECUR
E_INPUT];
int reserved[31];
};
Options
event
383
BS_DEVICE_PRIMARY
BS_DEVICE_SECUREIO0
BS_DEVICE_SECUREIO1
BS_DEVICE_SECUREIO2
BS_DEVICE_SECUREIO3
BS_DEVICE_ALL
For example, when the input SW 0 of Secure IO 0 is
activated,
INPUT0_ON | (BS_DEVICE_SECUREIO0 << 16)
outputDeviceID
outputRelayID
relayOn
delay
high
low
count
high
...
delay
count
low
deviceID
384
rd
BSEMOutputEvent
In normal condition, the host device handles all inputs of Secure I/O
devices. However, when RS485 connection is disconnected, Secure I/O
devices should process their own inputs by themselves. This
configuration defines how to handle Secure I/O inputs in this case.
Fields
Options
inputType
outputRelayID
inputDuration
high
low
signal.
count
BSOutputConfig
Fields
Options
numOfEvent
outputEvent
emergencyEvent
BSEMOutputEvent.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Copyright 2013 by Suprema Inc.
Compatibility
FaceStation/BioStaton T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
Example
// (1) Generate alarm signal to the relay 0 of Secure I/O 0 when
//
anti-passback is violated.
// (2) Turn off the above alarm when the input 0 of Secure I/O 0 is
//
activated.
BSOutputConfig outputConfig;
memset( &outputConfig, 0, sizeof( BSOutputConfig ) );
outputConfig.numOfEvent = 2;
outputConfig.outputEvent[0].event = BSOutputEvent::APB_ZONE_EVENT |
(BS_DEVICE_ALL << 16);
outputConfig.outputEvent[0].outputDeviceID = BS_DEVICE_SECUREIO0;
outputConfig.outputEvent[0].outputRelayID = BS_PORT_RELAY0;
outputConfig.outputEvent[0].relayOn = true;
outputConfig.outputEvent[0].delay = 0;
outputConfig.outputEvent[0].high = 100; // 100 ms
outputConfig.outputEvent[0].low = 100; // 100 ms
outputConfig.outputEvent[0].count = 0; // indefinite
outputConfig.outputEvent[0].priority = 1;
outputConfig.outputEvent[1].event = BSOutputEvent::INPUT0_ON |
(BS_DEVICE_SECUREIO0 << 16);
outputConfig.outputEvent[0].outputDeviceID = BS_DEVICE_SECUREIO0;
outputConfig.outputEvent[0].outputRelayID = BS_PORT_RELAY0;
outputConfig.outputEvent[0].relayOn = false;
outputConfig.outputEvent[0].priority = 1;
385
BS_WriteEntranceLimitConfig/BS_ReadEntranceLimitConfig
You can apply entrance limitation rules to each device.
BS_RET_CODE BS_WriteEntranceLimitConfig( int handle,
BSEntranceLimit* config )
BS_RET_CODE BS_ReadEntranceLimitConfig( int handle,
BSEntranceLimit* config )
Parameters
handle
Handle of the communication channel.
config
BSEntranceLimit is defined as follows;
typedef struct {
int minEntryInterval; // 0 for no limit
int numOfEntranceLimit; // MAX 4
int maxEntry[4]; // 0 (no limit) ~ 16
unsigned entryLimitInterval[4];
int defaultAccessGroup;
int bypassGroupId;
int entranceLimitReserved[6];
} BSEntranceLimit;
Options
minEntryInterval
numOfEntranceLimit
maxEntry
entryLimitInterval
bypassGroupId
defaultAccessGroup
386
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation
387
388
BS_WriteDSSaveImageEventConfig/BS_ReadDSSaveImageEventCo
nfig
You can write/read the event and shcedule of a D-Station using
BS_WriteDSSaveImageConfig/BS_ReadDSSaveImageConfig.
BS_RET_CODE BS_WriteDSSaveImageEventConfig( int handle,
DSSaveImageEventConfig* config )
BS_RET_CODE BS_ReadDSSaveImageConfig( int handle,
DSSaveImageEventConfig * config )
Parameters
handle
Handle of the communication channel.
config
DSSaveImageEventConfig is defined as follows;
typedef struct {
enum
{
NUM_OF_IMG_EVENT = 256,
};
unsigned short event[NUM_OF_IMG_EVENT];
unsigned short reserved[64];
unsigned short schedule[NUM_OF_IMG_EVENT];
unsigned short reserved2[64];
} DSSaveImageEventConfig;
Options
event
schedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
Copyright 2013 by Suprema Inc.
389
390
BS_WriteXSSaveImageEventConfig/BS_ReadXSSaveImageEventCon
fig
You can write/read the event and shcedule of a D-Station using
BS_WriteXSSaveImageConfig/BS_ReadXSSaveImageConfig.
BS_RET_CODE BS_WriteXSSaveImageEventConfig( int handle,
XSSaveImageEventConfig* config )
BS_RET_CODE BS_ReadXSSaveImageConfig( int handle,
XSSaveImageEventConfig * config )
Parameters
handle
Handle of the communication channel.
config
XSSaveImageEventConfig is defined as follows;
typedef struct {
enum
{
NUM_OF_IMG_EVENT = 256,
};
unsigned short event[NUM_OF_IMG_EVENT];
unsigned short reserved[64];
unsigned short schedule[NUM_OF_IMG_EVENT];
unsigned short reserved2[64];
} DSSaveImageEventConfig;
Options
event
schedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
Copyright 2013 by Suprema Inc.
391
392
BS_WriteBS2SaveImageEventConfig/BS_ReadBS2SaveImageEventC
onfig
You can write/read the event and shcedule of a BioStation T2 using
BS_WriteBS2SaveImageConfig/BS_ReadBS2SaveImageConfig.
BS_RET_CODE BS_WriteBS2SaveImageEventConfig( int handle,
BS2SaveImageEventConfig* config )
BS_RET_CODE BS_ReadBS2SaveImageConfig( int handle,
BS2SaveImageEventConfig * config )
Parameters
handle
Handle of the communication channel.
config
BS2SaveImageEventConfig is defined as follows;
typedef struct {
enum
{
NUM_OF_IMG_EVENT = 256,
};
unsigned short event[NUM_OF_IMG_EVENT];
unsigned short reserved[64];
unsigned short schedule[NUM_OF_IMG_EVENT];
unsigned short reserved2[64];
} BS2SaveImageEventConfig;
Options
event
schedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
Copyright 2013 by Suprema Inc.
393
394
BS_WriteFSSaveImageEventConfig/BS_ReadFSSaveImageEventCon
fig
You can write/read the event and shcedule of a FaceStation using
BS_WriteFSSaveImageConfig/BS_ReadFSSaveImageConfig.
BS_RET_CODE BS_WriteFSSaveImageEventConfig( int handle,
FSSaveImageEventConfig* config )
BS_RET_CODE BS_ReadFSSaveImageConfig( int handle,
FSSaveImageEventConfig * config )
Parameters
handle
Handle of the communication channel.
config
FSSaveImageEventConfig is defined as follows;
typedef struct {
enum
{
NUM_OF_IMG_EVENT = 256,
};
unsigned short event[NUM_OF_IMG_EVENT];
unsigned short reserved[64];
unsigned short schedule[NUM_OF_IMG_EVENT];
unsigned short reserved2[64];
} FSSaveImageEventConfig;
Options
event
schedule
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
Copyright 2013 by Suprema Inc.
395
BS_WriteDSInterphoneConfig/BS_ReadDSInterphoneConfig
You can write/read the interphone configuration of a D-Station using
BS_WriteDSInterphoneConfig/BS_ReadDSInterphoneConfig.
BS_RET_CODE BS_WriteDSInterphoneConfig( int handle,
DSInterphoneConfig* config )
BS_RET_CODE BS_ReadDSInterphoneConfig( int handle,
DSInterphoneConfig * config )
Parameters
handle
Handle of the communication channel.
config
DSInterphoneConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
AN_INTERPHONE = 1,
IP_INTERPHONE = 2,
MAX_NETWORK_ADDR_LEN = 32,
MAX_SIP_SERVER_ID_LEN = 16,
MAX_SIP_SERVER_PASSWORD_LEN = 16
MAX_SIP_PHONE_NO_LEN = 32,
MAX_SIP_DISPLAY_NAME_LEN = 32,
};
unsigned int type;
char videoIpAddress[MAX_NETWORK_ADDR_LEN];
unsigned int videoPort;
char sipServerAddress[MAX_NETWORK_ADDR_LEN];
unsigned int sipServerPort;
char sipServerId[MAX_SIP_SERVER_ID_LEN];
char sipServerPassword[MAX_SIP_SERVER_PASSWORD_LEN];
char sipPhoneNo[MAX_SIP_PHONE_NO_LEN];
char sipDisplayName[MAX_SIP_DISPLAY_NAME_LEN];
unsigned char speakerGain;
unsigned char micGain;
unsigned int reserved[14];
} DSInterphoneConfig;
396
Options
type
videoIPAddress
videoPort
sipServerAddress
sipServerPort
sipServerId
sipServerPassword
sipPhoneNo
sipDisplayName
speakerGain
micGain
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station
397
BS_WriteXSInterphoneConfig/BS_ReadXSInterphoneConfig
You can write/read the interphone configuration of a X-Station using
BS_WriteXSInterphoneConfig/BS_ReadXSInterphoneConfig.
BS_RET_CODE BS_WriteXSInterphoneConfig( int handle,
XSInterphoneConfig* config )
BS_RET_CODE BS_ReadXSInterphoneConfig( int handle,
XSInterphoneConfig * config )
Parameters
handle
Handle of the communication channel.
config
XSInterphoneConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
AN_INTERPHONE = 1,
IP_INTERPHONE = 2,
MAX_NETWORK_ADDR_LEN = 32,
MAX_SIP_SERVER_ID_LEN = 16,
MAX_SIP_SERVER_PASSWORD_LEN = 16
MAX_SIP_PHONE_NO_LEN = 32,
MAX_SIP_DISPLAY_NAME_LEN = 32,
};
unsigned int type;
char videoIpAddress[MAX_NETWORK_ADDR_LEN];
unsigned int videoPort;
char sipServerAddress[MAX_NETWORK_ADDR_LEN];
unsigned int sipServerPort;
char sipServerId[MAX_SIP_SERVER_ID_LEN];
char sipServerPassword[MAX_SIP_SERVER_PASSWORD_LEN];
char sipPhoneNo[MAX_SIP_PHONE_NO_LEN];
char sipDisplayName[MAX_SIP_DISPLAY_NAME_LEN];
unsigned char speakerGain;
unsigned char micGain;
unsigned int reserved[14];
} XSInterphoneConfig;
398
Options
type
videoIPAddress
videoPort
sipServerAddress
sipServerPort
sipServerId
sipServerPassword
sipPhoneNo
sipDisplayName
speakerGain
micGain
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
399
BS_WriteBS2InterphoneConfig/BS_ReadBS2InterphoneConfig
You can write/read the interphone configuration of a BioStation T2 using
BS_WriteBS2InterphoneConfig/BS_ReadBS2InterphoneConfig.
BS_RET_CODE BS_WriteBS2InterphoneConfig( int handle,
BS2InterphoneConfig* config )
BS_RET_CODE BS_ReadBS2InterphoneConfig( int handle,
BS2InterphoneConfig * config )
Parameters
handle
Handle of the communication channel.
config
BS2InterphoneConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
AN_INTERPHONE = 1,
IP_INTERPHONE = 2,
MAX_NETWORK_ADDR_LEN = 32,
MAX_SIP_SERVER_ID_LEN = 16,
MAX_SIP_SERVER_PASSWORD_LEN = 16
MAX_SIP_PHONE_NO_LEN = 32,
MAX_SIP_DISPLAY_NAME_LEN = 32,
};
unsigned int type;
char videoIpAddress[MAX_NETWORK_ADDR_LEN];
unsigned int videoPort;
char sipServerAddress[MAX_NETWORK_ADDR_LEN];
unsigned int sipServerPort;
char sipServerId[MAX_SIP_SERVER_ID_LEN];
char sipServerPassword[MAX_SIP_SERVER_PASSWORD_LEN];
char sipPhoneNo[MAX_SIP_PHONE_NO_LEN];
char sipDisplayName[MAX_SIP_DISPLAY_NAME_LEN];
unsigned char speakerGain;
unsigned char micGain;
unsigned int reserved[14];
} BS2InterphoneConfig;
400
Options
type
videoIPAddress
videoPort
sipServerAddress
sipServerPort
sipServerId
sipServerPassword
sipPhoneNo
sipDisplayName
speakerGain
micGain
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2
401
BS_WriteFSInterphoneConfig/BS_ReadFSInterphoneConfig
You can write/read the interphone configuration of a FaceStation using
BS_WriteFSInterphoneConfig/BS_ReadFSInterphoneConfig.
BS_RET_CODE BS_WriteFSInterphoneConfig( int handle,
FSInterphoneConfig* config )
BS_RET_CODE BS_ReadFSInterphoneConfig( int handle,
FSInterphoneConfig * config )
Parameters
handle
Handle of the communication channel.
config
FSInterphoneConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
AN_INTERPHONE = 1,
IP_INTERPHONE = 2,
MAX_NETWORK_ADDR_LEN = 32,
MAX_SIP_SERVER_ID_LEN = 16,
MAX_SIP_SERVER_PASSWORD_LEN = 16
MAX_SIP_PHONE_NO_LEN = 32,
MAX_SIP_DISPLAY_NAME_LEN = 32,
};
unsigned int type;
char videoIpAddress[MAX_NETWORK_ADDR_LEN];
unsigned int videoPort;
char sipServerAddress[MAX_NETWORK_ADDR_LEN];
unsigned int sipServerPort;
char sipServerId[MAX_SIP_SERVER_ID_LEN];
char sipServerPassword[MAX_SIP_SERVER_PASSWORD_LEN];
char sipPhoneNo[MAX_SIP_PHONE_NO_LEN];
char sipDisplayName[MAX_SIP_DISPLAY_NAME_LEN];
unsigned char speakerGain;
unsigned char micGain;
unsigned int reserved[14];
} FSInterphoneConfig;
402
Options
type
videoIPAddress
videoPort
sipServerAddress
sipServerPort
sipServerId
sipServerPassword
sipPhoneNo
sipDisplayName
speakerGain
micGain
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation
403
BS_WriteXSPINOnlyModeConfig/BS_ReadXSPINOnlyModeConfig
You can write/read the PIN Only mode configuration of a X-Station using
BS_WriteXSPINOnlyModeConfig/BS_ReadXSPINOnlyModeConfig.
BS_RET_CODE BS_WriteXSPINOnlyModeConfig( int handle,
XSPINOnlyModeConfig* config )
BS_RET_CODE BS_ReadFSInterphoneConfig( int handle,
XSPINOnlyModeConfig* config )
Parameters
handle
Handle of the communication channel.
config
XSPINOnlyConfig is defined as follows;
typedef struct {
enum
{
NOT_USE = 0,
USE = 1,
MAX_GLOBAL_PIN_LEN = 8,
};
unsigned char usePINOnlyMode;
char globalPIN1[MAX_GLOBAL_PIN_LEN];
char globalPIN2[MAX_GLOBAL_PIN_LEN];
char globalPIN3[MAX_GLOBAL_PIN_LEN];
} XSPINOnlyModeConfig;
Options
usePINOnlyMode
globalPIN1
Specify a password1.
globalPIN2
specify a password2.
globalPIN3
specify a password3
404
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
X-Station
405
406
Configuration Type
Structure
Xpass,
BEPLUS_CONFIG
BEConfigData
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
Xpass
BEPLUS_CONFIG
BEConfigData
Slim
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioEntry
BEPLUS_CONFIG
BEConfigData
Plus
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioEntry
BEPLUS_CONFIG
BEConfigData
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioLite
BIOLITE_CONFIG
BEConfigDataBLN
Net
BIOLITE_CONFIG_SYS_INFO
BESysInfoDataBLN
BIOLITE_CONFIG_CARD_READER
BSCardReaderConfigData
407
BS_WriteConfig.
size
Size of the configuration data.
data
Pointer to the configuration data. BEConfigData, BESysInfoData, and
BSCardReaderConfigData are defined as follows;
struct BEOutputPattern {
int repeat; // 0: indefinite, -1: don't user
int arg[MAX_ARG]; // color for LED, frequency for Buzzer, -1 for last
short high[MAX_ARG]; // msec
short low[MAX_ARG]; // msec
};
struct BELEDBuzzerConfig {
int reserved[4];
BEOutputPattern ledPattern[MAX_SIGNAL];
BEOutputPattern buzzerPattern[MAX_SIGNAL];
unsigned short signalReserved[MAX_SIGNAL];
};
typedef struct {
unsigned cardID;
unsigned char customID;
unsigned char commandType;
unsigned char needAdminFinger;
unsigned char reserved;
unsigned fullCardCustomID;
} BECommandCard;
typedef struct {
// header
unsigned magicNo;
int version;
unsigned timestamp;
unsigned checksum;
int headerReserved[4];
// operation mode
int opMode[4];
int opModeSchedule[4];
unsigned char opDualMode[4];
int opModePerUser; /* PROHIBITED, ALLOWED */
unsigned char useWiegandCardBypass; // 1 - use, 0 - not use
unsigned char dualModeOption; //1 - use, 0 - not use
unsigned char opReserved1[2];
408
int opReserved[6];
bool useDHCP;
unsigned ipAddr;
unsigned gateway;
unsigned subnetMask;
unsigned serverIpAddr;
int port;
bool useServer;
bool synchTime;
int support100BaseT;
int ipReserved[7];
// fingerprint
int securityLevel;
int fastMode;
int fingerReserved1
int timeout; // 1 ~ 20 sec
int matchTimeout; // Infinite(0) ~ 10 sec
int templateType;
int fakeDetection;
bool useServerMatching;
int fingerReserved[8];
// I/O
BSInputConfig inputConfig;
BSOutputConfig outputConfig;
BSDoorConfig doorConfig;
int liftRelayDuration; // 1 ~ 20 sec
unsigned char ioReserved1[2];
unsigned char isFireAlarm;
unsigned char ioReserved2;
int ioReserved;
//extended serial
unsigned hostID;
unsigned slaveIDEx[MAX_485_DEVICE];
unsigned slaveType;
// 0 : BST, 1 : BEPL
// serial
int serialMode;
int serialBaudrate;
unsigned char serialReserved1;
unsigned char secureIO; // 0x01 - Secure I/O 0, 0x02, 0x04, 0x08
unsigned char useTermination;
unsigned char serialReserved2[5];
unsigned slaveID; // 0 for no slave
int reserved1[17];
// entrance limit
int minEntryInterval; // 0 for no limit
int numOfEntranceLimit; // MAX 4
409
Options
repeat
arg
410
low
BELEDBuzzerConfig
You can define the output patterns of LED or buzzer for specific
events. Refer to the enumerations of BELEDBuzzerConfig in
BS_BEPlus.h for the pre-defined event types. For example, the default
patterns for normal status and authenticaion fail are defined as
follows;
// Normal
// LED: Indefinitely blinking Blue(2sec)/Light Blue(2sec)
// Buzzer: None
ledPattern[BELEDBuzzerConfig::STATUS_NORMAL].repeat = 0;
ledPattern[BELEDBuzzerConfig::STATUS_NORMAL].arg[0] =
BEOutputPattern::BLUE;
ledPattern[BELEDBuzzerConfig::STATUS_NORMAL].high[0] = 2000;
ledPattern[BELEDBuzzerConfig::STATUS_NORMAL].arg[1] =
BEOutputPattern::CYAN;
ledPattern[BELEDBuzzerConfig::STATUS_NORMAL].high[1] = 2000;
ledPattern[BELEDBuzzerConfig::STATUS_NORMAL].arg[2] = -1;
buzzerPattern[BELEDBuzzerConfig::STATUS_NORMAL].repeat = -1;
// Authentication Fail
// LED: Red for 1 second
// Buzzer: Three high-tone beeps
ledPattern[BELEDBuzzerConfig::AUTH_FAIL].repeat = 1;
ledPattern[BELEDBuzzerConfig::AUTH_FAIL].arg[0] =
BEOutputPattern::RED;
ledPattern[BELEDBuzzerConfig::AUTH_FAIL].high[0] = 1000;
ledPattern[BELEDBuzzerConfig::AUTH_FAIL].arg[1] = -1;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].repeat = 1;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].arg[0] =
BEOutputPattern::HIGH_FREQ;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].high[0] = 100;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].low[0] = 20;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].arg[1] =
BEOutputPattern::HIGH_FREQ;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].high[1] = 100;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].low[1] = 20;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].arg[2] =
BEOutputPattern::HIGH_FREQ;
buzzerPattern[BELEDBuzzerConfig::AUTH_FAIL].high[2] = 100;
Fields
Options
ledPattern
411
412
BECommandCard
BioEntry Plus supports command cards with which you can
enroll/delete users at devices directly.
Fields
Options
cardID
customID
commandType
needAdminFinger
ENROLL_CARD
DELETE_CARD
DELETE_ALL_CARD
fullCardCustomID
BEConfigData
Fields
Options
magicNo
version
timestamp
checksum
Operation Mode
opMode
opDualMode
opModePerUser
Ethernet
useDHCP
ipAddr
gateway
Gateway address.
subnetMask
Subnet mask.
port
useServer
serverIPAddr
synchTime
Support100BaseT
Fingerprint
securityLevel
fastMode
413
414
FAST_MODE_NORMAL
FAST_MODE_FAST
FAST_MODE_FASTER
timeout
matchTimeout
templateType
TEMPLATE_SUPREMA
TEMPLATE_SIF ISO 19794-2
TEMPLATE_ANSI378
fakeDetection
useServerMatching
I/O
inputConfig
See BSWriteInputConfig.
outputConfig
See BSWriteOutputConfig.
doorConfig
See BSWriteDoorConfig.
Serial
hostID
slaveIDEx
slaveType
serialMode
415
PC.
serialBaudrate
secureIO
slaveID
Not used.
Entrance Limitation
minEntryInterval
numOfEntranceLimit
device. See
maxEntry
entryLimitInterval
bypassGroupId
Command Card
numOfCommandCard
commandCard
See BECommandCard.
TNA
tnaMode
tnaEvent
TNA_NONE
0xffff
TNA_FIX_IN
BS_TNA_F1
TNA_FIX_OUT
BS_TNA_F2
TNA_AUTO
If it is in
autoInSchedule,
416
BS_TNA_F1. If it is in
autoOutSchedule,
BS_TNA_F2. Otherwise,
0xffff.
autoInSchedule
autoOutSchedule
User
defaultAG
Wiegand
useWiegandOutput
useWiegandInput
wiegandMode
wiegandReaderID
wiegandIdType
wiegandConfig
See BS_WriteWiegandConfig.
See BELEDBuzzerConfig.
Card ID Format
cardIdFormatType
cardIdByteOrder
cardIdBitOrder
BSCardReaderDoorConfig
Fields
Options
numOfCardReader
readerID
door
apbType
Not used.
apbResetTime
Not used.
BSCardReaderInputConfig
Fields
Options
numOfCardReader
readerID
input
BSCardReaderOutputConfig
Fields
Options
numOfCardReader
readerID
417
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus/BioEntry W/Xpass/Xpass Slim
418
419
Configuration Type
Structure
Xpass
BEPLUS_CONFIG
BEConfigData
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
Xpass
BEPLUS_CONFIG
BEConfigData
Slim
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioEntry
BEPLUS_CONFIG
BEConfigData
Plus
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioEntry
BEPLUS_CONFIG
BEConfigData
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioLite
BIOLITE_CONFIG
BEConfigDataBLN
Net
BIOLITE_CONFIG_SYS_INFO
BESysInfoDataBLN
BIOLITE_CONFIG_CARD_READER
BSCardReaderConfigData
420
BS_WriteConfig.
size
Size of the configuration data.
data
Pointer to the configuration data. BEConfigDataBLN and
BESysInfoDataBLN, and BSCardReaderConfigData are defined as follows;
struct BEOutputPatternBLN {
int repeat; // 0: indefinite, -1: don't user
int priority; // not used
int arg[MAX_ARG]; // color for LED, frequency for Buzzer, -1 for last
short high[MAX_ARG]; // msec
short low[MAX_ARG]; // msec
};
struct BELEDBuzzerConfigBLN {
int reserved[4];
BEOutputPatternBLN ledPattern[MAX_SIGNAL];
BEOutputPatternBLN buzzerPattern[MAX_SIGNAL];
BEOutputPatternBLN lcdLedPattern[MAX_SIGNAL];
BEOutputPatternBLN keypadLedPattern[MAX_SIGNAL];
unsigned short signalReserved[MAX_SIGNAL];
};
#define MAX_TNA_FUNCTION_KEY 16
#define MAX_TNA_EVENT_LEN 16
struct BETnaEventConfig {
unsigned char enabled[MAX_TNA_FUNCTION_KEY];
unsigned char useRelay[MAX_TNA_FUNCTION_KEY];
unsigned short key[MAX_TNA_FUNCTION_KEY]; // not used
char eventStr[MAX_TNA_FUNCTION_KEY][MAX_TNA_EVENT_LEN];
};
struct BETnaEventExConfig {
int fixedTnaIndex;
int manualTnaIndex;
int timeSchedule[MAX_TNA_FUNCTION_KEY];
};
typedef struct {
// header
unsigned magicNo;
int version;
unsigned timestamp;
unsigned checksum;
421
int headerReserved[4];
// operation mode
int opMode[MAX_OPMODE];
int opModeSchedule[MAX_OPMODE];
unsigned char opDualMode[MAX_OPMODE]; // DoubleMode[4];
unsigned char useWiegandCardBypass;
//extended serial
unsigned hostID;
422
unsigned slaveIDEx[MAX_485_DEVICE];
unsigned slaveType;
// 0 : BST, 1 : BEPL
// serial
int serialMode;
int serialBaudrate;
unsigned char serialReserved1;
unsigned char secureIO; // 0x01 - Secure I/O 0, 0x02, 0x04, 0x08
unsigned char serialReserved2[6];
unsigned slaveID; // 0 for no slave
int reserved1[17];
// entrance limit
int minEntryInterval; // 0 for no limit
int numOfEntranceLimit; // MAX 4
int maxEntry[4]; // 0 (no limit) ~ 16
unsigned entryLimitInterval[4];
int bypassGroupId;
int entranceLimitReserved[7];
// command card: NOT USED for BioLite Net
int numOfCommandCard;
BECommandCard commandCard[MAX_COMMAND_CARD];
int commandCardReserved[3];
// tna
int tnaMode;
int autoInSchedule; // not used
int autoOutSchedule; // not used
int tnaChange;
int tnaReserved[4];
// user
int defaultAG;
int userReserved[7];
int reserved2[22];
// wiegand
bool useWiegandOutput;
bool useWiegandInput;
int wiegandMode;
unsigned wiegandReaderID;
int wiegandReserved[3];
int wiegandIdType;
BSWiegandConfig wiegandConfig;
// LED/Buzzer
BELEDBuzzerConfigBLN ledBuzzerConfig;
int reserved3[38];
int backlightMode;
int soundMode;
// Tna Event
BETnaEventConfig tnaEventConfig;
423
Options
repeat
arg
high
low
BELEDBuzzerConfigBLN
You can define the output patterns of LED or buzzer for specific
events. Refer to the enumerations of BELEDBuzzerConfigBLN in
BS_BEPlus.h for the pre-defined event types. For example, the default
patterns for normal status and authenticaion fail are defined as
follows;
// Normal
// LED: Indefinitely blinking Blue(2sec)/Light Blue(2sec)
// Buzzer: None
ledPattern[BELEDBuzzerConfigBLN::STATUS_NORMAL].repeat = 0;
ledPattern[BELEDBuzzerConfigBLN::STATUS_NORMAL].arg[0] =
BEOutputPatternBLN::BLUE;
ledPattern[BELEDBuzzerConfigBLN::STATUS_NORMAL].high[0] =
2000;
ledPattern[BELEDBuzzerConfigBLN::STATUS_NORMAL].arg[1] =
424
Fields
Options
ledPattern
buzzerPattern
lcdLedPattern
keypadLedPattern
BETnaEventConfig
Fields
Options
enabled
useRelay
eventStr
425
426
BETnaEventExConfig
The settings are effective only if the tnaMode of BEConfigDataBLN
is set to BS_TNA_FUNCTION_KEY.
Fields
Options
fixedTnaIndex
manualTnaIndex
timeSchedule
BEConfigDataBLN
Fields
Options
magicNo
version
timestamp
checksum
Operation Mode
opMode
opModeSchedule
opModePerUser
identificationMode
identificationMode
Schedule
Ethernet
useDHCP
ipAddr
gateway
Gateway address.
subnetMask
Subnet mask.
port
useServer
serverIPAddr
synchTime
Support100BaseT
Fingerprint
securityLevel
427
428
timeout
matchTimeout
templateType
TEMPLATE_SUPREMA
TEMPLATE_SIF ISO 19794-2
TEMPLATE_ANSI378
fakeDetection
useServerMatching
useCheckDuplicate
I/O
inputConfig
See BSWriteInputConfig.
outputConfig
See BSWriteOutputConfig.
doorConfig
See BSWriteDoorConfig.
Serial
hostID
slaveIDEx
serialMode
429
of the followings;
SERIAL_DISABLED: not used.
SERIAL_IO_HOST_EX: acts as a host device and
controls all the I/O operations of Secure I/O devices and
slave devices connected to the same RS485 connection.
SERIAL_IO_SLAVE_EX: acts as a slave device.
SERIAL_PC: used as a communication channel to host
PC.
serialBaudrate
secureIO
slaveID
Not used.
useTermination
Entrance Limitation
minEntryInterval
numOfEntranceLimit
device. See
maxEntry
entryLimitInterval
bypassGroupId
TNA
tnaMode
430
User
defaultAG
Wiegand
useWiegandOutput
useWiegandInput
wiegandMode
wiegandReaderID
wiegandIdType
See BS_WriteWiegandConfig.
LED/Buzzer
ledBuzzerConfig
See BELEDBuzzerConfigBLN.
Misc.
backlightMode
ALWAYS_ON
ALWAYS_OFF
ON_AT_USE triggered by user input
soundMode
ALWAYS_ON
ALWAYS_OFF
TNA Ex.
tnaEventConfig
See BETnaEventConfig.
tnaEventExConfig
See BETnaEventExConfig.
Card ID Format
cardIdFormatType
cardIdByteOrder
cardIdBitOrder
BSCardReaderDoorConfig
Fields
Options
numOfCardReader
readerID
door
apbType
Not used.
apbResetTime
Not used.
431
Options
numOfCardReader
readerID
input
BSCardReaderOutputConfig
Fields
Options
numOfCardReader
readerID
output
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioLite Net
432
433
Configuration Type
Structure
Xpass
BEPLUS_CONFIG
BEConfigData
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
Xpass
BEPLUS_CONFIG
BEConfigData
Slim
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioEntry
BEPLUS_CONFIG
BEConfigData
Plus
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioEntry
BEPLUS_CONFIG
BEConfigData
BEPLUS_CONFIG_SYS_INFO
BESysInfoData
BEPLUS_CONFIG_CARD_READER
BSCardReaderConfigData
BioLite
BIOLITE_CONFIG
BEConfigDataBLN
Net
BIOLITE_CONFIG_SYS_INFO
BESysInfoDataBLN
BIOLITE_CONFIG_CARD_READER
BSCardReaderConfigData
434
BS_WriteConfig.
size
Size of the configuration data.
data
Pointer to the configuration data. BEConfigData, BESysInfoData, and
BSCardReaderConfigData are defined as follows;
struct BEOutputPattern {
int repeat; // 0: indefinite, -1: don't user
int arg[MAX_ARG]; // color for LED, frequency for Buzzer, -1 for last
short high[MAX_ARG]; // msec
short low[MAX_ARG]; // msec
};
struct BELEDBuzzerConfig {
int reserved[4];
BEOutputPattern ledPattern[MAX_SIGNAL];
BEOutputPattern buzzerPattern[MAX_SIGNAL];
unsigned short signalReserved[MAX_SIGNAL];
};
typedef struct {
unsigned cardID;
unsigned char customID;
unsigned char commandType;
unsigned char needAdminFinger;
unsigned char reserved[5];
} BECommandCard;
typedef struct {
// header
unsigned magicNo;
int version;
unsigned timestamp;
unsigned checksum;
int headerReserved[4];
// operation mode
int opMode[4];
int opModeSchedule[4];
unsigned char opDualMode[4];
int opModePerUser; /* PROHIBITED, ALLOWED */
unsigned char useWiegandCardBypass; // 1 - use, 0 - not use
unsigned char dualModeOption; //1 - use, 0 - not use
unsigned char opReserved1[2];
int opReserved2[6];
435
int opReserved[6];
bool useDHCP;
unsigned ipAddr;
unsigned gateway;
unsigned subnetMask;
unsigned serverIpAddr;
int port;
bool useServer;
bool synchTime;
int support100BaseT;
int mtuSize; // 1024 ~ 1460 byte
int ipReserved[6];
// fingerprint
char reserved3[1];
int reserved4[15];
// I/O
BSInputConfig inputConfig;
BSOutputConfig outputConfig;
BSDoorConfig doorConfig;
int liftRelayDuration; // 1 ~ 20 sec
unsigned char ioReserved1[2];
unsigned char isFireAlarm;
unsigned char ioReserved2;
int ioReserved;
//extended serial
unsigned hostID;
unsigned slaveIDEx[MAX_485_DEVICE];
unsigned slaveType;
// 0 : BST, 1 : BEPL
// serial
int serialMode;
int serialBaudrate;
unsigned char serialReserved1;
unsigned char secureIO; // 0x01 - Secure I/O 0, 0x02, 0x04, 0x08
unsigned char useTermination;
unsigned char serialReserved2[5];
unsigned slaveID; // 0 for no slave
int reserved1[17];
// entrance limit
int minEntryInterval; // 0 for no limit
int numOfEntranceLimit; // MAX 4
int maxEntry[4]; // 0 (no limit) ~ 16
unsigned entryLimitInterval[4];
int bypassGroupId;
int entranceLimitReserved[7];
// command card
int numOfCommandCard;
436
Options
repeat
arg
high
low
BELEDBuzzerConfig
You can define the output patterns of LED or buzzer for specific
Copyright 2013 by Suprema Inc.
437
Fields
Options
ledPattern
buzzerPattern
BECommandCard
Xpass supports command cards with which you can enroll/delete users
Copyright 2013 by Suprema Inc.
438
439
at devices directly.
Fields
Options
cardID
customID
commandType
needAdminFinger
ENROLL_CARD
DELETE_CARD
DELETE_ALL_CARD
BEConfigData
Fields
Options
magicNo
version
timestamp
checksum
Operation Mode
opMode
opModeSchedule
opDualMode
opModePerUser
Not used.
Ethernet
useDHCP
ipAddr
gateway
Gateway address.
subnetMask
Subnet mask.
port
440
serverIPAddr
synchTime
Support100BaseT
Fingerprint
securityLevel
Not used.
fastMode
Not used.
timeout
Not used.
matchTimeout
Not used.
templateType
Not used.
fakeDetection
Not used.
useServerMatching
Not used.
I/O
inputConfig
See BSWriteInputConfig.
outputConfig
See BSWriteOutputConfig.
doorConfig
See BSWriteDoorConfig.
Serial
hostID
slaveIDEx
slaveType
serialMode
441
secureIO
slaveID
Not used.
Entrance Limitation
minEntryInterval
numOfEntranceLimit
device. See
maxEntry
entryLimitInterval
bypassGroupId
Command Card
numOfCommandCard
commandCard
See BECommandCard.
TNA
tnaMode
tnaEvent
TNA_NONE
0xffff
TNA_FIX_IN
BS_TNA_F1
TNA_FIX_OUT
BS_TNA_F2
TNA_AUTO
If it is in
442
autoInSchedule,
BS_TNA_F1. If it is in
autoOutSchedule,
BS_TNA_F2. Otherwise,
0xffff.
autoInSchedule
autoOutSchedule
User
defaultAG
Wiegand
useWiegandOutput
useWiegandInput
wiegandMode
wiegandReaderID
wiegandIdType
See BS_WriteWiegandConfig.
LED/Buzzer
ledBuzzerConfig
See BELEDBuzzerConfig.
Card ID Format
cardIdFormatType
cardIdByteOrder
cardIdBitOrder
BSCardReaderDoorConfig
Fields
Options
numOfCardReader
readerID
door
apbType
Not used.
apbResetTime
Not used.
BSCardReaderInputConfig
Fields
Options
numOfCardReader
readerID
input
BSCardReaderOutputConfig
Fields
Options
numOfCardReader
443
output
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
Xpass/Xpass Slim
444
BS_GetAvailableSpace
Checks how much space is available in flash memory.
BS_RET_CODE BS_GetAvailableSpace( int handle, int* availableSpace,
int* totalSpace )
Parameters
handle
Handle of the communication channel.
availableSpace
Pointer to the available space in bytes.
totalSpace
Pointer to the total space in bytes.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
445
446
BS_WriteCardReaderConfig/BS_ReadCardReaderConfig
You can write/read configurations of the input/output/door of attached 3rd party RF
device.
BS_RET_CODE BS_WriteCardReaderConfig( int handle,
BSCardReaderConfigData* config )
BS_RET_CODE BS_ReadCardReaderConfig( int handle,
BSCardReaderConfigData* config )
Parameters
handle
Handle of the communication channel.
config
BSCardReaderConfigData is defined as follows;
struct BSCardReaderDoorConfig {
int numOfCardReader;
unsigned readerID[MAX_READER];
BSDoor door[MAX_READER];
int apbType;
int apbResetTime;
};
struct BSCardReaderInputConfig {
int numOfCardReader;
unsigned readerID[MAX_READER];
BSInputConfig input[MAX_READER];
};
struct BSCardReaderOutputConfig {
int numOfCardReader;
unsigned readerID[MAX_READER];
BSOutputConfig output[MAX_READER];
};
struct BSCardReaderConfigData {
BSCardReaderInputConfig inputConfig;
BSCardReaderOutputConfig outputConfig;
BSCardReaderDoorConfig doorConfig;
};
Options
numOfCardReader
readerID
door
apbType
Not used.
apbResetTime
Not used.
BSCardReaderInputConfig
Fields
Options
numOfCardReader
readerID
input
BSCardReaderOutputConfig
Fields
Options
numOfCardReader
readerID
output
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
D-Station/BioStation
447
3.8.
448
These APIs provide access control features such as time schedule and access
group.
449
BS_AddTimeScheduleEx
Up to 128 time schedules can be stored to a device. Each time schedule consists of
7 daily schedules and two optional holiday schedules. And each daily schedule may
have up to 5 time segments. There are also two pre-defined schedules,
NO_TIME_SCHEDULE and ALL_TIME_SCHEDULE, which cannot be updated nor
deleted.
BS_RET_CODE BS_AddTimeScheduleEx( int handle, BSTimeScheduleEx*
schedule )
Parameters
handle
Handle of the communication channel.
schedule
Pointer to the time schedule to be added. BSTimeScheduleEx is defined as
follows;
struct BSTimeCodeElemEx {
unsigned short startTime;
unsigned short endTime;
};
struct BSTimeCodeEx {
BSTimeCodeElemEx codeElement[BS_TIMECODE_PER_DAY_EX];
};
struct BSTimeScheduleEx {
enum {
// pre-defined schedule ID
NO_TIME_SCHEDULE
= 0xFD,
ALL_TIME_SCHEDULE
= 0xFE,
NUM_OF_DAY = 9,
NUM_OF_HOLIDAY = 2,
SUNDAY
= 0,
MONDAY
= 1,
TUESDAY
= 2,
WEDNESDAY
= 3,
THURSDAY
= 4,
= 5,
SATURDAY
= 6,
HOLIDAY1
= 7,
HOLIDAY2
= 8,
450
};
int scheduleID; // 1 ~ 128
char name[BS_MAX_ACCESS_NAME_LEN];
int holiday[2]; // 0 for unused
BSTimeCodeEx timeCode[NUM_OF_DAY]; // 0 - Sunday, 1 - Monday, ...
int reserved[2];
};
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
Example
BSTimeScheduleEx timeSchedule;
memset( &timeSchedule, 0, sizeof(BSTimeScheduleEx) );
timeSchedule.scheduleID = 1;
timeSchedule.holiday[0] = 1;
// Monday- 09:00 ~ 18:00
timeSchedule.timeCode[BSTimeScheduleEx::MONDAY].codeElement[0].startTime =
9 * 60;
timeSchedule.timeCode[BSTimeScheduleEx::MONDAY].codeElement[0].endTime = 18
* 60;
// Tuesday- 08:00 ~ 12:00 and 14:30 ~ 20:00
timeSchedule.timeCode[BSTimeScheduleEx::TUESDAY].codeElement[0].startTime =
8 * 60;
timeSchedule.timeCode[BSTimeScheduleEx::TUESDAY].codeElement[0].endTime =
12 * 60;
timeSchedule.timeCode[BSTimeScheduleEx::TUESDAY].codeElement[1].startTime =
14 * 60 + 30;
timeSchedule.timeCode[BSTimeScheduleEx::TUESDAY].codeElement[1].endTime =
451
20 * 60;
// Holiday 1- 10:00 ~ 14:00
timeSchedule.timeCode[BSTimeScheduleEx::HOLIDAY1].codeElement[0].startTime
= 10 * 60;
timeSchedule.timeCode[BSTimeScheduleEx::HOLIDAY1].codeElement[0].endTime =
14 * 60;
strcpy( timeSchedule.name, Schedule 1 );
//
BS_RET_CODE result = BS_AddTimeScheduleEx( handle, &timeSchedule );
452
BS_GetAllTimeScheduleEx
Reads all the registered time schedules.
BS_RET_CODE BS_GetAllTimeScheduleEx( int handle, int* numOfSchedule,
BSTimeScheduleEx* schedule )
Parameters
handle
Handle of the communication channel.
numOfSchedule
Pointer to the number of enrolled schedules.
schedule
Pointer to the time schedule array to be read.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
453
BS_SetAllTimeScheduleEx
Writes time schedules.
BS_RET_CODE BS_SetAllTimeScheduleEx( int handle, int numOfSchedule,
BSTimeScheduleEx* schedule )
Parameters
handle
Handle of the communication channel.
numOfSchedule
Number of schedules to be written.
schedule
Pointer to the time schedule array to be written.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
454
BS_DeleteTimeScheduleEx
Deletes the specified time schedule.
BS_RET_CODE BS_DeleteTimeScheduleEx( int handle, int ID )
Parameters
handle
Handle of the communication channel.
ID
ID of the time schedule.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
455
BS_DeleteAllTimeScheduleEx
Deletes all the time schedules stored in a device.
BS_RET_CODE BS_DeleteAllTimeScheduleEx( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/Xpass/Xpass Slim/X-Station
BS_AddHolidayEx
Adds a holiday list. Up to 32 holiday lists can be stored to a device.
struct BSHolidayEx {
enum {
MAX_HOLIDAY = 32,
};
int holidayID; // 1 ~ 32
char name[BS_MAX_ACCESS_NAME_LEN];
int numOfHoliday;
BSHolidayElemEx holiday[MAX_HOLIDAY];
int reserved[2];
};
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
Copyright 2013 by Suprema Inc.
456
457
458
BS_GetAllHolidayEx
Reads all the registered holiday lists.
BS_RET_CODE BS_GetAllHolidayEx( int handle, int* numOfHoliday,
BSHolidayEx* holiday )
Parameters
handle
Handle of the communication channel.
numOfHoliday
Pointer to the number of enrolled holiday lists.
holiday
Pointer to the holiday lists to be read.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/Xpass/Xpass Slim/X-Station
459
BS_SetAllHolidayEx
Writes holiday lists.
BS_RET_CODE BS_SetAllHolidayEx( int handle, int numOfHoliday,
BSHolidayEx* holiday )
Parameters
handle
Handle of the communication channel.
numOfHoliday
Number of holiday lists to be written.
holiday
Pointer to the holiday lists to be written.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
460
BS_DeleteHolidayEx
Deletes the specified holiday list.
BS_RET_CODE BS_DeleteHolidayEx( int handle, int ID )
Parameters
handle
Handle of the communication channel.
ID
ID of the holiday list.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
461
BS_DeleteAllHolidayEx
Deletes all the holiday lists stored in a device.
BS_RET_CODE BS_DeleteAllHolidayEx( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
462
BS_AddAccessGroupEx
An access group defines which doors users have access to, and during which hours
they have access to these doors. Up to 128 access groups can be stored to a
device. There are also two pre-defined access groups, NO_ACCESS_GROUP and
FULL_ACCESS_GROUP, which cannot be updated nor deleted.
BS_RET_CODE BS_AddAccessGroupEx( int handle, BSAccessGroupEx*
group )
Parameters
handle
Handle of the communication channel.
group
Pointer to the access group to be added. BSAccessGroupEx is defined as
follows;
struct BSAccessGroupEx {
enum {
// pre-defined group
NO_ACCESS_GROUP= 0xFD,
FULL_ACCESS_GROUP
= 0xFE,
// pre-defined door
ALL_DOOR
= 0x00,
MAX_READER = 32,
};
int groupID; // 1 ~ 128
char name[BS_MAX_ACCESS_NAME_LEN];
int numOfReader;
unsigned readerID[MAX_READER];
int scheduleID[MAX_READER];
unsigned userID;
int reserved[3];
};
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
Copyright 2013 by Suprema Inc.
463
464
BS_GetAllAccessGroupEx
Reads all the registered access groups.
BS_RET_CODE BS_GetAllAccessGroupEx( int handle, int*
numOfAccessGroup, BSAccessGroupEx* group )
Parameters
handle
Handle of the communication channel.
numOfAccessGroup
Pointer to the number of registered access groups.
group
Pointer to the access groups to be read.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/Xpass/Xpass Slim
465
BS_SetAllAccessGroupEx
Writes access groups.
BS_RET_CODE BS_SetAllAccessGroupEx( int handle, int
numOfAccessGroup, BSAccessGroupEx* group )
Parameters
handle
Handle of the communication channel.
numOfAccessGroup
Number of access groups to be written.
group
Pointer to the access groups to be written.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/ Xpass/Xpass Slim
466
BS_DeleteAccessGroupEx
Deletes the specified access group.
BS_RET_CODE BS_DeleteAccessGroupEx( int handle, int ID )
Parameters
handle
Handle of the communication channel.
ID
ID of the access group.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/ Xpass/Xpass Slim
467
BS_DeleteAllAccessGroupEx
Deletes all the access groups stored in a device.
BS_RET_CODE BS_DeleteAllAccessGroupEx( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/ Xpass/Xpass Slim
468
BS_RelayControlEx
Controls the relays under the control of a device.
BS_RET_CODE BS_RelayControlEx( int handle, int deviceIndex, int
relayIndex, bool onoff )
Parameters
handle
Handle of the communication channel.
deviceIndex
Device index between BS_DEVICE_PRIMARY and BS_DEVICE_SECUREIO3.
relayIndex
BS_PORT_RELAY0 or BS_PORT_RELAY1.
onoff
If true, turn on the relay, and vice versa.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/ Xpass/Xpass Slim
469
BS_DoorControl
Turn on or off a door. See BSDoorConfig for configuration of doors.
BS_RET_CODE BS_DoorControl( int handle, int doorIndex, bool onoff )
Parameters
handle
Handle of the communication channel.
doorIndex
0 Door 1
1 Door 2
2 - Both
onoff
If true, turn on the relay, and vice versa.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/ Xpass/Xpass Slim
470
BS_CardReaderDoorControl
Turn on or off a door which is controlled by 3rd party RF device. See
BSCardReaderDoorConfig for configuration of doors. Refer to 2.4.4 for details.
BS_RET_CODE BS_CardReaderDoorControl( int handle, unsigned readerID,
bool onoff )
Parameters
handle
Handle of the communication channel.
readerID
Pre-assigned ID of attached 3rd party RF device
onoff
If true, turn on the relay, and vice versa.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation/BioEntry Plus/BioEntry W/BioLite
Net/X-Station/ Xpass/Xpass Slim
3.9.
471
Smartcard API
BioStation Mifare, BioEntry Plus Mifare, and BioLite Net support Mifare types of
smart cards10. These functions provide basic functionalities such as read, write, and
format smartcards.
BioEntry Plus iCLASS support iCLASS types of smart cards11 These functions
provide basic functionalities such as read, write, and format smartcards.
10
472
BS_WriteMifareConfiguration/BS_ReadMifareConfiguration
Writes/reads the Mifare configuration. The configuration is divided into three parts
operation option, key option, and the card layout. BioStation Mifare, BioEntry Plus
Mifare, and BioLite Net devices can handle both 1K and 4K Mifare cards. Maximum
2 templates can be stored into a 1K card, and 4 templates into a 4K card. Changing
card layout should be handled with utmost caution. If you are not sure what to do,
contact to support@supremainc.com before trying yourself.
BS_RET_CODE BS_WriteMifareConfiguration( int handle, BSMifareConfig*
config )
BS_RET_CODE BS_ReadMifareConfiguration( int handle, BSMifareConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSMifareConfig is defined as follows;
struct BSMifareConfig {
enum {
MIFARE_KEY_SIZE = 6,
MIFARE_MAX_TEMPLATE = 4,
};
// Options
int magicNo;
// read-only
int disabled;
int useCSNOnly;
int bioentryCompatible;// not used
// Keys
Int useSecondaryKey;
int reserved1;
unsigned char
reserved2[8];
unsigned char
reserved3[8];
// Layout
int cisIndex;
Options
disabled
useCSNOnly
useSecondaryKey
cisIndex
numOfTemplate
templateSize
templateStartBlock
473
474
475
BS_ChangeMifareKey
To prevent illegal access, Mifare cards are protected by 48 bit site key. The site
key should be handled with utmost caution. If it is disclosed, the data on the
smartcard will not be secure any more. BS_ChangeMifareKey is used to
change the primary and secondary site keys. The default primary key is
0xffffffffffff.
BS_RET_CODE BS_ChangeMifareKey( int handle, unsigned char*
oldPrimaryKey, unsigned char* newPrimaryKey, unsigned char*
newSecondaryKey )
Parameters
handle
Handle of the communication channel.
oldPrimaryKey
Pointer to the 6 byte old primary key. If it is not matched with the one stored
in the device, BS_ERR_WRONG_PASSWORD will be returned.
newPrimaryKey
Pointer to the 6 byte new primary key.
newSecondaryKey
Pointer to the 6 byte new secondary key. See useSecondaryKey option in
BS_WriteMifareConfiguration.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation Mifare/BioEntry Plus
Mifare/BioEntry W Mifare/BioLite Net/X-Station
476
BS_WriteMifareCard
Writes user information into a Mifare card.
BS_RET_CODE BS_WriteMifareCard( int handle, BSMifareCardHeader*
header, unsigned char* templateData, int templateSize )
Parameters
handle
Handle of the communication channel.
header
BSMifareCardHeader is defined as follows;
struct BSMifareCardHeader {
enum {
MAX_TEMPLATE
= 4,
MAX_ACCESS_GROUP
= 4,
MAX_NAME_LEN
= 16,
PASSWORD_LEN
= 8,
MIFARE_VER_1_0 = 0x10,
// security level
USER_SECURITY_DEFAULT = 0,
USER_SECURITY_LOWER
= 1,
USER_SECURITY_LOW
= 2,
USER_SECURITY_NORMAL
= 3,
USER_SECURITY_HIGH
= 4,
USER_SECURITY_HIGHER
= 5,
// admin level
USER_LEVEL_NORMAL
= 0,
USER_LEVEL_ADMIN
= 1,
};
unsigned int
CSN;
unsigned int
userID;
unsigned int
reserved1;
unsigned char
version;
unsigned char
numOfTemplate;
unsigned char
adminLevel;
unsigned char
securityLevel;
unsigned char
duress[MAX_TEMPLATE];
isBypassCard;
unsigned char
reserved2[3];
unsigned char
accessGroup[MAX_ACCESS_GROUP];
unsigned char
userName[MAX_NAME_LEN];
unsigned char
password[PASSWORD_LEN];
time_t startTime;
time_t expiryTime;
unsigned int
reserved3[8];
};
Descriptions
CSN
userID
version
numOfTemplate
adminLevel
USER_LEVE_NORMAL
USER_LEVEL_ADMIN
securityLevel
duress
isBypassCard
accessGroup
477
password
startTime
expiryTime
templateData
Fingerprint templates of the user.
templateSize
The size of one template. If it is different from that of BSMifareConfig, the
device will truncate or pad the template data according to the latter.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation Mifare/BioEntry Plus
Mifare/BioEntry W Mifare/BioLite Net/X-Station
Example
BSMifareCardHeader userHeader;
memset( &userHeader, 0, sizeof( BSMifareCardHeader ) );
userHeader.userID = 1; // 0 cannot be assigned as a user ID.
userHeader.numOfTemplate = 2;
userHeader.adminLevel = BSMifareCardHeader::USER_LEVEL_NORMAL;
userHeader.securityLevel = BSMifareCardHeader::USER_SECURITY_DEFAULT;
userHeader.accessGroup[0] = 0xFE; // Full Access group
userHeader.accessGroup[1] = 0xFF;
478
479
userHeader.accessGroup[2] = 0xFF;
userHeader.accessGroup[3] = 0xFF;
strcpy( userHeader.name, John );
strcpy( userHeader.password, NULL ); // no password
userHeader.startTime = 0; // no start time check
userHeader.expiryTime = US_ConvertToLocalTime( time( NULL ) ) + 365 * 24 *
60 * 60; // 1 year from today
unsigned char* templateBuf = (unsigned
char*)malloc( userHeader.numOfTemplate * BS_TEMPLATE_SIZE );
// fill template data
for( int i = 0; i < userHeader.numOfTemplate; i++ )
{
unsigned char* templateData = templateBuf + i * BS_TEMPLATE_SIZE;
// fill data here
}
BS_RET_CODE result = BS_WriteMifareCard( handle, &userHeader, templateBuf,
BS_TEMPLATE_SIZE );
BS_ReadMifareCard
Reads user information from a Mifare card.
BS_RET_CODE BS_ReadMifareCard( int handle, BSMifareCardHeader*
header, unsigned char* templateData, int* templateSize )
Parameters
handle
Handle of the communication channel.
header
Pointer to the card header to be returned.
templateData
Pointer to the template data to be returned. This pointer should be allocated
large enough to store the template data.
templateSize
Pointer to the size of one template to be returned. It is identical to that of
BSMifareConfig.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation Mifare/BioEntry Plus Mifare/BioEntry W Mifare/BioLite Net
480
BS_FormatMifareCard
Formats a Mifare card.
BS_RET_CODE BS_FormatMifareCard( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/BioStation Mifare/BioEntry Plus
Mifare/BioEntry W Mifare/BioLite Net/X-Station
481
482
BS_AddBlacklist
When a user ID or card CSN is added to the blacklist, the device will reject the
corresponding Mifare card. The blacklist can store up to 1000 user IDs or card CSNs.
BS_RET_CODE BS_AddBlacklist( int handle, int numOfItem,
BSBlacklistItem* item )
Parameters
handle
Handle of the communication channel.
numOfItem
Number of items to be added.
Item
Arrays of blacklist items to be added.
BSBlacklistItem is defined as follows;
struct BSBlacklistItem {
enum {
// blacklist type
BLACKLIST_USER_ID
BLACKLIST_CSN
= 0x01,
= 0x02,
MAX_BLACKLIST
= 1000,
};
unsigned char itemType;
unsigned char reserved[3];
unsigned itemData;
};
Options
itemType
itemData
Return Values
Copyright 2013 by Suprema Inc.
483
BS_DeleteBlacklist
Deletes Mifare cards from the blacklist.
BS_DeleteBlacklist( int handle, int numOfItem, BSBlacklistItem* item )
Parameters
handle
Handle of the communication channel.
numOfItem
Number of items to be deleted.
Item
Arrays of blacklist items to be deleted.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2/D-Station/BioStation Mifare/BioEntry Plus Mifare/BioEntry W
Mifare/BioLite Net/X-Station
484
BS_DeleteAllBlacklist
Clear the blacklist.
BS_DeleteAllBlacklist( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2/D-Station/BioStation Mifare/BioEntry Plus Mifare/BioEntry W
Mifare/BioLite Net/BioEntry Plus iCLASS/X-Station
485
BS_ReadBlacklist
Read the contents of the blacklist.
BS_ReadBlacklist( int handle, int* numOfItem, BSBlacklistItem* item )
Parameters
handle
Handle of the communication channel.
numOfItem
Pointer to the number of items to be returned.
item
Arrays of white list items to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation T2/D-Station/BioStation Mifare/BioEntry Plus Mifare/BioEntry W
Mifare/BioLite Net/X-Station
486
487
BS_WriteiClassConfiguration/BS_ReadiClassConfiguration
Writes/reads the iCLASS configuration. The configuration is divided into three parts
operation option, key option, and the card layout. BioEntry Plus iCLASS device
can handle both 2K and 4K iCLASS cards. Maximum 2 templates can be stored into
a 2K card, and 4 templates into a 4K card. Changing card layout should be handled
with utmost caution. If you are not sure what to do, contact to
support@supremainc.com before trying yourself.
BS_RET_CODE BS_WriteiClassConfiguration( int handle, BSiClassConfig*
config )
BS_RET_CODE BS_ReadMifareConfiguration( int handle, BSiClassConfig*
config )
Parameters
handle
Handle of the communication channel.
config
BSiClassConfig is defined as follows;
struct BSiClassConfig {
enum {
ICLASS_KEY_SIZE = 6,
ICLASS_MAX_TEMPLATE = 4,
};
// Options
int magicNo;
// read-only
int disabled;
int useCSNOnly;
int bioentryCompatible;// not used
// Keys
int useSecondaryKey;
int reserved1;
unsigned char
reserved2[8];
unsigned char
reserved3[8];
// Layout
int cisIndex;
Options
disabled
useCSNOnly
useSecondaryKey
cisIndex
numOfTemplate
templateSize
templateStartBlock
488
489
490
BS_ChangeiClassKey
To prevent illegal access, iCLASS cards are protected by 48 bit site key. The site
key should be handled with utmost caution. If it is disclosed, the data on the
smartcard will not be secure any more. BS_ChangeiClassKey is used to
change the primary and secondary site keys. The default primary key is
0xF0E1D2C3B4A5.
BS_RET_CODE BS_ChangeiClassKey( int handle, unsigned char*
oldPrimaryKey, unsigned char* newPrimaryKey, unsigned char*
newSecondaryKey )
Parameters
handle
Handle of the communication channel.
oldPrimaryKey
Pointer to the 6 byte old primary key. If it is not matched with the one stored
in the device, BS_ERR_WRONG_PASSWORD will be returned.
newPrimaryKey
Pointer to the 6 byte new primary key.
newSecondaryKey
Pointer to the 6 byte new secondary key. See useSecondaryKey option in
BS_WriteiClassConfiguration.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus iCLASS
491
BS_WriteiClassCard
Writes user information into a iCLASS card.
BS_RET_CODE BS_WriteiClassCard( int handle, BSiClassCardHeader*
header, unsigned char* templateData, int templateSize )
Parameters
handle
Handle of the communication channel.
header
BSiClassCardHeader is defined as follows;
struct BSiClassCardHeader {
enum {
MAX_TEMPLATE
= 4,
MAX_ACCESS_GROUP
= 4,
MAX_NAME_LEN
= 16,
PASSWORD_LEN
= 8,
ICLASS_VER_1_0 = 0x10,
// security level
USER_SECURITY_DEFAULT = 0,
USER_SECURITY_LOWER
= 1,
USER_SECURITY_LOW
= 2,
USER_SECURITY_NORMAL
= 3,
USER_SECURITY_HIGH
= 4,
USER_SECURITY_HIGHER
= 5,
// admin level
USER_LEVEL_NORMAL
= 0,
USER_LEVEL_ADMIN
= 1,
};
unsigned int
CSN;
unsigned int
userID;
unsigned int
customID;
unsigned char
version;
unsigned char
numOfTemplate;
unsigned char
adminLevel;
unsigned char
securityLevel;
unsigned char
duress[MAX_TEMPLATE];
isBypassCard;
unsigned char
reserved2[3];
unsigned char
accessGroup[MAX_ACCESS_GROUP];
unsigned char
userName[MAX_NAME_LEN];
unsigned char
password[PASSWORD_LEN];
time_t startTime;
time_t expiryTime;
unsigned int
reserved3[8];
};
Descriptions
CSN
userID
customID
version
numOfTemplate
adminLevel
USER_LEVE_NORMAL
USER_LEVEL_ADMIN
securityLevel
duress
isBypassCard
492
userName
password
startTime
expiryTime
templateData
Fingerprint templates of the user.
templateSize
The size of one template. If it is different from that of BSiClassConfig, the
device will truncate or pad the template data according to the latter.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus iCLASS
Example
BSiClassCardHeader userHeader;
memset( &userHeader, 0, sizeof( BSiClassCardHeader ) );
userHeader.userID = 1; // 0 cannot be assigned as a user ID.
userHeader.numOfTemplate = 2;
userHeader.adminLevel = BSiClassCardHeader::USER_LEVEL_NORMAL;
userHeader.securityLevel = BSiClassCardHeader::USER_SECURITY_DEFAULT;
493
494
BS_ReadiClassCard
Reads user information from a iCLASS card.
BS_RET_CODE BS_ReadiClassCard( int handle, BSiClassCardHeader*
header, unsigned char* templateData, int* templateSize )
Parameters
handle
Handle of the communication channel.
header
Pointer to the card header to be returned.
templateData
Pointer to the template data to be returned. This pointer should be allocated
large enough to store the template data.
templateSize
Pointer to the size of one template to be returned. It is identical to that of
BSiClassConfig.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus iCLASS
495
BS_FormatiClassCard
Formats a iCLASS card.
BS_RET_CODE BS_FormatiClassCard( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus iCLASS
496
497
BS_AddBlacklistEx
When a user ID or card CSN is added to the blacklist, the device will reject the
corresponding iCLASS card. The blacklist can store up to 1000 user IDs or card
CSNs.
BS_RET_CODE BS_AddBlacklistEx( int handle, int numOfItem,
BSBlacklistItemEx* item )
Parameters
handle
Handle of the communication channel.
numOfItem
Number of items to be added.
Item
Arrays of blacklist items to be added.
BSBlacklistItem is defined as follows;
struct BSBlacklistItemEx {
enum {
// blacklist type
BLACKLIST_USER_ID
BLACKLIST_CSN
= 0x01,
= 0x02,
MAX_BLACKLIST
= 1000,
};
unsigned char itemType;
unsigned char reserved[3];
unsigned itemData;
unsigned customID;
};
Options
itemType
customID
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus iCLASS
498
BS_DeleteBlacklistEx
Deletes iCLASS cards from the blacklist.
BS_DeleteBlacklistEx( int handle, int numOfItem, BSBlacklistItemEx*
item )
Parameters
handle
Handle of the communication channel.
numOfItem
Number of items to be deleted.
Item
Arrays of blacklist items to be deleted.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus iCLASS
499
BS_ReadBlacklistEx
Read the contents of the blacklist.
BS_ReadBlacklistEx( int handle, int* numOfItem, BSBlacklistItemEx*
item )
Parameters
handle
Handle of the communication channel.
numOfItem
Pointer to the number of items to be returned.
item
Arrays of white list items to be returned.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioEntry Plus iCLASS
500
501
502
BS_ConvertToUTF8
BioStation supports UTF8 strings. To display non-western characters in BioStation,
it should be converted to UTF8 first.
int BS_ConvertToUTF8( const char* msg, char* utf8Msg, int limitLen )
Parameters
msg
String to be converted.
utf8Msg
Pointer to the buffer for new string.
limitLen
Maximum size of utf8Msg buffer.
Return Values
If the function succeeds, return the number of bytes written to the utf8Msg buffer.
Otherwise, return 0.
Compatibility
BioStation
503
BS_ConvertToUTF16
D-Station, BioLite Net and X-Station supports UTF16 strings. To display any
characters in D-Station, BioLite Net and X-Station, it should be converted to UTF16
first.
int BS_ConvertToUTF16( const char* msg, char* utf16Msg, int limitLen )
Parameters
msg
String to be converted.
utf8Msg
Pointer to the buffer for new string.
limitLen
Maximum size of utf16Msg buffer.
Return Values
If the function succeeds, return the number of bytes written to the utf16Msg buffer.
Otherwise, return 0.
Compatibility
FaceStation/BioStation T2/D-Station/BioLite Net/X-Station
BS_UTF8ToString
BS_UTF8ToStaring converts a UTF8 string into a general string.
int BS_UTF8ToString( const char* szUTF8, char* szOutput)
Parameters
szUTF8
String to be converted.
szOutput
Pointer to the buffer for new string.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return -1.
Compatibility
Device Independent
504
BS_UTF16ToString
BS_UTF16ToStaring converts a UTF16 string into a general string.
int BS_UTF16ToString( const char* szUTF16, char* szOutput)
Parameters
szUTF16
String to be converted.
szOutput
Pointer to the buffer for new string.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return -1.
Compatibility
Device Independent
505
506
BS_ConvertToLocalTime
All time values for the SDK should be local time. BS_ConvertToLocalTime converts
a UTC time into local time.
time_t BS_ConvertToLocalTime( time_t utcTime )
Parameters
utcTime
Number of seconds elapsed since midnight (00:00:00), January 1, 1970.
Return Values
The time value converted for the local time zone.
Compatibility
Device independent
507
BS_SetKey
When the encryption mode is on, all the fingerprint templates are transferred and
saved in encrypted form. If you want to decrypt/encrypt templates manually, you
should use BS_SetKey, BS_DecryptTemplate, and BS_EncryptTemplate.
Note that these functions are only applicable to D-Station and BioStation. XStation, BioEntry Plus and BioLite Net transfer and save templates in encrypted
form always.
void BS_SetKey( unsigned char *key )
Parameters
key
32 byte 256bit encryption key.
Return Values
None
Compatibility
FaceStation/BioStation T2/D-Station/BioStation
508
BS_EncryptTemplate
Encrypts a fingerprint template with the key set by BS_SetKey.
int BS_EncryptTemplate( unsigned char *input, unsigned char *output, int
length )
Parameters
input
Pointer to the fingerprint template to be encrypted.
output
Pointer to the buffer for encrypted template.
length
Length of the template data.
Return Values
Return the length of encrypted template.
Compatibility
BioStation T2/D-Station/BioStation
509
BS_DecryptTemplate
Decrypts an encrypted template with the key set by BS_SetKey.
void BS_DecryptTemplate( unsigned char *input, unsigned char *output,
int length )
Parameters
input
Pointer to the encrypted template.
output
Pointer to the buffer for decrypted template.
length
Length of the encrypted template.
Return Values
None.
Compatibility
BioStation T2/D-Station/BioStation
BS_EncryptSHA256
The user password is encrypted and saved on FaceStation. The password should
be encrypted with SHA256(Secure Hash Algorithm).
int BS_EncryptSHA256( unsigned char *input, int length, unsigned char
*output)
Parameters
input
Pointer to the data to be encrypted.
length
Length of the data
output
Pointer to the buffer for encrypted data.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return error code.
Compatibility
FaceStation
510
511
512
513
BS_StartServerApp
This API starts threads to accept connections from devices and receive data from
devices. And this API allocates memory to be used for server APIs.
So this API shoud be called to accept connections and receive data from devices.
BS_RET_CODE BS_StartServerApp( int port, int maxConnection, char*
sslPath, char* sslPassword, int connCheckDuration )
Parameters
port
Port number to be bound with the server socket.
maxConnection
Number of maximum connection which can be allowed.
sslPath
Path of OpenSSL Utility which is installed by Win32OpenSSL-0_9_8d.exe. This
parameter is needed to issue a SSL certificate.
sslPassword
Password to make a SSL certificate.
connCheckDuration
Duration to determin if a connection is valid or not. connCheckDuration can
have the numeric value as seconds.
While this duration, if the connection receives no packet, the connection can
be regard as invalid.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
514
BS_StopServerApp
This API stops all threads which are made by BS_StartServerApp and frees all
allocate memory. This API should be called before exiting the server application.
BS_RET_CODE BS_StopServerApp ()
Parameters
None
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
515
BS_SetConnectedCallback
This API sets the callback function which notifies accepting Command Connection.
BS_RET_CODE BS_SetConnectedCallback( BS_ConnectionProc proc, bool
syncOp, bool autoResponse )
Parameters
proc
Pointer to the callback function.
This function pointer is called by BioStar SDK when Command Connection is
accepted.
The prototype is same as follows.
BS_RET_CODE (*BS_ConnectionProc)( int handle, unsigned deviceID,
int deviceType, int connectionType, int functionType, char*
ipAddress )
The parameters are explained in follows.
handle
Handle of the communication channel.
deviceID
Device ID of the connected device.
deviceType
Type of the connected device.
BS_DEVICE_BIOSTATION
0x00
BS_DEVICE_BIOENTRY_PLUS
0x01
BS_DEVICE_BIOLITE
0x02
BS_DEVICE_XPASS
0x03
BS_DEVICE_DSTATION
0x04
BS_DEVICE_XSTATION
0x05
BS_DEVICE_BIOSTATION2
0x06
BS_DEVICE_XPASS_SLIM
0x07
BS_DEVICE_FSTATION
0x0A
connectionType
connectionType determins nomal TCP/IP connection or SSL connection.
Copyright 2013 by Suprema Inc.
516
0 normal TCP/IP
1 - SSL
functionType
Type of this callback function to be called by BioStar SDK.
BS_SERVER_CB_CONN
BS_SERVER_CB_DISCONN
BS_SERVER_CB_REQUEST_STARTED
ipAddress
IPAddress of the connected devices.
syncOp
syncOp determins if this callback function is called synchronously or not.
syncOp can be true(1) or false(0). true means synchronous using.
autoResponse
autoResponse determines if the response signal from a PC to a device is sent
before the function pointer is called or after it is called. When autoResponse is
true(1), the response signal is always BS_SUCCESS. Whereas autoResponse
is false(0), the response signal is determined according to the return value of
this callback function.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
517
BS_SetDisconnectedCallback
This API sets the callback function which notifies the occuring of disconnected
connection.
BS_RET_CODE BS_SetDisconnectedCallback( BS_ConnectionProc proc,
bool syncOp )
Parameters
proc
Pointer to the callback function.
This function pointer is called by BioStar SDK when disconnection occurs.
The prototype is the same as follows.
BS_RET_CODE (*BS_ConnectionProc)(int handle, unsigned deviceID,
int deviceType, int connectionType, int functionType, char*
ipAddress )
syncOp
syncOp determins if this callback function is called synchronously or not.
syncOp can be true(1) or false(0). true means synchronous using.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim/X-Station
518
BS_SetRequestStartedCallback
This API sets the callback function which notifies accepting Request Connection.
BS_RET_CODE BS_SetRequestStartedCallback ( BS_ConnectionProc proc,
bool syncOp, bool autoResponse )
Parameters
proc
Pointer to the callback function.
This function pointer is called by BioStar SDK when Request Connection is
accepted.
The prototype is the same as follows.
BS_RET_CODE (*BS_ConnectionProc)( int handle, unsigned deviceID,
int deviceType, int connectionType, int functionType, char*
ipAddress );
syncOp
syncOp determins if this callback function is called synchronously or not.
syncOp can be true(1) or false(0). true means synchronous using.
autoResponse
autoResponse determines if the response signal form a PC to a device is sent
before the function pointer is called or after it is called. When autoResponse is
true(1), the response signal is always BS_SUCCESS. When autoResponse is
false(0), the response signal is determined according to the return value of
this callback function.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
519
BS_SetLogCallback
This API sets the callback function which notifies recieving a realtime log.
BS_RET_CODE BS_SetLogCallback ( BS_LogProc proc, bool syncOp, bool
autoResponse )
Parameters
proc
Pointer to the callback function.
This function pointer is called by BioStar SDK when a realtime log is received.
The prototype is the same as follows.
BS_RET_CODE (*BS_LogProc)( int handle, unsigned deviceID, int
deviceType, int connectionType, BSLogRecord* data )
The parameters are explained in follows.
handle
Handle of the communication channel.
deviceID
Device ID of the connected device.
deviceType
Type of the connected device.
BS_DEVICE_BIOSTATION
0x00
BS_DEVICE_BIOENTRY_PLUS
0x01
BS_DEVICE_BIOLITE
0x02
BS_DEVICE_XPASS
0x03
BS_DEVICE_DSTATION
0x04
BS_DEVICE_XSTATION
0x05
BS_DEVICE_BIOSTATION2
0x06
BS_DEVICE_XPASS SLIM
0x07
BS_DEVICE_FSTATION
0x0A
connectionType
connectionType determins nomal TCP/IP connection or SSL connection.
0 normal TCP/IP
1 - SSL
Copyright 2013 by Suprema Inc.
520
data
Pointer of the log buffer.
syncOp
syncOp determins if this callback function is called synchronously or not.
syncOp can be true(1) or false(0). true means synchronous using.
autoResponse
autoResponse determins if the response signal form a PC to a device is sended
before the function pointer is called or after the function pointer is called.
When autoResponse is true(1), the response signal is always BS_SUCCESS.
When autoResponse is false(0), the response signal is determined according
to the return value of this callback function.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
521
BS_SetImageLogCallback
This API sets the callback function which notifies recieving a realtime image log.
BS_RET_CODE BS_SetImageLogCallback ( BS_ImageLogProc proc, bool
syncope, bool autoResponse )
Parameters
proc
Pointer to the callback function.
This function pointer is called by BioStar SDK when a realtime image log is
received.
The prototype is the same as follows.
BS_RET_CODE (*BS_ImageLogProc)( int handle, unsigned deviceID,
int deviceType, int connectionType, void* data, int dataLen )
The parameters are explained in follows.
handle
Handle of the communication channel.
deviceID
Device ID of the connected device.
deviceType
Type of the connected device.
BS_DEVICE_DSTATION
0x04
BS_DEVICE_XSTATION
0x05
BS_DEVICE_BIOSTATION2
0x06
BS_DEVICE_FSTATION
0x0A
connectionType
connectionType determins nomal TCP/IP connection or SSL connection.
0 normal TCP/IP
1 - SSL
data
Pointer of the image data.
dataLen
Length of the image data.
Copyright 2013 by Suprema Inc.
522
syncOp
syncOp determins if this callback function is called synchronously or not.
syncOp can be true(1) or false(0). true means synchronous using.
autoResponse
autoResponse determins if the response signal form a PC to a device is sended
before the function pointer is called or after the function pointer is called.
When autoResponse is true(1), the response signal is always BS_SUCCESS.
When autoResponse is false(0), the response signal is determined according
to the return value of this callback function.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station
523
BS_SetRequestUserInfoCallback
This API sets the callback function which notifies receiving User Info Request. User
Info Request occurs to get a user header such as BSUserHdrEx, BEUserHdr when
1:1 verifycation is processed on a device.
BS_RET_CODE BS_SetRequestUserInfoCallback (BS_RequestUserInfoProc
proc, bool syncOp )
Parameters
proc
Pointer to the callback function.
This function pointer is called by BioStar SDK when User Info Request is
received.
The prototype is the same as follows.
BS_RET_CODE (*BS_RequestUserInfoProc)( int handle, unsigned
deviceID, int deviceType, int connectionType, int idType, unsigned ID,
unsigned customID, void* userHdr )
The parameters are explained in follows.
handle
Handle of the communication channel.
deviceID
Device ID of the connected device.
deviceType
Type of the connected device.
BS_DEVICE_BIOSTATION
0x00
BS_DEVICE_BIOENTRY_PLUS
0x01
BS_DEVICE_BIOLITE
0x02
BS_DEVICE_XPASS
0x03
BS_DEVICE_DSTATION
0x04
BS_DEVICE_XSTATION
0x05
BS_DEVICE_BIOSTATION2
0x06
BS_DEVICE_XPASS SLIM
0x07
BS_DEVICE_FSTATION
0x0A
524
connectionType
connectionType determins nomal TCP/IP connection or SSL connection.
0 normal TCP/IP
1 SSL
idType
idType determins if the ID is user ID or card ID.
ID_USER
ID_CARD
ID
The value of ID.
customID
The value of custom ID. This is valid when idType is ID_CARD.
userHdr
The user header information to be sent to a device.
The result of User Info Request is determined by the return value of this
function. If the user has the ID exists, the return value should be
BS_SUCCESS. If the user has the ID dont exists, the return value shoud be
BS_ERR_NOT_FOUND.
If the return value of this function is BS_SUCCESS, userHdr should be filled?
with a user header information.
syncOp
syncOp determines if this callback function is called synchronously or not.
syncOp can be true(1) or false(0). true means synchronous using.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStaion/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
525
BS_SetRequestMatchingCallback
This API sets the callback function which notifies recieving Fingerprint Matching
Request. Fingerprint Matching Request occurs to verify or identify a scanned
fingerprint template with saved fingerprint templates.
BS_RET_CODE BS_SetRequestMatchingCallback
(BS_RequestMatchingProc proc, bool syncOp )
Parameters
proc
Pointer to the callback function.
This function pointer is called by BioStar SDK when Fingerprint Matching
Request is received.
The prototype is the same as follows.
BS_RET_CODE (__stdcall *BS_RequestMatchingProc)( int handle,
unsigned deviceID, int deviceType, int connectionType, int
matchingType, unsigned ID, unsigned char* templateData, void*
userHdr, int* isDuress )
The parameters are explained in follows.
handle
Handle of the communication channel.
deviceID
Device ID of the connected device.
deviceType
Type of the connected device.
BS_DEVICE_BIOSTATION
0x00
BS_DEVICE_BIOENTRY_PLUS
0x01
BS_DEVICE_BIOLITE
0x02
BS_DEVICE_XPASS
0x03
BS_DEVICE_DSTATION
0x04
BS_DEVICE_XSTATION
0x05
BS_DEVICE_BIOSTATION2
0x06
BS_DEVICE_XPASS SLIM
0x07
BS_DEVICE_FSTATION
0x0A
526
connectionType
connectionType determines nomal TCP/IP connection or SSL
connection.
0 normal TCP/IP
1 SSL
matchingType
matchingType determins identification or verification.
REQUEST_IDENTIFY
REQUEST_VERIFY
ID
The value of ID.
templateData
Pointer of the scanned fingerprint template buffers from a device.
userHdr
User header information to be sent to a device.
isDuress
Result of checking duress.
NORMAL_FINGER
DURESS_FINGER
527
BS_SetSynchronousOperation
This API determines if all received datas from devieces should be treated
synchronously or not
BS_RET_CODE BS_SetSynchronousOperation( bool syncOp )
Parameters
syncOp
syncOp can be true(1) or false(0). true means synchronous using.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStaion/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
528
BS_IssueCertificate
This API issues a SSL certificate to a BioStation device.
BS_RET_CODE BS_IssueCertificate ( int handle, unsigned int deviceID )
Parameters
handle
Handle of the communication channel.
deviceID
Device ID of the connected BioStation.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
529
BS_DeleteCertificate
This API deletes a SSL certificatie from a BioStation device.
BS_RET_CODE BS_DeleteCertificate ( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation
530
BS_StartRequest
This API makes devices try Request Connection to a PC.
BS_RET_CODE BS_StartRequest ( int handle, int deviceType, int port )
Parameters
handle
Handle of the communication channel.
deviceType
Type of the connected device.
deviceType can be BS_DEVICE_BIOSTATION(0) or
BS_DEVICE_BIOENTRY_PLUS(1),
BS_DEVICE_BIOLITE(2),.
BS_DEVICE_XPASS(3)
BS_DEVICE_DSTATION(4)
BS_DEVICE_XSTATION(5)
BS_DEVICE_BIOSTATION2(6)
BS_DEVICE_XPASS_SLIM(7)
BS_DEVICE_FSTATION(10)
port
Port to be bound with a server socket.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Staion/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
531
532
BS_GetConnectedList
This API gets connected device list.
BS_RET_CODE BS_GetConnectedList ( unsigned int* deviceList, int*
count )
Parameters
deviceList
Pointer to the array of connected device IDs.
count
Pointer to the number of connected devices.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
533
BS_CloseConnection
This API closes the connection of the specified device.
BS_RET_CODE BS_CloseConnection ( unsigned int deviceID )
Parameters
deviceID
Device ID of the connected device.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
FaceStation/BioStation T2/D-Station/X-Station/BioStation/BioEntry Plus/BioEntry
W/BioLite Net/Xpass/Xpass Slim
3.1.
534
Interactive API
535
BS_DisplayCustomInfo
This API makes a BioStation device display the message and the image which are
defined by a customer.
BS_RET_CODE BS_DisplayCustomInfo ( int handle, int displayTime, char*
text, char* imageFile )
Parameters
handle
Handle of the communication channel.
displayTime
Time in which displaying popup should be continued in seconds.
text
Message to be displayed on a device.
imageFile
Path of an image file to be displayed on a device.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation(V1.8 or Later)
536
BS_CancelDisplayCustomInfo
This API hides the popup which is made by BS_DisplayCustomInfo regardless of
remain time.
BS_RET_CODE BS_CancelDisplayCustomInfo ( int handle )
Parameters
handle
Handle of the communication channel.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation(V1.8 or Later)
537
BS_PlayCustomSound
This API makes a BioStation device play a sound which is defined by a customer.
BS_RET_CODE BS_PlayCustomSound ( int handle, char* waveFile )
Parameters
handle
Handle of the communication channel.
waveFile
Path of a wave file, which should have sampling rate of 11k or over.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation(V1.8 or Later)
538
BS_PlaySound
This API makes a BioStatin device play previous saved sound with sound ID.
BS_RET_CODE BS_PlaySound ( int handle, int soundID )
Parameters
handle
Handle of the communication channel.
soundID
Sound ID is the same as follows.
BS_SOUND_START
BS_SOUND_CLICK
BS_SOUND_SUCCESS
BS_SOUND_QUESTION
BS_SOUND_ERROR
BS_SOUND_SCAN
BS_SOUND_FINGER_ONLY
BS_SOUND_PIN_ONLY
BS_SOUND_CARD_ONLY
BS_SOUND_FINGER_PIN
BS_SOUND_FINGER_CARD
10
BS_SOUND_TNA_F1
11
BS_SOUND_TNA_F2
12
BS_SOUND_TNA_F3
13
BS_SOUND_TNA_F4
14
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation(V1.8 or Later)
Copyright 2013 by Suprema Inc.
539
BS_WaitCustomKeyInput
This API makes a BioStation device display the message and the image which are
defined by a customer and wait key input while specified seconds and return key
array to a PC after keys is input.
BS_RET_CODE BS_WaitCustomKeyInput ( int handle, int waitTime, char*
title, char* imageFile, char* keyOut, int* numOfKey )
Parameters
handle
Handle of the communication channel.
waitTime
Seconds in which waiting key should be continued.
title
Message to be displayed on a device.
imageFile
Path of an image file to be displayed on a device.
keyOut
Pointer to the buffer having returned key output.
numOfKey
Pointer to the number of returned keys.
Return Values
If the function succeeds, return BS_SUCCESS. Otherwise, return the
corresponding error code.
Compatibility
BioStation(V1.8 or Later)
Contact Info
Headquarters
Suprema, Inc. (http://www.supremainc.com)
16F Parkview Office Tower,
Joengja-dong, Bundang-gu,
Seongnam-si, Gyeonggi-do, 463-863 Korea
Tel: +82-31-783-4505
Fax:+82-31-783-4506
Email: sales@supremainc.com, support@supremainc.com
540