C API for BALTECH SDK

§ brp_VHL_SetupMifare()

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 VHL.Read and VHL.Write with Mifare cards without configuring the reader with a VHL-file, i.e. when the ID parameter of VHL.Read or 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 callingVHL.Select ,VHL.Read orVHL.Write with an ID parameter other than 0xFF, or after a reboot, the settings made by this command are lost.

For new applications, the commandVHL.Setup should be used instead.

Parameters
[in]protocolused to execute the command
[in]CustomKeyIf true , use the key given in the Key parameter. If false , use 0xFF FF FF FF FF FF as key.
[in]KeyAIf 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
Deprecated:
This command may be removed in future!