BALTECH Docs |
C API for BALTECH SDK
|
brp_errcode brp_VHL_SetupMifare | ( | brp_protocol | protocol, |
bool | CustomKey, | ||
bool | KeyA, | ||
brp_buf | Key | ||
) |
This commands prepares the reader to access Mifare cards with the given Mifare key settings.
It can be called before using brp_VHL_Read() and brp_VHL_Write() with Mifare cards without configuring the reader with a VHL-file, i.e. when the ID parameter of brp_VHL_Read() or brp_VHL_Write() is set to 0xFF.
All data blocks of the card starting from sector 1 will be included in the ad hoc VHL-file. This only makes sense if all blocks can be accessed using the same key. If this assumption is too simplistic for your application, please use a normal VHL-file to set up the reader.
After calling brp_VHL_Select() , brp_VHL_Read() or brp_VHL_Write() with an ID parameter other than 0xFF, or after a reboot, the settings made by this command are lost.
For new applications, the command brp_VHL_Setup() should be used instead.
[in] | protocol | used to execute the command |
[in] | CustomKey | If true , use the key given in the Key parameter. If false , use 0xFF FF FF FF FF FF as key. |
[in] | KeyA | If true , use Key A, else use Key B. Please refer to the Mifare standard specification for details about Key A and Key B. |
[in] | Key |