LinuxSDK  V1.4.0.5
Functions
SwiApiCmUpgrade.c File Reference

Contains source code for GSM APIs related to the Firmware Download. More...

#include "SwiApiCmUpgrade.h"
#include "ap/apidefs.h"

Functions

SWI_API SWI_RCODE SwiNvStore (struct SWI_STRUCT_NvStore sNvStore, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiFirmwareDownload (swi_charp szFileName, enum SWI_TYPE_FW_IMAGE eFwDwnType, swi_bool bMpDownload, swi_uint32 nHIPPayloadSize, swi_uint32 timeout)
 
SWI_API void SwiGetFwDownloadError (swi_charp szError, swi_uint32 sizeBuffer)
 

Detailed Description

Contains source code for GSM APIs related to the Firmware Download.

Copyright: © 2011 Sierra Wireless, Inc. all rights reserved

Function Documentation

SWI_API SWI_RCODE SwiFirmwareDownload ( swi_charp  szFileName,
enum SWI_TYPE_FW_IMAGE  eFwDwnType,
swi_bool  bMpDownload,
swi_uint32  nHIPPayloadSize,
swi_uint32  timeout 
)

This function is used to initiate the download of a single firmware image to the device.

Parameters
szFilename[IN] Name of the file containing the image to be downloaded
eFwDwnType[IN] Type of firmware image to be downloaded
bMpDownload[IN] Flag indicating if this is a MP download request
nHIPPayloadSize[IN] Block size to be used when copying the image to the device.
timeout[IN] API timeout parameter in ms. Note, this API ignores this parameter
Returns
SWI_RCODE_OK: The request has been received by the modem.
See SWI_RCODE for other error return codes.
See Also
enum SWI_TYPE_FW_IMAGE
SWI_NOTIFY_FwDownload
SWI_API void SwiGetFwDownloadError ( swi_charp  szError,
swi_uint32  sizeBuffer 
)

This function is used to retrieve the last error that occurred during the firmware download process.

A request is sent to the modem. The modem's response contains the firmware download error.

Parameters
szError[OUT],:firmware download error
sizeBuffer[IN],:length of buffer provided for the firmware download error
Returns
SWI_RCODE_OK - the request has been received by the modem
SWI_RCODE_REQUEST_TIMEOUT - the request has timed out
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiNvStore ( struct SWI_STRUCT_NvStore  sNvStore,
swi_uint32  timeout 
)

This function is used to backup modem data before a firmware upgrade.

Operation should be set to SWI_NVOPER_Backup and category should be set to SWI_NVCAT_User. All other fields are ignored. Caller should enable notification for SWI_NOTIFY_NvStore. The SWI_NOTIFY_NvStore notification will tell the caller whether or not the operation succeeded.

Parameters
sNvStore,:[IN] Details type of operation and data to backup
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been received by the modem.
See SWI_RCODE for other error return codes.
See Also
struct SWI_STRUCT_NvStore
SWI_NOTIFY_NvStore

Linux SDK V1.4.0.5
Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved