LinuxSDK  V1.4.0.5
Functions
SwiApiCmBasic.c File Reference

Contains source code for Common API functions for the the SDK. Common means common to all wireless data technologies, CDMA, GSM, etc. More...

#include "SwiApiCmBasic.h"
#include "am/amudefs.h"
#include "ap/apidefs.h"

Functions

SWI_API SWI_RCODE SwiApiStartup (struct SWI_STRUCT_ApiStartup *pOpenParams)
 
SWI_API SWI_RCODE SwiTerminateSDK (void)
 
SWI_API SWI_RCODE SwiGetAvailAirServers (struct SWI_STRUCT_AirServerList *sList)
 
SWI_API SWI_RCODE SwiSelectAirServer (struct SWI_STRUCT_AirServer *airServer)
 
SWI_API SWI_RCODE SwiGetAirServerInfo (struct SWI_STRUCT_AirServer sAirServer, struct SWI_STRUCT_AirServerExtended *sInfo)
 
SWI_API SWI_RCODE SwiGetSdkVersion (swi_charp *sdkversionpp)
 
SWI_API void SwiGetLastError (swi_char *szError, swi_uint32 sizeBuffer)
 
SWI_API SWI_RCODE SwiGetFirmwareVersion (swi_charp szFWVersion, swi_uint32 sizeBuffer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetFirmwareBuildDate (swi_charp szBuildDate, swi_uint32 sizeBuffer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetHardwareVersion (swi_charp szHWVersion, swi_uint32 sizeBuffer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetBootVersion (swi_charp szBVVersion, swi_uint32 sizeBuffer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetBootloaderBuildDate (swi_charp szBLBldDate, swi_uint32 *nLength, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetUsbdInfo (struct SWI_STRUCT_UsbdInfo *pUsbdInfo, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPriInfo (struct SWI_STRUCT_PriInfo *pPriInfo, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetModemType (struct SWI_STRUCT_ModemType *pSwiModemType, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetDeviceTime (struct SWI_STRUCT_DeviceTime *pDeviceTime, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetDeviceID (swi_charp pszDeviceID, swi_uint32 sizeBuffer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetFlashImgInfo (struct SWI_STRUCT_FlashImgInfo *pFlashImgInfo, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetObjRngRev (struct SWI_STRUCT_ObjRngRev *ObjRngRevp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRadioPower (struct SWI_STRUCT_RadioPower *pRadioPower, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetRadioPower (struct SWI_STRUCT_RadioPower *pRadioPower, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRadioTempState (struct SWI_STRUCT_RadioTempState *pRadioTemp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRadioBattery (struct SWI_STRUCT_RadioBattery *pRadioBattery, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetCurrentRadioBand (struct SWI_STRUCT_RadioBandList *pRadioBand, swi_int32 timeout)
 
SWI_API SWI_RCODE SwiGetRadioBandCfg (struct SWI_STRUCT_RadioBandConfig *pRadioBand, swi_int32 timeout)
 
SWI_API SWI_RCODE SwiSetRadioBandCfg (swi_uint64 nRadioBandGroup, swi_int32 timeout)
 
SWI_API SWI_RCODE SwiGetUsbPortName (struct SWI_STRUCT_UsbPortName *sPortNamep)
 
SWI_API SWI_RCODE SwiGetBootAndHoldMode (swi_bool *pbootnhold, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiNVUpdateFromFile (SWI_STRUCT_NVUpdateFromFile *pNVUpdateFromFile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiApiUnlock (SWI_STRUCT_ApiUnlock *pApiUnlock, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRemoteDiagAgentSupport (SWI_STRUCT_RDA_SUPPORT *psRDA, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetRemoteDiagAgentEnable (swi_uint8 bEnable, swi_uint8 *pStatus, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRemovableMediaSupport (SWI_STRUCT_RM_CONFIG *psRM, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetRemovableMediaSupport (const SWI_STRUCT_RM_CONFIG_SET *psRM, swi_uint8 *pStatus, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSoftModemReset (void)
 
SWI_API SWI_RCODE SwiResetToBootHold (swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetDeviceInformation (struct SWI_STRUCT_DeviceInformation_Request *sDeviceInformation_Requestp, struct SWI_STRUCT_DeviceInformation_Response *sDeviceInformation_Responsep, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetSwocCfg (struct SWI_STRUCT_GetSwocCfg *pSwocCfg, swi_uint32 timeout)
 

Detailed Description

Contains source code for Common API functions for the the SDK. Common means common to all wireless data technologies, CDMA, GSM, etc.

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

Function Documentation

SWI_API SWI_RCODE SwiApiStartup ( struct SWI_STRUCT_ApiStartup pOpenParams)

This function is used to start the API sub-system.

If an error is returned or to re-initialize the API, SwiApiShutdown must be called before calling this function again.

After calling this function, SwiGetAvailAirServers can be called to retrieve a list of air servers (devices). SwiSelectAirServer must be used to commit to a specific device before calling any control and status API functions.

Looking in the system log after a failure may provide more details about the cause

Note
SwiSelectAirServer is not implemented in LinuxSDKV2
Parameters
pOpenParams,:[IN] parameters to initialize the API in different modes
Returns
SWI_RCODE_OK - API initialized successfully
SWI_RCODE_FAILED - The API sub-system was not initialized successfully.
SWI_RCODE_SYSTEM_ERROR - This may be due to limited system resources when the API requested memory from the OS.
SWI_RCODE_BUSY - If another application has the SDK open. Only 1 application at a time is allowed
See SWI_RCODE for other error return codes
SWI_API SWI_RCODE SwiApiUnlock ( SWI_STRUCT_ApiUnlock pApiUnlock,
swi_uint32  timeout 
)

This function allows the host to unlock access to various password-protected other SWI APIs. Those APIs can be used to configure carrier-specific parameters and to enable limited diagnostic capabilities. Those APIs are required by OEMs and device provisioning applications. This object is not intended for use by end-users..

Typical cases to use this API

  • Before upload PRL with SwiSetPRL
Parameters
pApiUnlock[IN]See SWI_STRUCT_ApiUnlock.
timeout[IN]Function timeout in milliseconds.
Returns
See SwiRcodes.h
SWI_API SWI_RCODE SwiGetAirServerInfo ( struct SWI_STRUCT_AirServer  sAirServer,
struct SWI_STRUCT_AirServerExtended sInfo 
)

This function is used to retrieve additional information about a particular air server.

See SWI_STRUCT_AirServerExtended for list of additional information that can be retrieved.

Parameters
[IN]sAirServer: A structure of type SWI_STRUCT_AirServer which specifies the the air server of interest.
[OUT]sInfo,:A structure of type SWI_STRUCT_AirServerExtended which contains additional information about the requested air server.
Returns
SWI_RCODE_OK: Additional information successfully retrieved.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_AirServer
SWI_STRUCT_AirServerExtended
SWI_API SWI_RCODE SwiGetAvailAirServers ( struct SWI_STRUCT_AirServerList sList)

This function is used to retrieve a list of available air servers.

Air servers are deemed available if the appropriate driver interface, is found. These interfaces must be capable of supporting a control and status command path to the air server. SwiSelectAirServer must be called to bind to the air server before any command and status functions are called.

Air servers locked for exclusive use by an application are also included.

Parameters
[OUT]sList: A structure of type SWI_STRUCT_AirServerList which contains a list of available air servers.
Returns
SWI_RCODE_OK: List of available servers is successfully retrieved.
SWI_RCODE_FAILED: Failed to retrieve the list of available air servers.
See Also
SWI_STRUCT_AirServerList
SwiSelectAirServer
See sample code, ConnectApi
SWI_API SWI_RCODE SwiGetBootAndHoldMode ( swi_bool pbootnhold,
swi_uint32  timeout 
)

Fetch the boot and hold state of the modem, if it's connected. There is a small window in which this information will be inaccurate if the state of the modem changes while this function is being called. However, the notification called SWI_NOTIFY_AirServerChange will always indicate a change in the execution state of the modem and interested callers should re-issue this Api to learn the modem's new Boot and Hold state, if they are expecting it to change.

Parameters
pbootnhold[OUT]: TRUE - Modem is operating in boot-and-hold mode FALSE - Modem is executing its application
timeout[IN]: Function timeout in milliseconds
Returns
SWI_RCODE_OK: pbootnhold contains a valid boolean value
SWI_RCODE_DEVICE_UNAVAIL: The modem is either not connected to the host or the SDK hasn't detected it yet. Wait to receive the notification SWI_NOTIFY_AirServerChange before retrying this request
SWI_API SWI_RCODE SwiGetBootloaderBuildDate ( swi_charp  szBLBldDate,
swi_uint32 nLength,
swi_uint32  timeout 
)

This function is used to retrieve the boot loader build date.

Parameters
szBLBldDate,:[OUT] Pointer to store the build date information
nLength,:[IN/OUT] Size of buffer available to store the build date information/required buffer space
Timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_SMALL_BUF is returned if the specified buff isn't large enough to store the entire build date information. Check nLength to see the required buffer size.
See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiGetBootVersion ( swi_charp  szBVVersion,
swi_uint32  sizeBuffer,
swi_uint32  timeout 
)

This function returns the device's firmware loader version in a string.

Parameters
szBVVersion,:[OUT] Bootloader version (NULL terminated). The version string varies in length. It is recommended that a character string of 80 characters be allocated to store this return value.
sizeBuffer,:[IN] Size of buffer provided for the bootloader version
timeout,:[IN] Response timeout value in milliseconds
Returns
See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiGetCurrentRadioBand ( struct SWI_STRUCT_RadioBandList pRadioBand,
swi_int32  timeout 
)

This function is used to determine the current radio band(s) the device is currently using.

This API replaces SwiGetBandInfo.

For GSM/WCDMA devices and CDMA/EVDO devices operating in non-hybrid mode operation, only one band is supported at a time. In these cases, the band info list will only contain a single entry.

Parameters
pRadioBand,:[OUT] Pointer to a SWI_STRUCT_RadioBandList structure to store the list of current radio bands
timeout,:[IN] Response timeout value in milliseconds.
Returns
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_RadioBandList
SWI_API SWI_RCODE SwiGetDeviceID ( swi_charp  pszDeviceID,
swi_uint32  sizeBuffer,
swi_uint32  timeout 
)

This function returns the device's unique identity as a string. The returned value is the ESN (Electronic Serial Number) or EID (Electronic Identity) of the modem.

The ESN is in the form of an 14-character string of decimal numerals. The string is null terminated (adding a 15th byte to the length). The content of the ESN includes several concatenated components, as specified for GPRS.

Parameters
szDeviceID,:[OUT] A string representing the Device ID (NULL terminated).
sizeBuffer,:[IN] Size of buffer provided for the device ID. A buffer of 15 bytes is recommended.
timeout,:[IN] Response timeout value in milliseconds
Returns
See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiGetDeviceInformation ( struct SWI_STRUCT_DeviceInformation_Request sDeviceInformation_Requestp,
struct SWI_STRUCT_DeviceInformation_Response sDeviceInformation_Responsep,
swi_uint32  timeout 
)

This function is used to get fundamental information from the modem.

The information returned is determined by setting the eDeviceInformationType field of sDeviceInformation_Request.

Parameters
[OUT]sDeviceInformation_Request: struct must be filled out to select type of information returned.
[IN]sDeviceInformation_Response: struct returned will contain the requested information.
[IN]timeout: Response timeout value in milliseconds.
Returns
See SWI_RCODE for additional information.
See Also
SWI_STRUCT_DeviceInformation_Request
SWI_STRUCT_DeviceInformation_Response
SWI_API SWI_RCODE SwiGetDeviceTime ( struct SWI_STRUCT_DeviceTime pDeviceTime,
swi_uint32  timeout 
)

This function is used to retrieve the system time on the device.

Parameters
pDeviceTime,:[OUT] Pointer to a SWI_STRUCT_DeviceTime structure to store the system time from the device.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been received.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_DeviceTime
SWI_API SWI_RCODE SwiGetFirmwareBuildDate ( swi_charp  szBuildDate,
swi_uint32  sizeBuffer,
swi_uint32  timeout 
)

This function returns the date the device's firmware was created.

Parameters
szBuildDate,:[OUT] Firmware build date. The firmware build date string is in the form of MM/DD/YY.
sizeBuffer,:[IN] Size of buffer provided for the firmware build date
timeout,:[IN] Response timeout value in milliseconds
Returns
See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiGetFirmwareVersion ( swi_charp  szFWVersion,
swi_uint32  sizeBuffer,
swi_uint32  timeout 
)

This function returns the device's firmware version in a string.

The firmware version string varies in length. It is recommended that a character string of 80 characters be allocated to store this return value

Parameters
szFWVersion,:[OUT] Firmware version (NULL terminated)
sizeBuffer,:[IN] Size of buffer provided for the firmware version.
timeout,:[IN] Response timeout value in milliseconds
Returns
See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiGetFlashImgInfo ( struct SWI_STRUCT_FlashImgInfo pFlashImgInfo,
swi_uint32  timeout 
)

This function is used to retrieve firmware flash information from the device.

Parameters
[IN/OUT]pFlashImgInfo: Pointer to a SWI_STRUCT_FlashImgInfo which specifies the flash image type to retrieve. This structure also contains the flash image information returned from the device. See SWI_STRUCT_FlashImgInfo for additional information.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The device has received the request. See SWI_STRUCT_FlashImgInfo::eResult for actual request result.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_FlashImgInfo
SWI_API SWI_RCODE SwiGetHardwareVersion ( swi_charp  szHWVersion,
swi_uint32  sizeBuffer,
swi_uint32  timeout 
)

This function returns the device's hardware version in a string.

Parameters
szHWVersion,:[OUT] Hardware version (NULL terminated). The firmware version string varies in length. It is recommended that a character string of 80 characters be allocated to store this return value. The returned string is null terminated.
sizeBuffer,:[IN] Size of buffer provided for the hardware version
timeout,:[IN] Response timeout value in milliseconds
Returns
See SWI_RCODE for additional information.
SWI_API void SwiGetLastError ( swi_char szError,
swi_uint32  sizeBuffer 
)

This function is used to retrieve the last error that occurred during a CnS transaction.

Recommended length for the CnS buffer is 256 bytes.

Parameters
szError,:[OUT] CnS transaction error
sizeBuffer,:[IN] length of buffer provided for the CnS transaction error
Returns
None
SWI_API SWI_RCODE SwiGetModemType ( struct SWI_STRUCT_ModemType pSwiModemType,
swi_uint32  timeout 
)

This function is used to retrieve modem type information.

Parameters
pSwiModemType,:[IN/OUT] Removable media configuration
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiGetObjRngRev ( struct SWI_STRUCT_ObjRngRev ObjRngRevp,
swi_uint32  timeout 
)

This function is used to retrieve the object ID range revision on the modem and the API.

Parameters
sObjRngRev,:[OUT] Object range revision information
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiGetPriInfo ( struct SWI_STRUCT_PriInfo pPriInfo,
swi_uint32  timeout 
)

This function is used to retrieve PRI information of the device

Parameters
pPriInfo,:[OUT] PRI information timeout: [IN] response timeout value is 1000 milliseconds
Returns
SWI_RCODE_OK - the request has been received.
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiGetRadioBandCfg ( struct SWI_STRUCT_RadioBandConfig pRadioBand,
swi_int32  timeout 
)

This function is used to retrieve the current radio band setting of the device along with the list of all the device supported radio bands.

This API replaces SwiGetBandInfo.

Parameters
pRadioBand,:[OUT] A pointer to a SWI_STRUCT_RadioBandConfig structure to store the current radio band configuration.
timeout,:[IN] Response timeout value in milliseconds.
Returns
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_RadioBandConfig
SWI_API SWI_RCODE SwiGetRadioBattery ( struct SWI_STRUCT_RadioBattery pRadioBattery,
swi_uint32  timeout 
)

This function is used to retrieve the current radio battery state.

Voltage changes can be monitored with SWI_NOTIFY_RadioBattery.

Parameters
pRadioBattery,:[OUT] A pointer to a SWI_STRUCT_RadioBattery structure to store the current radio battery state.
timeout,:[IN] Response timeout value in milliseconds.
Returns
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_RadioBattery
SWI_NOTIFY_RadioBattery
SWI_API SWI_RCODE SwiGetRadioPower ( struct SWI_STRUCT_RadioPower pRadioPower,
swi_uint32  timeout 
)

This function is used to retrieve the current radio power mode.

Parameters
pRadioPower,:[OUT] Pointer to a SWI_STRUCT_RadioPower structure to store the current radio power setting.
timeout,:[IN] Response timeout value in milliseconds.
Returns
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_RadioPower
SWI_API SWI_RCODE SwiGetRadioTempState ( struct SWI_STRUCT_RadioTempState pRadioTemp,
swi_uint32  timeout 
)

This function is used to retrieve the current radio temperature state.

UMTS AirCards will always report that the temperature state is normal. Temperature state changes can be monitored with SWI_NOTIFY_RadioTempState.

Parameters
pRadioTemp,:[OUT] Pointer to a SWI_STRUCT_RadioTempState to store the current radio temperature state.
timeout,:[IN] Response timeout value in milliseconds.
Returns
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_RadioTempState
SWI_NOTIFY_RadioTempState
SWI_API SWI_RCODE SwiGetRemoteDiagAgentSupport ( SWI_STRUCT_RDA_SUPPORT psRDA,
swi_uint32  timeout 
)

This function retrieves the modem's Remote Diagnostics Agent support information.

Parameters
psRDA[OUT]Contains RDA support information. See SWI_STRUCT_RDA_SUPPORT.
timeout[IN]Function timeout in milliseconds.
Returns
See SwiRcodes.h
SWI_API SWI_RCODE SwiGetRemovableMediaSupport ( SWI_STRUCT_RM_CONFIG psRM,
swi_uint32  timeout 
)

This function retrieves the modem's Removable Media support information

Parameters
psRM[OUT]Contains RM support information. See SWI_STRUCT_RM_CONFIG.
timeout[IN]Function timeout in milliseconds.
Returns
See SwiRcodes.h
SWI_API SWI_RCODE SwiGetSdkVersion ( swi_charp sdkversionpp)

This function is used to retrieve the version of the SDK.

Parameters
sdkversionpp: [OUT] pointer to pointer to returned string.
Returns
SWI_RCODE_OK: Information successfully retrieved.
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiGetSwocCfg ( struct SWI_STRUCT_GetSwocCfg pSwocCfg,
swi_uint32  timeout 
)

This function is used to retrieve Software on Card (SWoC) configuration.

Configuration items returned determine if: -SWoC/TRU-Install feature supported/enabled -SWoC/TRU-Install media in modem mode supported/enabled -bypassing of the SWoC/TRU-Install feature after a software reboot is performed on the device

Some devices require that the OEM level is unlocked before some or all of the request options are attempted.

In order for the ‘SWoC access in modem mode’ feature to be enabled, general overall ‘SWoC’ TRU-Install support must be both supported by the product and currently enabled.

Parameters
pSwocCfg[IN/OUT]
timeout[IN]
Returns
SWI_RCODE_OK: SWoC configuration successfully retrieved
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiGetUsbdInfo ( struct SWI_STRUCT_UsbdInfo pUsbdInfo,
swi_uint32  timeout 
)

This function is used to retrieve the USB descriptor build information.

Parameters
pUsbd,:[OUT] structure to store USB descriptor build information
Returns
: See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiGetUsbPortName ( struct SWI_STRUCT_UsbPortName sPortNamep)

This function is used to retrieve the Port Name for the data port.

Parameters
[OUT]szPortName: Port Names of the device.
Returns
SWI_RCODE_OK: List of available port names is successfully retrieved.
SWI_RCODE_FAILED: Failed to retrieve the list of available port names.
SWI_API SWI_RCODE SwiNVUpdateFromFile ( SWI_STRUCT_NVUpdateFromFile pNVUpdateFromFile,
swi_uint32  timeout 
)

This function Forces the modem to perform a NV update from an EFS file.

Note that this function does not return any data via pNVUpdateFromFile. Caller need to set the sizeStruct and szFileName member of pNVUpdateFromFile. The other members of SWI_STRUCT_NVUpdateFromFile are for notification use only.

Parameters
pNVUpdateFromFile[IN]NV update settings. See SWI_STRUCT_NVUpdateFromFile.
timeout[IN]Function timeout in milliseconds.
Returns
See SwiRcodes.h
SWI_API SWI_RCODE SwiResetToBootHold ( swi_uint32  timeout)

This function causes the modem to reset into boot and hold operation. Boot and Hold operation is used for upgrading the modem's firmware. For USB-based devices, the driver will unload and reload on a modem reset.

The caller will receive a response very quickly, but receipt of a response does not indicate the modem's entry into boot and hold mode, only that the command was sent to the modem. The caller's next step should be to await a SWI_NOTIFY_AirServerChange message and when it's received, call SwiGetBootAndHoldMode() to determine the modem's operating state

If the modem is already in boot and hold operation when this command is issued, there will be no effect. The modem does not respond to reset requests when operating in boot and hold mode.

Parameters
timeout[IN],:response timeout value in milliseconds

Return: SWI_RCODE_OK - request was successfully sent to the modem SWI_RCODE_REQUEST_TIMEOUT - request timed out See SWI_RCODE for other error return codes

SWI_API SWI_RCODE SwiSelectAirServer ( struct SWI_STRUCT_AirServer airServer)

This function is used to bind the API to a specific air server.

Use SwiGetAvailAirServers to retrieve a list of available air servers. Modem control and status API calls can not be invoked until this call is completed. The API can only bind to one air server at a time.

If the API is already bound to an air server, calling this function will cancel all pending requests and re-bind to the new air server.

Parameters
[IN]airServer: Air server you are connecting to. This tells the API what services are supported.
Returns
SWI_RCODE_OK: API successfully bound to air server
SWI_RCODE_FAILED: API failed to bind to new air server.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_AirServer
SWI_API SWI_RCODE SwiSetRadioBandCfg ( swi_uint64  nRadioBandGroup,
swi_int32  timeout 
)

This function is used to request a new radio band setting.

This API replaces SwiSetBandInfo.

Setting the frequency band may cause a modem reset. The caller should use SwiGetRadioBandCfg to retrieve the list of supported bands before calling SwiSetRadioBandCfg.

Parameters
nRadioBandGroup,:[IN] A bit mask value which specifies the radio band group to use. See SWI_RADIOBANDGROUP_xxx definitions.
timeout,:[IN] Response timeout value in milliseconds.
Returns
See SWI_RCODE for other error return codes.
See Also
SWI_RADIOBANDGROUP_xxx
SWI_API SWI_RCODE SwiSetRadioPower ( struct SWI_STRUCT_RadioPower pRadioPower,
swi_uint32  timeout 
)

This function is used to configure the radio power mode.

Parameters
pRadioPower,:[IN] A pointer to a SWI_STRUCT_RadioPower structure which specifies the new radio power setting.
timeout,:[IN] Response timeout value in milliseconds.
Returns
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_RadioPower
SWI_API SWI_RCODE SwiSetRemoteDiagAgentEnable ( swi_uint8  bEnable,
swi_uint8 pStatus,
swi_uint32  timeout 
)

This function enables/disables the modem's Remote Diagnostics Agent.

Parameters
bEnable[IN]Disable = 0, Enable = 1;
pStatus[OUT]0=Success, 1=Failed unspecified,2=Failed security access denied.
timeout[IN]Function timeout in milliseconds.
Returns
See SwiRcodes.h
SWI_API SWI_RCODE SwiSetRemovableMediaSupport ( const SWI_STRUCT_RM_CONFIG_SET psRM,
swi_uint8 pStatus,
swi_uint32  timeout 
)

This function sets the modem's Removable Media support information.

Parameters
psRM[IN]Contains RM support config. See SWI_STRUCT_RM_CONFIG_SET.
pStatus[OUT]Set status.
timeout[IN]Function timeout in milliseconds.
Returns
See SwiRcodes.h
SWI_API SWI_RCODE SwiSoftModemReset ( void  )

This function causes the modem to undergo a soft reset. SWI_NOTIFY_AirServerChange is generated after the reset has completed. Note that the driver may also unload and reload when a modem reset occurs.

This API will return very quickly but this does not indicate that the modem has reset, only that the reset command has been sent to the modem. When the modem finally resets a SWI_NOTIFY_AirServerChange notification will be generated. Callers may want to consider calling SwiGetBootAndHoldMode() to determine the operating state of the modem, however, modem resets generated by this API will always bring the modem back into full operation after the reset is complete

If the modem is already in boot and hold operation when this command is issued, there will be no effect. The modem does not respond to reset requests when operating in boot and hold mode.

Parameters
None
Returns
See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiTerminateSDK ( void  )

Gracefully terminate the SDK process

The SDK process is designed to run forever once it is started, behaving as a daemon under Linux in the truest sense of the word. However in some applications there may be a requirement to shut down the daemon when a particular task has completed and this API allows an application to gracefully shut down the daemon

Parameters
None
Returns
None
SWI_RCODE_OK

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