18#ifndef FOTA_DOWNLOAD_H_
19#define FOTA_DOWNLOAD_H_
21#include <zephyr/kernel.h>
22#include <zephyr/types.h>
159int fota_download(
const char *host,
const char *file,
const int *sec_tag_list,
160 uint8_t sec_tag_count, uint8_t pdn_id,
size_t fragment_size,
185 int sec_tag, uint8_t pdn_id,
size_t fragment_size,
224 uint8_t sec_tag_count, uint8_t pdn_id,
size_t fragment_size);
248 uint8_t pdn_id,
size_t fragment_size);
274 int sec_tag, uint8_t pdn_id,
size_t fragment_size,
dfu_target_image_type
DFU image type.
Definition dfu_target.h:28
int fota_download_with_host_cfg(const char *host, const char *file, int sec_tag, uint8_t pdn_id, size_t fragment_size, const enum dfu_target_image_type expected_type, const struct downloader_host_cfg *host_cfg)
Download the given file with the specified image type from the given host.
int fota_download_s0_active_get(bool *const s0_active)
Get the active bootloader (B1) slot, s0 or s1.
fota_download_evt_id
FOTA download event IDs.
Definition fota_download.h:36
@ FOTA_DOWNLOAD_EVT_FINISHED
Definition fota_download.h:41
@ FOTA_DOWNLOAD_EVT_ERASE_DONE
Definition fota_download.h:59
@ FOTA_DOWNLOAD_EVT_PROGRESS
Definition fota_download.h:38
@ FOTA_DOWNLOAD_EVT_ERASE_PENDING
Definition fota_download.h:47
@ FOTA_DOWNLOAD_EVT_ERROR
Definition fota_download.h:62
@ FOTA_DOWNLOAD_EVT_CANCELLED
Definition fota_download.h:65
@ FOTA_DOWNLOAD_EVT_ERASE_TIMEOUT
Definition fota_download.h:53
int fota_download_b1_file_parse(char *s0_s1_files)
Parse and modify the provided file path so that it points to the bootloader file that should be used ...
int fota_download_start_with_image_type(const char *host, const char *file, int sec_tag, uint8_t pdn_id, size_t fragment_size, const enum dfu_target_image_type expected_type)
Download the given file with the specified image type from the given host.
void fota_download_if_name_set(const char *if_name)
Specify a network interface for the FOTA download library to use.
int fota_download_any(const char *host, const char *file, const int *sec_tag_list, uint8_t sec_tag_count, uint8_t pdn_id, size_t fragment_size)
Start downloading the given file of any image type from the given host.
int fota_download_start(const char *host, const char *file, int sec_tag, uint8_t pdn_id, size_t fragment_size)
Start downloading the given file of any image type from the given host.
void(* fota_download_callback_t)(const struct fota_download_evt *evt)
FOTA download asynchronous callback function.
Definition fota_download.h:114
int fota_download_target(void)
Get target image type.
fota_download_error_cause
FOTA download error cause values.
Definition fota_download.h:71
@ FOTA_DOWNLOAD_ERROR_CAUSE_INVALID_CONFIGURATION
Definition fota_download.h:91
@ FOTA_DOWNLOAD_ERROR_CAUSE_DOWNLOAD_FAILED
Definition fota_download.h:79
@ FOTA_DOWNLOAD_ERROR_CAUSE_CONNECT_FAILED
Definition fota_download.h:77
@ FOTA_DOWNLOAD_ERROR_CAUSE_INTERNAL
Definition fota_download.h:85
@ FOTA_DOWNLOAD_ERROR_CAUSE_PROTO_NOT_SUPPORTED
Definition fota_download.h:89
@ FOTA_DOWNLOAD_ERROR_CAUSE_INVALID_UPDATE
Definition fota_download.h:81
@ FOTA_DOWNLOAD_ERROR_CAUSE_TYPE_MISMATCH
Definition fota_download.h:83
@ FOTA_DOWNLOAD_ERROR_CAUSE_DFU
Definition fota_download.h:87
@ FOTA_DOWNLOAD_ERROR_CAUSE_NO_ERROR
Definition fota_download.h:73
int fota_download_cancel(void)
Cancel FOTA image downloading.
int fota_download_init(fota_download_callback_t client_callback)
Initialize the firmware over-the-air download library.
int fota_download(const char *host, const char *file, const int *sec_tag_list, uint8_t sec_tag_count, uint8_t pdn_id, size_t fragment_size, const enum dfu_target_image_type expected_type)
Download the given file with the specified image type from the given host.
Downloader host configuration options.
Definition downloader.h:147
enum fota_download_evt_id id
Definition fota_download.h:98
enum fota_download_error_cause cause
Definition fota_download.h:102
int progress
Definition fota_download.h:104
FOTA download event data.
Definition fota_download.h:97