LinuxSDK  V1.4.0.5
Data Structures | Enumerations | Functions
SwiApiCmUpgrade.h File Reference

This file contains definitions, enumerations, structures and forward declarations for SwiApiCmUpgrade.c file. More...

#include "SwiDataTypes.h"
#include "SwiRcodes.h"

Go to the source code of this file.

Data Structures

struct  SWI_STRUCT_NvStore
 
struct  SWI_STRUCT_FwDownload
 

Enumerations

enum  SWI_TYPE_NvOperation { SWI_NVOPER_BackupAll, SWI_NVOPER_RestoreAll, SWI_NVOPER_Backup, SWI_NVOPER_Restore }
 
enum  SWI_TYPE_NvCategory { SWI_NVCAT_Factory, SWI_NVCAT_Oem, SWI_NVCAT_User }
 
enum  SWI_TYPE_FW_IMAGE {
  FW_DWN_APPL, FW_DWN_BOOT, FW_DWN_QCOM, FW_DWN_USBD,
  FW_DWN_EXEC, FW_DWN_SWOC
}
 
enum  SWI_NOTIF_FW_TYPE {
  FW_INIT, FW_INIT_ERR, FW_SOFT_RESET, FW_SOFT_RESET_ERR,
  FW_START_REQ, FW_START_REQ_ERR, FW_FILE_ERR, FW_DWN,
  FW_DWN_ERR, FW_CHKSUM, FW_CHKSUM_ERR, FW_FLASH,
  FW_FLASH_ERR, FW_LAUNCH_FRAG, FW_LAUNCH_FRAG_ERR, FW_RESET,
  FW_RESET_ERR, FW_DONE
}
 

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)
 

Detailed Description

This file contains definitions, enumerations, structures and forward declarations for SwiApiCmUpgrade.c file.

Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved

Enumeration Type Documentation

An enumeration of firmware download states.

Supports all GSM devices. CDMA MPs are also supported, other CDMA devices are not supported.

See Also
SWI_STRUCT_FwDownload
SWI_NOTIFY_FwDownload
Enumerator
FW_INIT 

Initializing and opening the specified image file to download.

FW_INIT_ERR 

Initializing error occurred.

FW_SOFT_RESET 

Resetting the modem.

FW_SOFT_RESET_ERR 

Timeout expired. Failed to detect the modem after a reset.

FW_START_REQ 

Sending the Start Firmware Download request.

FW_START_REQ_ERR 

A Firmware Download Start request error has occurred. Possible errors include:

  1. A firmware download is already in progress.
  2. Failed to read from the firmware image file
  3. The modem rejected the Firmware Download Start request. Call SwiGetLastError to get additional information of the error.
FW_FILE_ERR 

Error reading from firmware file.

FW_DWN 

Firmware download packets being sent.

FW_DWN_ERR 

A error occurred during a Firmware Download Continuation request. Possible errors include:

  1. Timeout waiting for response from modem.
  2. Failed to read from the firmware image file.
FW_CHKSUM 

Calculating the check sum.

FW_CHKSUM_ERR 

Modem rejected the check sum value. Possible causes:

  1. Firmware image may be corrupt.
  2. Loss of packet during the firmware download process.
FW_FLASH 

Sending the Program Flash request (Application image only)

FW_FLASH_ERR 

An error has occurred while sending the Program Flash request.

FW_LAUNCH_FRAG 

Sending the Launch Fragment request (for all firmware image types except Application images).

FW_LAUNCH_FRAG_ERR 

An error has occurred while sending the Launch Fragment request.

FW_RESET 

Modem performing a reset.

FW_RESET_ERR 

Firmware reset error occurred. The API was unable to detect the modem within a predefined timeout period after the modem reset.

FW_DONE 

Firmware download complete.

Enumerates firmware image types.

Supports all GSM devices. CDMA MPs are also supported, other CDMA devices are not supported.

See Also
SWI_STRUCT_FlashImgInfo
SwiFirmwareDownload
Enumerator
FW_DWN_APPL 

Firmware application image

FW_DWN_BOOT 

Firmware bootloader image

FW_DWN_QCOM 

Qualcomm bootloader image

FW_DWN_USBD 

USB device descriptor image

FW_DWN_EXEC 

Firmware executable image

FW_DWN_SWOC 

Software on card image

An enumeration of NV category types.

See Also
SWI_STRUCT_NvStore
SWI_NOTIFY_NvStore
Enumerator
SWI_NVCAT_Factory 

Factory settings.

SWI_NVCAT_Oem 

OEM settings.

SWI_NVCAT_User 

User settings (default).

An enumeration of NV backup operation types.

See Also
SWI_STRUCT_NvStore
SWI_NOTIFY_NvStore
Enumerator
SWI_NVOPER_BackupAll 

NV backup all operation.

SWI_NVOPER_RestoreAll 

NV restore all operation.

SWI_NVOPER_Backup 

NV backup operation.

SWI_NVOPER_Restore 

NV restore operation.

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 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