BLE_OTAPC_FragmentDist
C
uint16_t BLE_OTAPC_FragmentDist(uint16_t connHandle, uint16_t length, uint8_t *p_data);
Description
Distribute fragmented firmware image to Server device for OTA DFU operation.
Application shall wait the BLE_OTAPC_EVT_FRAGMENT_COMPL_IND after the total length of sent fragmented images reaches to max fragmented image size before distributing the next fragmented images. If the length of remaining fragmented image is less than max fragmented image size, BLE_OTAPC_EVT_FRAGMENT_COMPL_IND will be generated once the complete image is received by server.
Parameters
Parameter | Description |
---|---|
[in] connHandle | Handle of the connection to do fragmented image distribution. |
[in] length | The length of fragment. It should not exceed ATT_MTU - 3. |
[in] p_data | The fragmented image data. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully starts fragmented image distribution. |
MBA_RES_OOM | No available memory. |
MBA_RES_INVALID_PARA | Invalid parameters. - Connection handle is not valid. - The length is exceed ATT_MTU - 3. - The total length of sent fragmented images + length exceeds max fragmented image size. |
MBA_RES_BAD_STATE | OTA profile server has not allowed to perform firmware update proceudre yet. |