libnfc
1.8.0
|
provide samples structs and functions to manipulate MIFARE Classic and Ultralight tags using libnfc More...
#include <nfc/nfc-types.h>
Go to the source code of this file.
Functions | |
bool | nfc_initiator_mifare_cmd (nfc_device *pnd, const mifare_cmd mc, const uint8_t ui8Block, mifare_param *pmp) |
Execute a MIFARE Classic Command. More... | |
provide samples structs and functions to manipulate MIFARE Classic and Ultralight tags using libnfc
Definition in file mifare.h.
bool nfc_initiator_mifare_cmd | ( | nfc_device * | pnd, |
const mifare_cmd | mc, | ||
const uint8_t | ui8Block, | ||
mifare_param * | pmp | ||
) |
Execute a MIFARE Classic Command.
pmp | Some commands need additional information. This information should be supplied in the mifare_param union. |
The specified MIFARE command will be executed on the tag. There are different commands possible, they all require the destination block number.
First an authentication must take place using Key A or B. It requires a 48 bit Key (6 bytes) and the UID. They are both used to initialize the internal cipher-state of the PN53X chip. After a successful authentication it will be possible to execute other commands (e.g. Read/Write). The MIFARE Classic Specification (http://www.nxp.com/acrobat/other/identification/M001053_MF1ICS50_rev5_3.pdf) explains more about this process.