LinuxQMISDK-Lite  SLQS04.00.02
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
libsdp.h File Reference

Go to the source code of this file.

Data Structures

struct  _libSDP_FirmwareInfo_
 

Macros

#define IMG_MASK_MDM   (1<<0)
 
#define IMG_MASK_PRI   (1<<1)
 
#define IMG_MASK_CLEAR   (0x000)
 
#define IMG_MASK_GENERIC   (0xFFFF)
 
#define LIBSDP_CARRIER_PACKAGE_SKU   "9999999"
 
#define LIBSDP_SKU_STRING_LENGTH   7
 
#define FIRMWARE_INFO_STRING_SIZE   20
 

Typedefs

typedef struct
_libSDP_FirmwareInfo_ 
libSDP_FirmwareInfo
 
typedef void(* libsdplogger )(uint8_t lvl, const char *buff)
 

Enumerations

enum  libSDP_fwdwl_error_codes {
  eSDP_FWDWL_SUCCESS = 0,
  eSDP_FWDWL_ERR_GENERAL = 100,
  eSDP_FWDWL_ERR_SDK,
  eSDP_FWDWL_ERR_SET_CBK,
  eSDP_FWDWL_ERR_PATH_TOO_LONG,
  eSDP_FWDWL_ERR_PATH_NOT_SPECIFIED,
  eSDP_FWDWL_ERR_FW_UPGRADE,
  eSDP_FWDWL_ERR_INVALID_DEV,
  eSDP_FWDWL_ERR_INVALID_PATH,
  eSDP_FWDWL_ERR_TIMEOUT,
  eSDP_FWDWL_ERR_FAIL,
  eSDP_FWDWL_ERR_PRI_FAIL,
  eSDP_FWDWL_ERR_FW_VERSION_FAIL,
  eSDP_FWDWL_ERR_END
}
 
enum  libSDP_Fw_Type {
  eFW_TYPE_MBN_GOBI,
  eFW_TYPE_MBN,
  eFW_TYPE_CWE,
  eFW_TYPE_NVU,
  eFW_TYPE_SPK,
  eFW_TYPE_INVALID,
  eFW_TYPE_CWE_NVU
}
 
enum  libSDP_Models {
  eModel_Unknown =-1,
  eModel_9X15 =0,
  eModel_9X30 =1
}
 

Functions

int libSDP_ExtractFirmwareParametersByPath (char *pImagePath, libSDP_FirmwareInfo *info)
 
int libSDP_BuildImagesPreferenceRequest (libSDP_FirmwareInfo info, pack_fms_SetImagesPreference_t *pack)
 
int libSDP_CalculateImageMask (unpack_fms_SetImagesPreference_t SetPrefRspFromModem)
 
int libSDP_getFileType (char *szPath)
 
unsigned int libSDP_DownloadFW (char *pImagePath, char *szTTYPath, int iFWImageType, int image_mask, int iModelFamily)
 
int libSDP_GetModelFamily (char *pModelString)
 
int libSDP_CheckValidFirmwareInfo (libSDP_FirmwareInfo info)
 
char * libSDP_GetVersion ()
 
int libsdp_set_log_func (libsdplogger func)
 

Detailed Description

Filename: libsdp.h

Purpose: Global definitions used inside the SDK

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

Macro Definition Documentation

#define FIRMWARE_INFO_STRING_SIZE   20
#define IMG_MASK_CLEAR   (0x000)
#define IMG_MASK_GENERIC   (0xFFFF)
#define IMG_MASK_MDM   (1<<0)
#define IMG_MASK_PRI   (1<<1)
#define LIBSDP_CARRIER_PACKAGE_SKU   "9999999"
#define LIBSDP_SKU_STRING_LENGTH   7

Typedef Documentation

This structure contains information of the response parameters associated with a Read Transparent API.

Parameters
szModelid_str
  • Model Name String
szFwversion_str
  • Firmware Version String.
szSku_str
  • SKU String.
szPackageid_str
  • Package ID String.
szCarrier_str
  • Carrier String.
szCarrierPriversion_str
  • Carrier PRI Version String.
typedef void(* libsdplogger)(uint8_t lvl, const char *buff)

