LinuxSDK  V1.4.0.5
Functions
SwiApiGsmBasic.c File Reference

Contains source code for GSM API functions for the the SDK. More...

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

Functions

SWI_API SWI_RCODE SwiGetModemDisable (swi_bool *pModemDisable, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetModemDisable (const swi_bool bModemDisable, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetImei (struct SWI_STRUCT_Imei *pImei, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetTestHistoryByte (struct SWI_STRUCT_Thb *Thbp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetSerialNumber (struct SWI_STRUCT_Fsn *sFsn, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetAvailableFeatures (struct SWI_STRUCT_AvailFeatures *sFeatures, swi_uint32 sizeBuffer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetFeatureCustomizations (struct SWI_STRUCT_FeatureCustomizations *sCustomizations, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetBandInfo (struct SWI_STRUCT_Band *sBandInfo, swi_uint32 sizeBuffer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiStopAllNotif (swi_uint32 timeout)
 

Detailed Description

Contains source code for GSM API functions for the the SDK.

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

Function Documentation

SWI_API SWI_RCODE SwiGetAvailableFeatures ( struct SWI_STRUCT_AvailFeatures sFeatures,
swi_uint32  sizeBuffer,
swi_uint32  timeout 
)

This function is used to retrieve the modem's available features.

A request is sent to the modem. The modem's response contains the modem's available features.

The caller must specify the amount of time to wait for the modem to respond to the request.

Parameters
sFeatures,:[OUT] feature capability. See SWI_STRUCT_AvailFeatures for details.
timeout,:[IN] response timeout value in milliseconds
Returns
SWI_RCODE_OK - the request has been received by the modem
SWI_RCODE_REQUEST_TIMEOUT - the request has timed out
See Also
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiGetBandInfo ( struct SWI_STRUCT_Band sBandInfo,
swi_uint32  sizeBuffer,
swi_uint32  timeout 
)

This function is used to fetch the current frequency band and a list of all bands supported by the modem.

A request is sent to the modem. The modem's response contains the band information. The modem's response indicates the request has been processed by the modem.

The caller must specify the amount of time to wait for the modem to respond to the request.

NOTE: This function is deprecated and replaced with SwiGetRadioBand

Parameters
sBandInfo,:[OUT] the modem's band information
sizeBuffer,:[IN] size of buffer provided for the IMEI
timeout,:[IN] response timeout value in milliseconds
Returns
SWI_RCODE_OK - the request has been processed
SWI_RCODE_REQUEST_TIMEOUT - the request has timed out
See Also
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiGetFeatureCustomizations ( struct SWI_STRUCT_FeatureCustomizations sCustomizations,
swi_uint32  timeout 
)

This function is used to retrieve the modem's customized features.

A request is sent to the modem. The modem's response contains the modem's customizations.

The caller must specify the amount of time to wait for the modem to respond to the request.

Parameters
sCustomizations,:[OUT] modem's customizations
timeout,:[IN] response timeout value in milliseconds
Returns
SWI_RCODE_OK - the request has been received by the modem
SWI_RCODE_REQUEST_TIMEOUT - the request has timed out
See Also
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiGetImei ( struct SWI_STRUCT_Imei pImei,
swi_uint32  timeout 
)

This function is used to fetch the IMEI from the modem. The IMEI is consists of: Type Approval Code (TAC), Final Assembly Code (FAC), Serial Number (SNR)

A request is sent to the modem. The modem's response contains the IMEI plus check byte.

The caller must specify the amount of time to wait for the modem to respond to the request.

Parameters
pImei,:[OUT] pointer to SWI_STRUCT_Imei storage
timeout[IN],:response timeout value in milliseconds
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

Check byte

SWI_API SWI_RCODE SwiGetModemDisable ( swi_bool pModemDisable,
swi_uint32  timeout 
)

This function returns the modem power setting.

The modem disable setting will persist though the modem's power may be cycled.

Parameters
pModemDisable[OUT],:pointer to location to store the modem disable setting. true - modem is disabled false - modem is enabled
timeout[IN],:response timeout value in milliseconds
Returns
SWI_RCODE_OK - the disable modem setting has been received from the modem.
SWI_RCODE_REQUEST_TIMEOUT - the disable modem request has timed out
See Also
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiGetSerialNumber ( struct SWI_STRUCT_Fsn sFsn,
swi_uint32  timeout 
)

This function is used to retrieve the FSN

A request is sent to the modem. The modem's response contains the FSN.

The caller must specify the amount of time to wait for the modem to respond to the request.

Parameters
pFsn,:[OUT] FSN
timeout,:[IN] response timeout value in milliseconds
Returns
SWI_RCODE_OK - the request has been received by the modem
SWI_RCODE_REQUEST_TIMEOUT - the request has timed out
See Also
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiGetTestHistoryByte ( struct SWI_STRUCT_Thb Thbp,
swi_uint32  timeout 
)

This function is used to retrieve the test history byte

A request is sent to the modem. The modem's response contains the test history byte.

The caller must specify the amount of time to wait for the modem to respond to the request.

Parameters
Thbp,:[OUT] test history byte
timeout,:[IN] response timeout value in milliseconds
Returns
SWI_RCODE_OK - the request has been received by the modem
SWI_RCODE_REQUEST_TIMEOUT - the request has timed out
See Also
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiSetModemDisable ( const swi_bool  bModemDisable,
swi_uint32  timeout 
)

This function can be used to change the modem disable setting on the modem. A request is sent to the modem. The return code will indicate if the request was received by the modem. The result of the request is indicated in the SWI_NOTIFY_ModemDisabled notification. The caller must specify the amount of time to wait for the modem to respond to the request.

The modem disable setting will persist though the modem's power may be cycled.

Setting the modem to the on state causes a modem reset.

Parameters
bModemDisable[IN],:modem disable flag 1 - disable modem 0 - enable modem
timeout[IN],:response timeout value in milliseconds
Returns
SWI_RCODE_OK - modem disable has been set
SWI_RCODE_REQUEST_TIMEOUT - the modem disable request has timed out
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiStopAllNotif ( swi_uint32  timeout)

This function turns the all notifications OFF

After calling this function, the user enabled notifications will not be forwarded to the client's callback function.

The following notifications are enabled by default and can not be disabled:

SWI_NOTIFY_AirServerChange

Parameters
timeout,:[IN] response timeout value in milliseconds
See Also
See SWI_RCODE for additional information.
GSM only

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