C API for BALTECH SDK
main.h File Reference

This command group contains commands needed to update the firmware of the reader. More...

#include "../typedefs.h"

Go to the source code of this file.

Macros

#define BRP_Main_ErrOutdatedFirmware   BRP_ERR_STATUS(0xF000, 0x01)
 Is returned by isFirmwareUpToDate() if the following piece of firmware is not up to date. More...
 
#define BRP_Main_ErrUnknownVersion   BRP_ERR_STATUS(0xF000, 0x02)
 Is returned by isFirmwareUpToDate() if it's unknown whether the following piece of firmware is outdated or not. More...
 
#define BRP_Main_ErrInvalidState   BRP_ERR_STATUS(0xF000, 0x10)
 Is returned by Bf3UploadStart if an upload process is already running or by Bf3UploadContinue if an upload process is currently not active. More...
 
#define BRP_Main_ErrReadFile   BRP_ERR_STATUS(0xF000, 0x11)
 Is returned by Bf3UploadContinue if BF3/BEC2 file data couldn't be retrieved from the host. More...
 
#define BRP_Main_ErrInvalidFormat   BRP_ERR_STATUS(0xF000, 0x12)
 Is returned by Bf3UploadContinue if the BF3/BEC2 file has an invalid format. More...
 
#define BRP_Main_ErrInvalidCustomerKey   BRP_ERR_STATUS(0xF000, 0x13)
 Is returned by Bf3UploadContinue if the customer key of the BEC2 file doesn't match the customer key stored in the reader. More...
 
#define BRP_Main_ErrInvalidConfigSecurityCode   BRP_ERR_STATUS(0xF000, 0x14)
 Is returned by Bf3UploadContinue if the Config Security Code of the BEC2 file doesn't match the Config Security Code stored in the reader. More...
 
#define BRP_Main_ErrInvalidConfigVersion   BRP_ERR_STATUS(0xF000, 0x15)
 Is returned by Bf3UploadContinue if the configuration version of the BEC2 file is older than the configuration version stored in the reader. More...
 
#define BRP_Main_ErrInvalidCmac   BRP_ERR_STATUS(0xF000, 0x16)
 Is returned by Bf3UploadContinue if the Message Authentication Code (CMAC) of the BF3/BEC2 file is incorrect. More...
 
#define BRP_Main_ErrUpload   BRP_ERR_STATUS(0xF000, 0x17)
 Is returned by Bf3UploadContinue if a component of the current BF3/BEC2 file couldn't be written to the reader memory. More...
 
#define BRP_Main_ErrUnsupportedFirmware   BRP_ERR_STATUS(0xF000, 0x18)
 Is returned by Bf3UploadContinue if the BF3/BEC2 file contains a firmware which is not supported by the reader hardware. More...
 
#define BRP_Main_ErrAlreadyUpToDate   BRP_ERR_STATUS(0xF000, 0x19)
 Is returned by Bf3UploadContinue if all relevant components of the current BF3/BEC2 file are already up to date. More...
 
#define BRP_Main_ErrMissingConfigSecurityCode   BRP_ERR_STATUS(0xF000, 0x1A)
 Is returned by Bf3UploadContinue if the reader was not able to decode the current BEC2 file, because there is no Config Security Code stored in the reader yet. More...
 
#define BRP_Main_ErrInvalidEccKey   BRP_ERR_STATUS(0xF000, 0x1B)
 The elliptic curve key that is used to encrypt the configuration is wrong. More...
 

Functions

brp_errcode brp_Main_Bf2Upload (brp_protocol protocol, unsigned *Lines, size_t Lines_len, brp_Main_Bf2Upload_ResultCode *ResultCode, unsigned *InvertedResultCode)
 This command transfers a single line of a BF2 file to the reader (needed for firmware upload). More...
 
brp_errcode brp_Main_SwitchFW (brp_protocol protocol)
 After uploading the complete firmware with brp_Main_Bf2Upload(), this command is needed to activate the new firmware and reboot the reader. More...
 
brp_errcode brp_Main_MatchPlatformId2 (brp_protocol protocol, brp_buf Filter, size_t Filter_len, bool *Matches)
 This command checks if the PlatformID2 of the reader matches the PlatformID2 provided in the Filter parameter. More...
 
brp_errcode brp_Main_IsFirmwareUpToDate (brp_protocol protocol, brp_buf VersionDesc, size_t VersionDesc_len)
 This command checks if the following part of the firmware is already up to date. More...
 
brp_errcode brp_Main_Bf3UploadStart (brp_protocol protocol, unsigned *ReqDataAdr, unsigned *ReqDataLen)
 This command starts the upload of a BEC2/BF3 file to update the reader's configuration and/or firmware. More...
 
brp_errcode brp_Main_Bf3UploadContinue (brp_protocol protocol, unsigned DataAdr, brp_buf Data, size_t Data_len, bool *Reconnect, bool *Continue, unsigned *ReqDataAdr, unsigned *ReqDataLen, bool *ContainsEstimation, bool *ContainsReconnectRetryTimeout, unsigned *ReconnectRetryTimeout, unsigned *EstimatedNumberOfBytes, unsigned *EstimatedTimeOverhead)
 This command is used to transfer the data of a BEC2/BF3 file block by block to the reader. More...
 

Detailed Description

This command group contains commands needed to update the firmware of the reader.

Definition in file main.h.