This Custom Log prototype.

Parameters
lvl[IN]
  • Log level.
buff[IN]
  • Log String.
Returns
none

Enumeration Type Documentation

Enumerator
eFW_TYPE_MBN_GOBI 
eFW_TYPE_MBN 
eFW_TYPE_CWE 
eFW_TYPE_NVU 
eFW_TYPE_SPK 
eFW_TYPE_INVALID 
eFW_TYPE_CWE_NVU 
Enumerator
eSDP_FWDWL_SUCCESS 
eSDP_FWDWL_ERR_GENERAL 
eSDP_FWDWL_ERR_SDK 
eSDP_FWDWL_ERR_SET_CBK 
eSDP_FWDWL_ERR_PATH_TOO_LONG 
eSDP_FWDWL_ERR_PATH_NOT_SPECIFIED 
eSDP_FWDWL_ERR_FW_UPGRADE 
eSDP_FWDWL_ERR_INVALID_DEV 
eSDP_FWDWL_ERR_INVALID_PATH 
eSDP_FWDWL_ERR_TIMEOUT 
eSDP_FWDWL_ERR_FAIL 
eSDP_FWDWL_ERR_PRI_FAIL 
eSDP_FWDWL_ERR_FW_VERSION_FAIL 
eSDP_FWDWL_ERR_END 
Enumerator
eModel_Unknown 
eModel_9X15 
eModel_9X30 

Function Documentation

int libSDP_BuildImagesPreferenceRequest ( libSDP_FirmwareInfo  info,
pack_fms_SetImagesPreference_t pack 
)

This API Build Image Preference Request Using Firmware Information.

Parameters
info[IN]
pack[OUT]
Returns
0 on success, libSDP_fwdwl_error_codes error value otherwise
See Also
See libSDP_fwdwl_error_codes for error values
int libSDP_CalculateImageMask ( unpack_fms_SetImagesPreference_t  SetPrefRspFromModem)

This API Calculate Image Mask for Firmware Download.

Parameters
SetPrefRspFromModem[IN]
Returns
Image Mask
  • IMG_MASK_MDM | IMG_MASK_PRI
int libSDP_CheckValidFirmwareInfo ( libSDP_FirmwareInfo  info)

This API Check Valid Firmware Information to build Image Prefernce Request.

Parameters
info[IN]
Returns
0 on success, -1 error value otherwise
unsigned int libSDP_DownloadFW ( char *  pImagePath,
char *  szTTYPath,
int  iFWImageType,
int  image_mask,
int  iModelFamily 
)

This API Download Firmware.

Parameters
pImagePath[IN]
  • Firmware Folder Path.
szTTYPath[IN]
  • QDL Device Path.
iFWImageType[IN]
image_mask[IN]
  • Image Mask.
    • IMG_MASK_MDM | IMG_MASK_PRI
iModelFamily[IN]
Returns
0 on success, libSDP_fwdwl_error_codes error value otherwise
See Also
See libSDP_fwdwl_error_codes for error values
int libSDP_ExtractFirmwareParametersByPath ( char *  pImagePath,
libSDP_FirmwareInfo info 
)

This API Extrace Firmware Parameters From Path.

Parameters
pImagePath[IN]
  • Firmware Folder Path.
libSDP_FirmwareInfo[OUT]
Returns
0 on success, libSDP_fwdwl_error_codes error value otherwise
See Also
See libSDP_fwdwl_error_codes for error values
int libSDP_getFileType ( char *  szPath)

This API Get File Type By Path

Parameters
szPath[IN]
Returns
eFW_TYPE_INVALID on error, libSDP_Fw_Type value otherwise
See Also
See libSDP_Fw_Type for values
int libSDP_GetModelFamily ( char *  pModelString)

This API Get Model Famliy from a model string.

Parameters
pModelString[IN]
  • Model String.
Returns
eModel_Unknown on Error, libSDP_Models value otherwise
See Also
See libSDP_Models for values
char* libSDP_GetVersion ( )

This API Get Lib SDP Version.

Parameters
No;
Returns
Version String
int libsdp_set_log_func ( libsdplogger  func)

This API Set Custom Log function.

Parameters
func[IN]
Returns
none

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