Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:smartcard_api [2017/12/01 12:07]
michael [BS2SmartCardData]
en:smartcard_api [2018/08/07 16:46]
yjjung [BS2SmartCardHeader]
Line 47: Line 47:
 **3. //data//** \\  **3. //data//** \\ 
 The data of card template. \\  The data of card template. \\ 
 +In case of Secure Credential Card(SCC), users need to have card information which includes Card ID(24byte), issueCount(4byte) and TimeStamp(4byte). \\
 ==== BS2SmartCardHeader ==== ==== BS2SmartCardHeader ====
 <code cpp> <code cpp>
Line 62: Line 62:
 </​code>​ </​code>​
 **1. //​hdrCRC//​** \\  **1. //​hdrCRC//​** \\ 
-Value of card header checksum. \\ \\ +Value of card header checksum. ​(cardCRC - reserved) ​\\ \\ 
 **2. //​cardCRC//​** \\  **2. //​cardCRC//​** \\ 
-Value of card data checksum. \\ \\ +Value of card data checksum. ​(BS2SmartCardHeader.cardType - \\ \\ 
 **3. //​cardType//​** \\  **3. //​cardType//​** \\ 
 Code of card types. \\  Code of card types. \\ 
 <WRAP group 50%> <WRAP group 50%>
 ^Value ​ ^Description ​ ^ ^Value ​ ^Description ​ ^
-|0 |Unknown card  | +|0x00 |Unknown card  | 
-|1 |CSN card  | +|0x01 |CSN card  | 
-|2 |Secure card  | +|0x02 |Secure card  | 
-|3 |Access card  | +|0x03 |Access card  | 
-||Wiegand card  |+|0x0A |Wiegand card  ​
 +|0x0B |Config ​card ​ |
 </​WRAP>​ </​WRAP>​
 **4. //​numOfTemplate//​** \\  **4. //​numOfTemplate//​** \\ 
Line 117: Line 118:
 typedef struct { typedef struct {
     BS2SmartCardHeader header;     BS2SmartCardHeader header;
-    ​union { +    uint8_t cardID[BS2_CARD_DATA_SIZE];​
-        ​uint8_t cardID[BS2_CARD_DATA_SIZE]+
-        struct { +
-            uint8_t secureCredentialCardID[BS2_CARD_DATA_SIZE - 8]; +
-            uint32_t issueCount;​ +
-            uint32_t issueTimeStamp;​ +
-        };+
     BS2SmartCardCredentials credentials;​     BS2SmartCardCredentials credentials;​
     BS2AccessOnCardData accessOnData;​     BS2AccessOnCardData accessOnData;​
-    }; 
 } BS2SmartCardData; ​   ​ } BS2SmartCardData; ​   ​
 </​code>​ </​code>​
Line 132: Line 126:
 Smart card header. \\ \\  Smart card header. \\ \\ 
 **2. //​cardID//​** \\  **2. //​cardID//​** \\ 
-Card ID that will be used on the card. Access on Cards will need to use the 32 byte array for the card ID. \\ \\  +Card ID that will be used on the card. Access on Cards will need to use the 32 byte array for the card ID. Secure Credential Cards will need to use a 24 byte array for the card ID. \\ \\  
-**3. //​secureCredentialCardID//​** \\  +**3. //​credentials//​** \\ 
-Card ID that will be used on the card and device. Secure Credential Cards will need to use a 24 byte array for the card ID. \\ \\  +
-**4. //​issueCount//​** \\  +
-The count on how many times the card was issued. This needs to be correctly entered same as the '​issueCount'​ field from the BS2SmartCardHeader. \\ \\  +
-**5. //​issueTimeStamp//​** \\  +
-The time when the card was issued. The unit is in Unix timestamp. \\ \\  +
-**6. //​credentials//​** \\ +
 Authentication data area where the PIN or fingerprint template is stored. \\ \\  Authentication data area where the PIN or fingerprint template is stored. \\ \\ 
-**7. //​accessOnData//​** \\ +**4. //​accessOnData//​** \\ 
 Data area the AOC card uses, which carries the access group information.\\ ​ Data area the AOC card uses, which carries the access group information.\\ ​
  
 ==== BS2Card ==== ==== BS2Card ====
 <code cpp> <code cpp>
-typedef struct +typedef struct {
-{+
     uint8_t isSmartCard;​     uint8_t isSmartCard;​
-    union +    union {
-    ​{+
         BS2CSNCard card;         BS2CSNCard card;
         BS2SmartCardData smartCard;         BS2SmartCardData smartCard;