SAM commands used for MIFARE Plus card communication in X-Mode. More...

Functions | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpWritePerso (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t *pValues, uint8_t bValuesLength, uint8_t *pPiccReturnCode) |
| Perform a Write Perso MFP command. More... | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpAuthenticate (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyV, uint16_t wBlockNo, uint8_t *pPcdCapsIn, uint8_t bPcdCapsInLength, uint8_t *pDivInput, uint8_t bDivInputLength, uint8_t *pPcdCapsOut, uint8_t *pPdCaps, uint8_t *pPiccReturnCode) |
| Perform a MFP Authenticate command. More... | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpCombinedRead (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pPlainCommand, uint8_t bPlainCommandLength, uint8_t **pData, uint16_t *pDataLength, uint8_t *pPiccReturnCode) |
| Perform a MFP Combined Read command. More... | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpCombinedWrite (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pData, uint8_t bDataLength, uint8_t *pPiccReturnCode) |
| Perform a MFP Combined Write command. More... | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpChangeKey (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bCmd, uint16_t wBlockNo, uint8_t bKeyNo, uint8_t bKeyV, uint8_t *pDivInput, uint8_t bDivInputLength, uint8_t *pPiccReturnCode) |
| Perform a MFP Change Key command. More... | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpProximityCheck (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyV, uint8_t bBlCnt, uint8_t *pDivInput, uint8_t bDivInputLength, uint8_t *pPiccReturnCode) |
| Perform a MFP Proximity Check command. More... | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpVirtualCardSupport (phhalHw_SamAV2_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pData, uint8_t bDataLength, uint8_t *pPcdCapabilities, uint8_t bPcdCapabilitiesLength, uint8_t **pSupportedCardInfo, uint16_t *pSupportedCardInfoLength, uint8_t *pPiccReturnCode) |
| Perform a MFP Virtual Card Support command. More... | |
| phStatus_t | phhalHw_SamAV2_Cmd_MfpSelectVirtualCard (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bKeyNo, uint8_t bKeyV, uint8_t *pIid, uint8_t *pDivInput, uint8_t bDivInputLength, uint8_t *pPiccReturnCode) |
| Perform a MFP Select Virtual Card command. More... | |
Sam AV2 command code for MIFARE Plus X mode feature. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_WRITE_PERSO_INS 0xA8 |
| CMD Byte for WritePerso command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_WRITE 0x32 |
| CMD Byte for MFP_CombinedWrite command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_READ 0x31 |
| CMD Byte for MFP_CombinedRead command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_AUTHENTICATE 0x70 |
| CMD Byte for MFP_Authenticate command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_PROXIMITY_CHECK 0xFD |
| CMD Byte for MFP_Proximity Check command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_VIRTUAL_CARD_SUPPORT 0x40 |
| CMD Byte for MFP_VirtualCardSupport command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_SELECT_VIRTUAL_CARD 0x42 |
| CMD Byte for MFP_SelectVirtualCard command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_CHANGE_KEY_INS 0xA5 |
| CMD Byte for MFPChangeKey command. | |
Option macros for Sam AV2 MIFARE Plus X Mode Authenticate command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_AUTHENTICATE_AUTH_FIRST 0x01 |
| Option mask for a first MFP Authentication. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_AUTHENTICATE_NO_KDF 0x00 |
| Option mask for a MFP Authentication with no KDF. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_AUTHENTICATE_SL2_KDF 0x06 |
| Option mask for a MFP Authentication with SL2 KDF. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_AUTHENTICATE_SL3_KDF 0x08 |
| Option mask for a MFP Authentication with SL3 KDF. | |
Option macros for Sam AV2 MIFARE Plus X Mode ProximityCheck command. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_PROXIMITY_CHECK_DEFAULT 0x00 |
| Default option mask for a MFP_ProximityCheck. | |
| #define | PHHAL_HW_SAMAV2_CMD_MFP_PROXIMITY_CHECK_RAND_PROCESSING 0x01 |
| Option mask for random VPC processing. | |
SAM commands used for MIFARE Plus card communication in X-Mode.
| phStatus_t phhalHw_SamAV2_Cmd_MfpWritePerso | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint8_t * | pValues, | ||
| uint8_t | bValuesLength, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a Write Perso MFP command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | pValues | [In] Buffer containing the block numbers and values. The format is BNR_1 || DATA_1 || BNR_2 || DATA_2 ... |
| [in] | bValuesLength | [In] Length of the values buffer. It has to be a multiple of 8. |
| [out] | pPiccReturnCode | [Out] Return Code sent by the MFP card. |
| phStatus_t phhalHw_SamAV2_Cmd_MfpAuthenticate | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bKeyNo, | ||
| uint8_t | bKeyV, | ||
| uint16_t | wBlockNo, | ||
| uint8_t * | pPcdCapsIn, | ||
| uint8_t | bPcdCapsInLength, | ||
| uint8_t * | pDivInput, | ||
| uint8_t | bDivInputLength, | ||
| uint8_t * | pPcdCapsOut, | ||
| uint8_t * | pPdCaps, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a MFP Authenticate command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Option for Authenticate MFP:
|
| [in] | bKeyNo | [In] Key reference number to be used in authentication. |
| [in] | bKeyV | [In] Key version to be used in authentication. |
| [in] | wBlockNo | [In] Block Number to be sent to the card. |
| [in] | pPcdCapsIn | [In] Buffer containing the input PcdCaps. It has to be bDivInputLength bytes long. |
| [in] | bPcdCapsInLength | [In] Input PcdCaps length. |
| [in] | pDivInput | [In] Diversification data. This buffer has to be bDivInputLength bytes long. |
| [in] | bDivInputLength | [In] Diversification data length. If set to 00h no diversification is used. |
| [out] | pPcdCapsOut | [Out] Buffer containing the PcdCaps Out. It has to be 3 bytes long. |
| [out] | pPdCaps | [Out] Buffer containing the PdCaps Out. It has to be 3 bytes long. |
| [out] | pPiccReturnCode | [Out] Return Code sent by the MFP card. |
| phStatus_t phhalHw_SamAV2_Cmd_MfpCombinedRead | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint16_t | wOption, | ||
| uint8_t * | pPlainCommand, | ||
| uint8_t | bPlainCommandLength, | ||
| uint8_t ** | pData, | ||
| uint16_t * | pDataLength, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a MFP Combined Read command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] Option parameter:
|
| [in] | pPlainCommand | [In] Plain command to be sent to the card. |
| [in] | bPlainCommandLength | [In] Length of Plain Command. |
| [out] | pData | [Out] Pointer to the buffer containing the data returned by the card. |
| [out] | pDataLength | [Out] Amount of valid bytes in pData. |
| [out] | pPiccReturnCode | [Out] Return code sent by the MFP card. |
| phStatus_t phhalHw_SamAV2_Cmd_MfpCombinedWrite | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint16_t | wOption, | ||
| uint8_t * | pData, | ||
| uint8_t | bDataLength, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a MFP Combined Write command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] Option parameter:
|
| [in] | pData | [In] Input data stream. |
| [in] | bDataLength | [In] Length of the input data stream. |
| [out] | pPiccReturnCode | [Out] Return Code sent by the MFP card. |
| phStatus_t phhalHw_SamAV2_Cmd_MfpChangeKey | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint8_t | bCmd, | ||
| uint16_t | wBlockNo, | ||
| uint8_t | bKeyNo, | ||
| uint8_t | bKeyV, | ||
| uint8_t * | pDivInput, | ||
| uint8_t | bDivInputLength, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a MFP Change Key command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bCmd | [In] Command code for MIFARE Plus write (WRITE_M or WRITE). |
| [in] | wBlockNo | [In] Block number of the MIFARE Plus block. |
| [in] | bKeyNo | [In] Key reference number of the new MIFARE Plus key. |
| [in] | bKeyV | [In] Key version of the new MIFARE Plus key. |
| [in] | pDivInput | [In] Diversification data. This buffer has to be bDivInputLength bytes long. |
| [in] | bDivInputLength | [In] Diversification data length. If set to 00h no diversification is used. |
| [out] | pPiccReturnCode | [Out] Return Code sent by the MFP card. |
| phStatus_t phhalHw_SamAV2_Cmd_MfpProximityCheck | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint8_t | bOption, | ||
| uint8_t | bKeyNo, | ||
| uint8_t | bKeyV, | ||
| uint8_t | bBlCnt, | ||
| uint8_t * | pDivInput, | ||
| uint8_t | bDivInputLength, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a MFP Proximity Check command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Option parameter:
|
| [in] | bKeyNo | [In] Key reference number to be used for the proximity check. |
| [in] | bKeyV | [In] Key version to be used for the proximity check. |
| [in] | bBlCnt | [In] Specifies the maximum amount of random bytes transmitted at once. |
| [in] | pDivInput | [In] Diversification data length. If set to 00h no diversification is used. |
| [in] | bDivInputLength | [In] Diversification data. This buffer has to be bDivInputLength bytes long. |
| [out] | pPiccReturnCode | [Out] Return Code sent by the MFP card. |
| phStatus_t phhalHw_SamAV2_Cmd_MfpVirtualCardSupport | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint16_t | wOption, | ||
| uint8_t * | pData, | ||
| uint8_t | bDataLength, | ||
| uint8_t * | pPcdCapabilities, | ||
| uint8_t | bPcdCapabilitiesLength, | ||
| uint8_t ** | pSupportedCardInfo, | ||
| uint16_t * | pSupportedCardInfoLength, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a MFP Virtual Card Support command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] Option parameter:
|
| [in] | pData | [In] Buffer containing the data set field. |
| [in] | bDataLength | [In] Length of the data set buffer. |
| [in] | pPcdCapabilities | [In] PcdCapabilities sent to the card. This buffer has to be bPcdCapabilitiesLength bytes long. |
| [in] | bPcdCapabilitiesLength | [In] Length of PcdCapabilities. |
| [out] | pSupportedCardInfo | [Out] Pointer to buffer containing the card info of supported cards |
| [out] | pSupportedCardInfoLength | [Out] Amount of valid bytes in pSupportedCardInfo. |
| [out] | pPiccReturnCode | [Out] Return Code sent by the MFP card. |
| phStatus_t phhalHw_SamAV2_Cmd_MfpSelectVirtualCard | ( | phhalHw_SamAV2_DataParams_t * | pDataParams, |
| uint8_t | bKeyNo, | ||
| uint8_t | bKeyV, | ||
| uint8_t * | pIid, | ||
| uint8_t * | pDivInput, | ||
| uint8_t | bDivInputLength, | ||
| uint8_t * | pPiccReturnCode | ||
| ) |
Perform a MFP Select Virtual Card command.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeyNo | [In] Key reference number to be used in SVC command. |
| [in] | bKeyV | [In] Key version to be used in SVC command. |
| [in] | pIid | [In] desired Iid. This buffer has to be 16 bytes long. |
| [in] | pDivInput | [In] Diversification data. This buffer has to be bDivInputLength bytes long. |
| [in] | bDivInputLength | [In] Diversification data length. If set to 00h no diversification is used. |
| [out] | pPiccReturnCode | [Out] Return Code sent by the MFP card. |