17 #ifndef __BRP_BALTECH_API_CMDS_VHL_H__ 18 #define __BRP_BALTECH_API_CMDS_VHL_H__ 19 #include "../typedefs.h" 30 #define BRP_VHL_ErrNoTag BRP_ERR_STATUS(0x0100, 0x01) 34 #define BRP_VHL_ErrCardNotSelected BRP_ERR_STATUS(0x0100, 0x02) 38 #define BRP_VHL_ErrHf BRP_ERR_STATUS(0x0100, 0x03) 43 #define BRP_VHL_ErrConfig BRP_ERR_STATUS(0x0100, 0x04) 49 #define BRP_VHL_ErrAuth BRP_ERR_STATUS(0x0100, 0x05) 55 #define BRP_VHL_ErrRead BRP_ERR_STATUS(0x0100, 0x06) 61 #define BRP_VHL_ErrWrite BRP_ERR_STATUS(0x0100, 0x07) 66 #define BRP_VHL_ConfcardRead BRP_ERR_STATUS(0x0100, 0x08) 71 #define BRP_VHL_ErrInvalidCardType BRP_ERR_STATUS(0x0100, 0x09) 76 #define BRP_VHL_ErrNotSupported BRP_ERR_STATUS(0x0100, 0x0A) 81 #define BRP_VHL_ErrFormat BRP_ERR_STATUS(0x0100, 0x0B) 85 #define BRP_VHL_ErrHw BRP_ERR_STATUS(0x0100, 0x0C) 90 #define BRP_VHL_ErrApdu BRP_ERR_STATUS(0x0100, 0x0D) 320 brp_errcode brp_VHL_Setup(
brp_protocol protocol,
brp_CardType ConsideredCardType,
brp_buf MifareKey,
bool AsKeyA,
unsigned MadId,
unsigned AppId,
brp_DesfireFileDescription DesfireFileDesc,
brp_buf Key,
size_t Key_len,
brp_buf SegmentInfo,
size_t SegmentInfo_len,
bool EnStamp,
brp_VHL_Setup_AdrMode AdrMode,
unsigned FirstBlock,
unsigned BlockCount,
brp_VHL_Setup_OptionFlag OptionFlag,
unsigned BlockSize,
unsigned SelectFileCmdListLen,
brp_VHL_Setup_SelectFileCmdList_Entry* SelectFileCmdList,
size_t SelectFileCmdList_len,
unsigned FileLen,
unsigned ApduTimeout);
brp_errcode brp_VHL_GetSnr(brp_protocol protocol, brp_buf *Snr, size_t *Snr_len, brp_mempool *mempool)
This command returns the serial number (UID) of the currently selected card.
brp_errcode brp_VHL_ResolveFilename(brp_protocol protocol, char *FileName, unsigned *Id)
This command returns the ID of a VHL file based on its filename.
brp_errcode brp_VHL_GetATR(brp_protocol protocol, brp_buf *ATR, size_t *ATR_len, brp_mempool *mempool)
This command returns the Answer to Reset (ATR) of the currently selected card as defined in the PC/SC...
brp_errcode brp_VHL_Setup(brp_protocol protocol, brp_CardType ConsideredCardType, brp_buf MifareKey, bool AsKeyA, unsigned MadId, unsigned AppId, brp_DesfireFileDescription DesfireFileDesc, brp_buf Key, size_t Key_len, brp_buf SegmentInfo, size_t SegmentInfo_len, bool EnStamp, brp_VHL_Setup_AdrMode AdrMode, unsigned FirstBlock, unsigned BlockCount, brp_VHL_Setup_OptionFlag OptionFlag, unsigned BlockSize, unsigned SelectFileCmdListLen, brp_VHL_Setup_SelectFileCmdList_Entry *SelectFileCmdList, size_t SelectFileCmdList_len, unsigned FileLen, unsigned ApduTimeout)
This command creates a VHL file dynamically and transfers it to the reader's RAM. ...
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
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...
brp_errcode brp_VHL_SetupISO15(brp_protocol protocol, unsigned FirstBlock, unsigned BlockCount, bool OptionFlag)
This commands prepares the reader to access ISO15693 cards with the given settings.
brp_errcode brp_VHL_ExchangeLongAPDU(brp_protocol protocol, brp_CardType AssumedCardType, bool Reset, bool ContinueCmd, brp_buf Cmd, size_t Cmd_len, bool *ContinueResp, brp_buf *Resp, size_t *Resp_len, brp_mempool *mempool)
This command sends basic Inter-Industry commands to the currently selected card in accordance with th...
brp_errcode brp_VHL_GetFileInfo(brp_protocol protocol, unsigned Id, unsigned *Len, unsigned *BlockSize)
This command returns the available size of the VHL-file whose ID is specified by the ID parameter...
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
brp_errcode brp_VHL_ExchangeAPDU(brp_protocol protocol, brp_CardType AssumedCardType, brp_buf Cmd, size_t Cmd_len, brp_buf *Resp, size_t *Resp_len, brp_mempool *mempool)
This command sends APDUs to the currently selected card.
struct brp_mempool_object_t * brp_mempool
mempool handle.
brp_VHL_Setup_AdrMode
Specifies the addressing mode.
brp_VHL_Setup_OptionFlag
Option flag value for read/write operations.
brp_errcode brp_VHL_Select(brp_protocol protocol, brp_CardFamilies CardFamiliesFilter, bool Reselect, bool AcceptConfCard, brp_CardType *SelectedCardType)
This command selects a card or tag in the antenna field for further operations.
brp_errcode brp_VHL_SetupLegic(brp_protocol protocol, unsigned StampLen, unsigned SegmentID, brp_buf Stamp, size_t Stamp_len)
This commands prepares the reader to access LEGIC cards with the given settings.
brp_errcode brp_VHL_GetLegacyATR(brp_protocol protocol, brp_buf *ATR, size_t *ATR_len, brp_mempool *mempool)
This command is deprecated and should only be used for compatibility purposes with older firmware ver...
brp_errcode brp_VHL_Format(brp_protocol protocol, unsigned Id)
This command formats a blank card based on a VHL file.
brp_errcode brp_VHL_IsSelected(brp_protocol protocol)
This command checks if the card/label selected by the last execution of the brp_VHL_Select() command ...
brp_errcode brp_VHL_Write(brp_protocol protocol, unsigned Id, unsigned Adr, brp_buf Data, size_t Data_len)
This command writes data to a card based on a VHL file.
brp_errcode brp_VHL_CheckReconfigErr(brp_protocol protocol, bool *Failed)
This command returns the status of the last reconfiguration with a ConfigCard using the brp_VHL_Selec...
brp_errcode brp_VHL_Read(brp_protocol protocol, unsigned Id, unsigned Adr, unsigned Len, brp_buf *Data, size_t *Data_len, brp_mempool *mempool)
This command reads data from a card based on a VHL file.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.