Slave Control API
API that connects the master and slave device by using the RS-485 network. The v2 devices will now work as a dummy reader when set as a slave device. It will not store any kind of information for user and all will be stored inside the master device. The slave device will send the information scanned, and the matching and access rule check will be done from the master device. The slave device will only receive the result.
When the SDK is initialized, there are no information about the slave devices. Therefore, a slave device must be searched or added before controlling.
BS2_GetSlaveDevice
Searches a slave device from the RS-485 network.
BS2_SetSlaveDevice
Add/Modify/Delete a slave device from the master device.
BS2_GetSlaveExDevice
In case of CoreStation, searches a slave device from the RS-485 network.
BS2_SetSlaveExDevice
In case of CoreStation, Add/Modify/Delete a slave device from the master device.
BS2_SearchDevicesCoreStation
Searches CoreStation devices from the current network.
BS2_SearchDevicesCoreStationEx
+ v2.6.3 Searches CoreStation devices from the current network with host IP.
BS2_GetDevicesCoreStation
Gets searched CoreStation devices.
BS2_AddOsdpStandardDevice
+ v2.9.1 CoreStation40 Add the OSDP device with specified information to the given channel on the master device.
BS2_GetOsdpStandardDevice
+ v2.9.1 CoreStation40 Gets OSDP device information.
BS2_GetAvailableOsdpStandardDevice
+ v2.9.1 CoreStation40 Get additional connectable OSDP device information by specifying the master device identifier.
BS2_UpdateOsdpStandardDevice
+ v2.9.1 CoreStation40 Renew OSDP device information in batches by specifying OSDP device information and number.
BS2_RemoveOsdpStandardDevice
+ v2.9.1 CoreStation40 Remove the OSDP device in batches by specifying the OSDP device identifier and number.
BS2_GetOsdpStandardDeviceCapability
+ v2.9.1 CoreStation40 Get support information for OSDP devices.
BS2_SetOsdpStandardDeviceSecurityKey
+ v2.9.1 CoreStation40 Set security key for OSDP devices.
BS2_SetSlaveBaudrate
+ v2.9.8 Set the RS-485 baud rate of a slave device connected to a master device.
Structure
BS2Rs485SlaveDevice
typedef struct {
uint32_t deviceID;
uint16_t deviceType;
uint8_t enableOSDP;
uint8_t connected;
} BS2Rs485SlaveDevice;
-
deviceIDDevice ID.
-
deviceTypeDevice type.
-
enableOSDPDecides whether to use a slave device.
-
connectedDisplays whether a slave device is connected to the master device.
BS2Rs485SlaveDeviceEX
typedef struct {
uint32_t deviceID;
uint16_t deviceType;
uint8_t enableOSDP;
uint8_t connected;
uint8_t channelInfo;
uint8_t reserved[3];
} BS2Rs485SlaveDeviceEX;
-
deviceIDDevice ID.
-
deviceTypeDevice type.
-
enableOSDPDecides whether to use a slave device.
-
connectedDisplays whether a slave device is connected to the master device.
-
channelInfoChannel value of slave device.
-
reservedReserved space.
BS2OsdpStandardDevice
typedef struct {
BS2_DEVICE_ID deviceID; ///< 4 bytes
BS2_DEVICE_TYPE deviceType; ///< 2 bytes
BS2_BOOL enableOSDP; ///< 1 byte
BS2_BOOL connected; ///< 1 byte
uint8_t channelInfo; ///< 1 byte
uint8_t osdpID; ///< 1 byte
BS2_BOOL supremaSearch; ///< 1 byte
BS2_BOOL activate; ///< 1 byte
BS2_BOOL useSecure; ///< 1 byte
uint8_t vendorCode[3]; ///< 3 bytes
BS2_VERSION fwVersion; ///< 4 bytes
uint8_t modelNumber; ///< 1 byte
uint8_t modelVersion; ///< 1 byte
BS2_BOOL readInfo; ///< 1 byte
uint8_t reserved[25]; ///< 25 byte (packing)
} BS2OsdpStandardDevice; ///< 48 bytes
-
deviceIDOSDP Device Identifier.
-
deviceTypeDevice type. Usually gets
BS2_DEVICE_TYPE_3RD_OSDP_DEVICE. -
enableOSDPAlways set to true.
-
connectedIf true, an OSDP device is currently connected.
-
channelInfoConnected channel information. CoreStation40 has 5 channels from 0 to 4, it has channel values within this range.
-
osdpIDOSDP Identifier.
-
supremaSearchInformation that is distinct from existing RS485 that does not support OSDP, and always set to false.
-
activateRegardless of the connection status of the device, you can set whether the connected device is operating, which indicates the activation status of the operation.
-
useSecureIndicates whether encrypted communication is enabled.
If a separate key is not set, encryption communication is used as the default key, and can be changed with BS2_SetOsdpStandardDeviceSecurityKey.
-
vendorCodeUnique value of Vendor.
-
fwVersionFW version information of OSDP device.
-
modelNumberModel number of the OSDP device.
-
modelVersionModel version of the OSDP device.
-
readInfoIndicates whether OSDP device information such as vendorCode, fwVersion, or model has. If it has the OSDP device information, it means that the device has ever been connected to the master device.
-
reservedReserved Space.
BS2OsdpStandardDeviceAvailable
typedef struct {
uint8_t channelIndex; ///< 1 byte
BS2_OSDP_CHANNEL_TYPE channelType; ///< 1 byte
uint8_t maxOsdpDevice; ///< 1 byte
uint8_t numOsdpAvailableDevice; ///< 1 byte
BS2_DEVICE_ID deviceIDs[8]; ///< 4 x 8 = 32 bytes
} BS2OsdpStandardChannelInfo; ///< 36 bytes
typedef struct {
uint8_t numOfChannel; ///< 1 byte
uint8_t reserved[3]; ///< 3 bytes
BS2OsdpStandardChannelInfo channels[BS2_RS485_MAX_CHANNELS_EX]; ///< 36 x 8 = 288 bytes
uint8_t reserved1[32]; ///< 32 bytes
} BS2OsdpStandardDeviceAvailable; ///< 288 bytes + 36
-
channelIndexThe communication channel number to which the OSDP device is connected.
-
channelType-
Indicates the type to which the device communicating RS485 is connected.
-
Based on CoreStation40, there are 5 assignable channels from 0 to 4, and Suprema devices and OSDP devices cannot be mixed and operated within each channel.
-
If no device is connected to a particular channel, it has a 0 indicating that it can be connected even if it is a Suprema device or an OSDP device.
-
If a Suprema device is connected to a specific channel, only Suprema devices are allowed to connect to that channel, and channelType has a value of 1. The OSDP device is ignored even if it is connected.
-
If an OSDP device is connected to a specific channel, only OSDP devices are allowed to connect to that channel, and channelType has a value of 2. The Suprema device is ignored even if it is connected.
-
Each channel of CoreStation40 can be mixed and operated as Suprema device channel and OSDP device channel.
-
The maximum number of OSDP devices allowed to connect to a channel is limited to 2, and if the channel is already maxed out, the channelType will be 3, indicating that no more connections are allowed.
Value Description 0 Normal 1 Suprema Device 2 OSDP Device 3 OSDP Device FULL -
-
maxOsdpDeviceIndicates the maximum number of devices that can be connected in that channel.
If the channelType is 1, it will get 32, if 2 or 3, it will get 2.
-
numOsdpAvailibleDeviceIndicates the number of devices currently available for connection in that channel.
-
deviceIDsThe list of Device Identifier that is connected or can be connected in that channel.
-
numOfChannelNumber of channel. CoreStation40 has a total of 5 channels.
-
reservedReserved Space.
-
channelsOSDP device information of each channel.
You can have up to 8 channel information, but since CoreStation40 has 5 channels, only numbers 0 to 4 are valid.
-
reserved1Reserved Space.
BS2OsdpStandardDeviceNotify
typedef struct {
BS2_DEVICE_ID deviceID; ///< 4 bytes
BS2_DEVICE_TYPE deviceType; ///< 2 bytes
BS2_BOOL enableOSDP; ///< 1 byte
BS2_BOOL connected; ///< 1 byte
uint8_t channelInfo; ///< 1 byte
uint8_t osdpID; ///< 1 byte
BS2_BOOL supremaSearch; ///< 1 byte
BS2_BOOL activate; ///< 1 byte
BS2_BOOL useSecure; ///< 1 byte
uint8_t vendorCode[3]; ///< 3 bytes
BS2_VERSION fwVersion; ///< 4 bytes
uint8_t modelNumber; ///< 1 byte
uint8_t modelVersion; ///< 1 byte
BS2_BOOL readInfo; ///< 1 byte
uint8_t reserved[5]; ///< 5 bytes (packing)
} BS2OsdpStandardDeviceNotify; ///< 48 bytes
-
deviceIDOSDP Device Identifier.
-
deviceTypeDevice type. Usually gets
BS2_DEVICE_TYPE_3RD_OSDP_DEVICE. -
enableOSDPAlways set to true.
-
connectedIf true, an OSDP device is currently connected.
-
channelInfoConnected channel information. CoreStation40 has 5 channels from 0 to 4, it has channel values within this range.
-
osdpIDOSDP Identifier.
-
supremaSearchInformation that is distinct from existing RS485 that does not support OSDP, and always set to false.
-
activateRegardless of the connection status of the device, you can set whether the connected device is operating, which indicates the activation status of the operation.
-
useSecureIndicates whether encrypted communication is enabled.
If a separate key is not set, encryption communication is used as the default key, and can be changed with BS2_SetOsdpStandardDeviceSecurityKey.
-
vendorCodeUnique value of Vendor.
-
fwVersionFW version information of OSDP device.
-
modelNumberModel number of the OSDP device.
-
modelVersionModel version of the OSDP device.
-
readInfoIndicates whether OSDP device information such as vendorCode, fwVersion, or model has. If it has the OSDP device information, it means that the device has ever been connected to the master device.
-
reservedReserved Space.
BS2OsdpStandardDeviceAdd
typedef struct {
uint8_t osdpID; ///< 1 byte
uint8_t activate; ///< 1 byte
uint8_t useSecureSession; ///< 1 byte
uint8_t deviceType; ///< 1 byte
BS2_DEVICE_ID deviceID; ///< 4 bytes
} BS2OsdpStandardDeviceAdd; ///< 8 bytes
-
osdpIDOSDP Identifier. The identifier must be set to a random value between 0 and 126 by the user.
This value does not allow duplication within the same channel and may raise an error if duplicated or out-of-range values are set.
If the channels are different within the master device, you can add devices by setting them to the same identifier.
-
activateSpecifies the device activation state.
Regardless of the connection state of the device, if set to false, the operation of the device is ignored even if it is successfully connected.
-
useSecureSessionSpecifies whether to encrypt communication.
If a separate key is not set, encryption communication is used as the default key, and can be changed with BS2_SetOsdpStandardDeviceSecurityKey.
-
deviceTypeDevice type. Should be set to
BS2_DEVICE_TYPE_3RD_OSDP_DEVICE. -
deviceIDDevice Identifier. When set to 0, the master device automatically allocates.
BS2OsdpStandardDeviceUpdate
typedef struct {
uint8_t osdpID; ///< 1 byte
uint8_t activate; ///< 1 byte
uint8_t useSecureSession; ///< 1 byte
uint8_t deviceType; ///< 1 byte
BS2_DEVICE_ID deviceID; ///< 4 bytes
} BS2OsdpStandardDeviceUpdate; ///< 8 bytes
-
osdpIDOSDP Identifier. The identifier must be set to a random value between 0 and 126 by the user.
This value does not allow duplication within the same channel and may raise an error if duplicated or out-of-range values are set.
If the channels are different within the master device, you can add devices by setting them to the same identifier.
-
activateSpecifies the device activation state.
Regardless of the connection state of the device, if set to false, the operation of the device is ignored even if it is successfully connected.
-
useSecureSessionSpecifies whether to encrypt communication.
If a separate key is not set, encryption communication is used as the default key, and can be changed with BS2_SetOsdpStandardDeviceSecurityKey.
-
deviceTypeDevice type. Should be set to
BS2_DEVICE_TYPE_3RD_OSDP_DEVICE. -
deviceIDDevice Identifier.
BS2OsdpStandardDeviceCapability
typedef struct {
uint8_t compliance;
uint8_t count;
} BS2OsdpStandardDeviceCapabilityItem;
typedef struct {
BS2OsdpStandardDeviceCapabilityItem input; ///< 2 bytes
BS2OsdpStandardDeviceCapabilityItem output; ///< 2 bytes
BS2OsdpStandardDeviceCapabilityItem led; ///< 2 bytes
BS2OsdpStandardDeviceCapabilityItem audio; ///< 2 bytes
BS2OsdpStandardDeviceCapabilityItem textOutput; ///< 2 bytes
BS2OsdpStandardDeviceCapabilityItem reader; ///< 2 bytes
uint16_t recvBufferSize; ///< 2 bytes
uint16_t largeMsgSize; ///< 2 bytes
uint8_t osdpVersion; ///< 1 byte
uint8_t cardFormat; ///< 1 byte
uint8_t timeKeeping; ///< 1 byte
uint8_t canCommSecure; ///< 1 byte
BS2_BOOL crcSupport; ///< 1 byte
BS2_BOOL smartCardSupport; ///< 1 byte
BS2_BOOL biometricSupport; ///< 1 byte
BS2_BOOL securePinEntrySupport; ///< 1 byte
uint8_t reserved[4]; ///< 4 bytes
} BS2OsdpStandardDeviceCapability; ///< 28 bytes
-
complianceIndicates the compliance level according to the function of the PD.
Functions include input, output, led, audio, textOutput, etc. The compliance level is different for each function, so refer to the relevant OSDP document.
-
countIt refers to the number of objects according to the function of the PD, and the meaning of the number is different for each function, so refer to the relevant OSDP document.
-
inputDefine the input (monitoring) function.
-
outputDefine the output (monitoring) function.
-
ledDefine the LED function.
-
audioDefine the Buzzer function.
-
textOutputDefine the text output function.
-
readerIndicates the number of supported devices, only count information has meaning.
-
recvBufferSizeIndicates the short message size the PD can receive.
-
largeMsgSizeIndicates the maximum size of a long message that the PD can process.
-
osdpVersionOSDP version.
-
cardFormatDefines the card data format function and gets a value of 01, 02, or 03. Please refer to the compliance level related to the card data format of the OSDP document.
-
timeKeepingIndicates the date and time type of the PD and what to keep it for. In OSDP 2.2, this feature is not used.
-
canCommSecureIndicates whether secure communication is supported.
-
crcSupportIndicates whether checksums are supported.
-
smartCardSupportIndicates whether smart cards are supported.
-
biometricSupportIndicates whether biometric processing is supported.
-
securePinEntrySupportIndicates whether Secure PIN Entry (SPE) is supported.
-
reservedReserved Space.
BS2OsdpStandardDeviceResult
typedef struct {
BS2_DEVICE_ID deviceID;
BS2_OSDP_RESULT result;
} BS2OsdpStandardDeviceResult;
-
deviceIDDevice Identifier.
-
resultGets OSDP device command result value.
Value Description 0 Fail 1 Success
BS2OsdpStandardDeviceSecurityKey
typedef struct {
uint8_t key[BS2_OSDP_STANDARD_KEY_SIZE];
uint8_t reserved[32];
} BS2OsdpStandardDeviceSecurityKey;
-
key16-byte security key used in OSDP device.
-
reservedReserved Space.