BALTECH SDK wrapper functions reference

§ brp_get_update_blob_from_string()

brp_errcode brp_get_update_blob_from_string ( const char *  hex_str,
size_t  hex_len,
brp_buf blob,
size_t *  blob_size,
brp_mempool mempool 
)

Parse BEC2/BF3 hex string to binary blob.

The hex format has header lines followed by an empty line, then hex-encoded payload bytes. Header lines are skipped.

Parameters
hex_strPointer to the hex string content
hex_lenLength of hex_str in bytes
blobOutput: pointer to parsed binary blob (allocated in mempool)
blob_sizeOutput: size of the parsed blob
mempoolMemory pool for allocation. Caller frees via brp_mempool_free.
Returns
BRP_OK on success, BRP_ERR_PAYLOAD_FORMAT on invalid hex data, BRP_ERR_OUT_OF_MEMORY on allocation failure