5.9.4.1 OTA File Get
NMI_API sint8 m2m_ota_host_file_get
(
unsigned char *pcDownloadUrl,
tpfFileGetCb pfHFDGetCb
);
This API is used to get a file which links to the file stored remotely. The link is passed to the WINC to establish a TCP connection to retrieve the file from that location. It is also possible to use a server configured for TLS.
A callback must also be provided so that it is executed when the File Get operation completes. The status of the File Get is passed onto this callback and if the status is successful, the file handler generated by the WINC and the total size of the downloaded file is passed correctly to the callback.