Linux SDK (lite-qmi)  MBPL_SDK_R25_ENG3
Non Service Specific API (SWI)

Files

file  common.h
 
file  qaGobiApiSwi.h
 SWI API function prototypes.
 

Data Structures

struct  pack_qmi_t
 
struct  unpack_qmi_t
 
struct  unpack_result_t
 

Enumerations

enum  eLOG_LEVEL {
  eLOG_INFO, eLOG_DEBUG, eLOG_WARN, eLOG_ERROR,
  eLOG_FATAL
}
 
enum  eQMI_SVC {
  eCTL =0, eWDS =0x01, eDMS =0x02, eNAS =0x03,
  eQOS =0x04, eSMS =0x05, eCAT =0x0A, eUIM =0x0B,
  eLOC =0x10, eSAR =0x11, eIMS =0x12, eTS =0x17,
  eTMD =0x18, eWDA =0x1A, eIMSA =0x21, eDSD =0x2A,
  eRMS =225, eSWILOC =246, eSWINAS =252, eSWIDMS =254
}
 
enum  msgtype { eREQ =0, eRSP =2, eIND =4 }
 

Functions

uint16_t helper_get_xid (uint8_t *qmi_resp)
 
uint16_t helper_get_msgid (uint8_t *qmi_resp)
 
uint16_t helper_get_error_code (uint8_t *qmi_resp)
 
char * helper_get_error_reason (uint16_t retVal)
 
const char * helper_get_resp_ctx (uint8_t svc, uint8_t *pbuf, uint16_t len, unpack_qmi_t *pCtx)
 
const char * helper_get_req_str (uint8_t svc, uint8_t *req, uint32_t len)
 
unsigned unpack_result_code_only (uint8_t *pMdmResp)
 
int helper_set_log_func (logger func)
 
void liteqmi_log (uint8_t lvl, const char *fmt,...)
 
int helper_set_log_lvl (uint8_t lvl)
 
char * get_version ()
 
char * liteqmi_GetVersion ()
 
void liteqmi_helper_decode7bitAsciiEncString (uint8_t *encoded_str, uint8_t encoded_len, uint8_t *decoded_str)
 
int helper_isBootLoader_DebugEnabled (const char *szPath, const char *pQsn)
 
ULONG SLQSGetSdkVersion (CHAR **sdkversionpp)
 
int SLQSGetPidof (CHAR *pProcName)
 

Detailed Description

Enumeration Type Documentation

◆ eLOG_LEVEL

enum eLOG_LEVEL

log levels

◆ eQMI_SVC

enum eQMI_SVC

qmi service

◆ msgtype

enum msgtype

qmi message type

Function Documentation

◆ get_version()

char* get_version ( )
Returns
version string

◆ helper_get_error_code()

uint16_t helper_get_error_code ( uint8_t *  qmi_resp)

Helper function to get SDK error code based on device error code in QMI response

Parameters
[in]qmi_respQMI response message
Returns
SDK error code

◆ helper_get_error_reason()

char* helper_get_error_reason ( uint16_t  retVal)

Helper function to get error reason string

Parameters
[in]retValReturn code value
Returns
Error message based on the return code

◆ helper_get_msgid()

uint16_t helper_get_msgid ( uint8_t *  qmi_resp)

Helper function to get message ID

Parameters
[in]qmi_respQMI response message
Returns
Message ID in uint16_t

◆ helper_get_req_str()

const char* helper_get_req_str ( uint8_t  svc,
uint8_t *  req,
uint32_t  len 
)

extract msgid string from modem req

Parameters
[in]svcqmi service
[in]reqqmi request
[in]lenrequest length
Returns
qmi message string

◆ helper_get_resp_ctx()

const char* helper_get_resp_ctx ( uint8_t  svc,
uint8_t *  pbuf,
uint16_t  len,
unpack_qmi_t pCtx 
)

extract msgid/xid/type from modem reply

Parameters
[in]svcqmi service
[in]pbufqmi response/indication
[in]lenresponse/indication length
[out]pCtxunpacked context
Returns
qmi message string

◆ helper_get_xid()

uint16_t helper_get_xid ( uint8_t *  qmi_resp)

Helper function to get transaction ID

Parameters
[in]qmi_respQMI response message
Returns
Transaction ID in uint16_t

◆ helper_isBootLoader_DebugEnabled()

int helper_isBootLoader_DebugEnabled ( const char *  szPath,
const char *  pQsn 
)
Parameters
[in]szPaththe full path of the provided bootloader or firmware file
[in]pQsnthe QSN of a specific module user wants to check, it is a 4 bytes hex value without the prefix 0X. It can be retrieved by AT command AT!ENTERCND="<password>", AT!SECBOOTCFG?, the first parameter of the response of AT!SECBOOTCFG?.
Returns
values listed below
  • -1 bootloader is not debug enabled
  • 0 unbale to retrieve the bootloader debug info
  • 1 bootloader is debug enabled for the provided QSN
  • 4 either szPath or pQsn is invalid (NULL)
  • 18 invalid file

◆ helper_set_log_func()

int helper_set_log_func ( logger  func)

Set external log function for lite-qmi messages. If no external log function is used, lite-qmi messages go to syslog.

Parameters
[in]funcExternal logger function
Returns
0: indicates operation successful

◆ helper_set_log_lvl()

int helper_set_log_lvl ( uint8_t  lvl)

set log level

◆ liteqmi_GetVersion()

char* liteqmi_GetVersion ( )
Returns
version string

◆ liteqmi_helper_decode7bitAsciiEncString()

void liteqmi_helper_decode7bitAsciiEncString ( uint8_t *  encoded_str,
uint8_t  encoded_len,
uint8_t *  decoded_str 
)

decode 7bit encoded string

Parameters
[in]encoded_str7 bit encoded ASCII
[in]encoded_lenencoded length
[out]decoded_strdecoded ASCII string

◆ liteqmi_log()

void liteqmi_log ( uint8_t  lvl,
const char *  fmt,
  ... 
)

lite-qmi logging function. If external log function is used, logging goes to external log function. Otherwise, logging goes to syslog.

Parameters
[in]lvlLogging level
[in]fmtFormat of the logging message
Returns
None

◆ SLQSGetPidof()

int SLQSGetPidof ( CHAR *  pProcName)

Internal Wrapper function for enabling invocation of SLQS implementation pidof() function

Parameters
[in]pProcName
  • Process name whose PID is to be retrieved
Returns
pid if process exists else 0
See also
NA
Note
NA

◆ SLQSGetSdkVersion()

ULONG SLQSGetSdkVersion ( CHAR **  sdkversionpp)

Returns the SDK version string

Parameters
[out]sdkversionpp
  • pointer to pointer of NULL terminated string
Returns
eQCWWAN_ERR_NONE success eQCWWAN_ERR_INVALID_ARG provided pointer is NULL
Note
Technology Supported: N/A Timeout: 2 seconds

◆ unpack_result_code_only()

unsigned unpack_result_code_only ( uint8_t *  pMdmResp)

common handler for unpacking response with TLV type 0x02 only