nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ lwm2m_os_dfu_start()

int lwm2m_os_dfu_start ( int  img_type,
size_t  max_file_size,
bool  crc_validate 
)

#include <lib/bin/lwm2m_carrier/include/lwm2m_os.h>

Start a firmware upgrade.

Parameters
[in]img_typeDFU target type to be initialized.
[in]max_file_sizeEstimate of the new firmware image to be received. May be greater than or equal to the actual image size received by the end.
[in]crc_validateFlag to indicate whether to validate the incoming image fragments by means of IEEE CRC32.
Return values
0Ready to start a new firmware upgrade.
Returns
A positive number of bytes written so far, if the previous upgrade was not completed. In this case, the upgrade will resume from this offset.
Return values
-EBUSYAnother firmware upgrade is already ongoing.
-EFBIGFile size exceeds the DFU area size.
-ENOTSUPFirmware image not supported or unknown.
-EIOInternal error.