Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:configuration_api [2023/03/02 15:21] kkshin [BS2BarcodeConfig] |
en:configuration_api [2023/08/16 15:30] mashin |
||
---|---|---|---|
Line 3123: | Line 3123: | ||
29. //actions// \\ | 29. //actions// \\ | ||
LED/buzzer information for OSDP devices, up to 32 can be designated. \\ \\ | LED/buzzer information for OSDP devices, up to 32 can be designated. \\ \\ | ||
+ | |||
+ | |||
+ | ==== BS2CustomMifareCard ==== | ||
+ | <code cpp> | ||
+ | typedef struct { | ||
+ | uint8_t primaryKey[6]; | ||
+ | uint8_t reserved1[2]; | ||
+ | uint8_t secondaryKey[6]; | ||
+ | uint8_t reserved2[2]; | ||
+ | uint16_t startBlockIndex; | ||
+ | uint8_t dataSize; | ||
+ | uint8_t skipBytes; | ||
+ | uint8_t reserved[4]; | ||
+ | } BS2CustomMifareCard; | ||
+ | </code> | ||
+ | 1. //primaryKey// \\ | ||
+ | Primary encryption key to access the Mifare card information. \\ \\ | ||
+ | 2. //reserved1// \\ | ||
+ | Reserved space.\\ \\ | ||
+ | 3. //secondaryKey// \\ | ||
+ | Secondary encryption key to access the Mifare card information. \\ \\ | ||
+ | 4. //reserved2// \\ | ||
+ | Reserved space.\\ \\ | ||
+ | 5. //startBlockIndex// \\ | ||
+ | Start block index on the Mifare data storage.\\ \\ | ||
+ | 6. //dataSize// \\ | ||
+ | The size in bytes of the card data. \\ \\ | ||
+ | 7. //skipBytes// \\ | ||
+ | This is where the card data appears. \\ | ||
+ | This is the starting point to read card data. It is 0 when reading from the starting point, and indicates the number of bytes skipped after the first. \\ \\ | ||
+ | 8. //reserved// \\ | ||
+ | Reserved space.\\ \\ | ||
+ | |||
+ | |||
+ | ==== BS2CustomDesFireCard ==== | ||
+ | <code cpp> | ||
+ | typedef struct { | ||
+ | uint8_t primaryKey[16]; | ||
+ | uint8_t secondaryKey[16]; | ||
+ | uint8_t appID[3]; | ||
+ | uint8_t fileID; | ||
+ | uint8_t encryptionType; // 0: DES/3DES, 1: AES | ||
+ | uint8_t operationMode; // 0: legacy(use picc master key), 1: new mode(use app master, file read, file write key) | ||
+ | uint8_t dataSize; | ||
+ | uint8_t skipBytes; | ||
+ | uint8_t reserved[4]; | ||
+ | BS2DesFireAppLevelKey desfireAppKey; ///<52 bytes | ||
+ | } BS2CustomDesFireCard; ///<96 Bytes | ||
+ | </code> | ||
+ | 1. //primaryKey// \\ | ||
+ | Primary encryption key to access the DesFire card information. (General settings) \\ \\ | ||
+ | 2. //secondaryKey// \\ | ||
+ | Secondary encryption key to access the Desfire card information. (General settings) \\ \\ | ||
+ | 3. //appID// \\ | ||
+ | Application Id that is stored inside the DesFire card for user authentication.\\ \\ | ||
+ | 4. //fileID// \\ | ||
+ | File ID that is stored inside the DesFire card, which will be used by the application to read and write data.\\ \\ | ||
+ | 5. //encryptionType// \\ | ||
+ | Type of data encryption.\\ | ||
+ | <WRAP group 50%> | ||
+ | ^Value ^Description ^ | ||
+ | |0 |DES/3DES | | ||
+ | |1 |AES | | ||
+ | </WRAP> | ||
+ | 6. //operationMode// \\ | ||
+ | Operation mode. \\ | ||
+ | <WRAP group 50%> | ||
+ | ^Value ^Description ^ | ||
+ | |0 |Using general settings (Using PICC master key) | | ||
+ | |1 |Using advanced settings (Using App master key) | | ||
+ | </WRAP> | ||
+ | 7. //dataSize// \\ | ||
+ | The size in bytes of the card data. \\ \\ | ||
+ | 8. //skipBytes// \\ | ||
+ | This is where the card data appears. \\ | ||
+ | This is the starting point to read card data. It is 0 when reading from the starting point, and indicates the number of bytes skipped after the first. \\ \\ | ||
+ | 9. //reserved// \\ | ||
+ | Reserved space.\\ \\ | ||
+ | 10. //desfireAppKey// \\ | ||
+ | Indicates key information to access DesFire card information. (Advanced settings) \\ \\ | ||
+ | |||
+ | |||
+ | ==== BS2CustomCardConfig ==== | ||
+ | <code cpp> | ||
+ | typedef struct { | ||
+ | BS2_CARD_DATA_TYPE dataType; | ||
+ | BS2_BOOL useSecondaryKey; | ||
+ | uint8_t reserved1[2]; | ||
+ | |||
+ | BS2CustomMifareCard mifare; | ||
+ | BS2CustomDesFireCard desfire; | ||
+ | uint8_t reserved2[24]; | ||
+ | uint8_t reserved3[96]; | ||
+ | |||
+ | BS2_CARD_BYTE_ORDER smartCardByteOrder; | ||
+ | uint8_t reserved4[3]; | ||
+ | BS2_UID formatID; | ||
+ | uint8_t reserved5[8]; | ||
+ | } BS2CustomCardConfig; | ||
+ | </code> | ||
+ | 1. //dataType// \\ | ||
+ | Type of card data. \\ | ||
+ | <WRAP group 50%> | ||
+ | ^Value ^Description ^ | ||
+ | |0 |Binary | | ||
+ | |1 |ASCII | | ||
+ | |2 |UTF16 | | ||
+ | |3 |BCD | | ||
+ | </WRAP> | ||
+ | 2. //useSecondaryKey// \\ | ||
+ | Decides whether to use the secondary encryption key. \\ \\ | ||
+ | 3. //reserved1// \\ | ||
+ | Reserved space. \\ \\ | ||
+ | 4. //mifare// \\ | ||
+ | Set the Mifare custom card information. \\ \\ | ||
+ | 5. //desfire// \\ | ||
+ | Set the DESFire custom card information. \\ \\ | ||
+ | 6. //reserved2// \\ | ||
+ | Reserved space. \\ \\ | ||
+ | 7. //reserved3// \\ | ||
+ | Reserved space. \\ \\ | ||
+ | 8. //smartCardByteOrder// \\ | ||
+ | The output method can be selected from MSB or LSB. \\ | ||
+ | <WRAP group 50%> | ||
+ | ^Value ^Description ^ | ||
+ | |0 |MSB | | ||
+ | |1 |LSB | | ||
+ | </WRAP> | ||
+ | 9. //reserved4// \\ | ||
+ | Reserved space. \\ \\ | ||
+ | 10. //formatID// \\ | ||
+ | This is an identifier that can be used when the BioStar 2 application needs to manage the card configuration as a database. \\ \\ | ||
+ | 11. //reserved5// \\ | ||
+ | Reserved space. \\ \\ |