Implementation of SAM commands used for MIFARE Common communication in S-Mode.
More...
|
| | Defines |
| | Definitions for SAM commands used for MIFARE Common communication in S-Mode.
|
| |
Implementation of SAM commands used for MIFARE Common communication in S-Mode.
◆ phhalHw_Sam_Cmd_SAM_CommitReaderID_Part1()
Performs CommitReaderID command execution part 1 in S mode.
The first part includes the header, block number if its MifarePlus state or only header if its DESFire state.
- Note
-
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bState | [In] Options for framing the command. Below options should be used.
|
| [in] | wBlockNr | [In] Number of the Transaction MAC Configuration Block. Will be used if bState is MIFARE Plus. |
| [out] | ppResponse | [Out] Transaction MAC Reader ID and MAC to be sent to MIFARE Plus or MIFARE DESFire PICC.
- TMRI: Transaction MAC Reader ID (16 byte)
- UID: SAM UID (7 byte)
- Padding: 0x80 || zero padding
- MAC: 4 or 8 bytes MAC according to active Secure Messaging
|
| [out] | pRespLen | [Out] Length of bytes available in ppResponse buffer. |
◆ phhalHw_Sam_Cmd_SAM_CommitReaderID_Part2()
Performs CommitReaderID command execution part 2 in S mode.
The last part includes the header and the response received from Mfifare Plus or DESFire PICC.
- Note
- This interface should be called only if SAM_CommitReaderID Part1 returns Chaining Status.
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bPiccErrCode | [In] Error Code sent by MIFARE Plus PICC. For success it should will
- 0x90: MIFARE Plus
- 0x00: MIFARE DESFire
|
| [in] | pData | [In] The complete data (EncTMRI and MAC) received from MIFARE Plus or MIFARE DESFire PICC.
- EncTMRI (16 bytes): Encrypted Transaction MAC ReaderID of the latest successful transaction retuned by the PICC. Present if bPiccErrCode = 0x00 or 0x90
- MAC (8byte): Response MAC protection. Present if bPiccErrCode = 0x00 or 0x90 and not applying D40 Secure Messaging
- Null otherwise
|
| [in] | bDataLen | [In] Length of bytes available in pData buffer. |
| [out] | pPiccReturnCode | [Out] Error code returned by MIFARE PICC. This will of 1 byte in length. |