LinuxSDK  V1.4.0.5
Functions
SwiApiGsmNetwork.c File Reference

Contains source code for GSM APIs related to network and data. More...

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

Functions

SWI_API SWI_RCODE SwiGetRssiBer (struct SWI_STRUCT_Rssi *sRssiBer, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRssiBars (const swi_int32 iRssi, swi_uint32 *pNumBars)
 
SWI_API SWI_RCODE SwiGetTrafficStatistics (swi_uint32 *nSent, swi_uint32 *nReceived, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiResetTrafficStatistics (swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetGsmProfileSummary (struct SWI_STRUCT_GsmProfileSummary *pProfileSummary, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetGsmProfileBasic (struct SWI_STRUCT_GsmProfileBasic *pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetGsmProfileQos (struct SWI_STRUCT_GsmProfileQos *pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetGsmProfileDns (struct SWI_STRUCT_GsmProfileDns *pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetGsmProfileTft (struct SWI_STRUCT_GsmProfileTft *pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetGsmProfileBasic (struct SWI_STRUCT_GsmProfileBasic pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetGsmProfileQos (struct SWI_STRUCT_GsmProfileQos pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetGsmProfileDns (struct SWI_STRUCT_GsmProfileDns pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetGsmProfileTft (struct SWI_STRUCT_GsmProfileTft pProfile, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiEraseProfile (const swi_uint32 nProfileID, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetDefaultProfile (const swi_uint32 nProfileID, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiActivateProfile (const swi_uint32 nProfileID, swi_bool Activate, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetHostStartup (swi_bool bStartup, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRscpEcIo (struct SWI_STRUCT_RscpEcIo *pRscpEcIo, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetIPAddressEx (struct SWI_STRUCT_IpAddress *pIp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetNetworkStatus (struct SWI_STRUCT_GSM_NetworkStatus *sNetworkStatus, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetGsmSystemStatus (struct SWI_STRUCT_GsmSystemStatus *pSysStatus, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPktSessionStatus (struct SWI_STRUCT_PktSessionStatus *sSessionStatus, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPktSessionStatusEx (struct SWI_STRUCT_PktSessionCall *sPktSessionCall, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPLMNMode (enum SWI_TYPE_PLMN_Mode *eMode, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetPLMNMode (const struct SWI_STRUCT_PlmnSelection sPlmn, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiStartPLMNSearch (swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPLMNSelection (struct SWI_STRUCT_PlmnSelection *sPlmn, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetServiceStatusEx (enum SWI_TYPE_ServiceStatus *eServiceStatus, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetGsmCellInfo (struct SWI_STRUCT_GsmCellInfo *pCellInfo, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetRat (struct SWI_STRUCT_Rat *psRat, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetRat (struct SWI_STRUCT_Rat *psRat, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPrlRegion (struct SWI_STRUCT_PrlRegion *psPrl, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetPrlRegion (struct SWI_STRUCT_PrlRegion *psPrl, swi_uint32 timeout)
 

Detailed Description

Contains source code for GSM APIs related to network and data.

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

Function Documentation

SWI_API SWI_RCODE SwiActivateProfile ( const swi_uint32  nProfileID,
swi_bool  Activate,
swi_uint32  timeout 
)

This function initiates or destroys a packet session.

Parameters
nProfileID,:[IN] Profile ID to acted on. Profile ID ranges from 1-16 for 3G and newer devices and 1-3 for older (AC7xx and MP7xx) devices.
Activate,:[IN] True if the profile should be activated. False if the profile should be deactivated.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed. A SWI_NOTIFY_PktSessionStatus notification will indicate the result of the request.
SWI_RCODE_REQUEST_REJECTED: Activation requests MAY be rejected if FDN is enabled. This behaviour is customizable by the carrier. SwiGetLastError would return "FDN Mismatch".
See Also
See SWI_RCODE for other error return codes.
SWI_NOTIFY_PktSessionStatus
SWI_API SWI_RCODE SwiEraseProfile ( const swi_uint32  nProfileID,
swi_uint32  timeout 
)

This function will erase the account information from a profile and restore to factory defaults. The profile will then report a status of "deleted".

Parameters
nProfileID,:[IN] Profile ID to be erased. Profile ID ranges from 1-16 for 3G and newer devices and 1-3 for older (AC7xx and MP7xx) devices.
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed.
SWI_RCODE_FAILED: If the profile is active when you attempt to write a new setting, the function will return SWI_RCODE_FAILED.
See SWI_RCODE for other error return codes.
See Also
SWI_NOTIFY_GsmProfileChange
SWI_API SWI_RCODE SwiGetGsmCellInfo ( struct SWI_STRUCT_GsmCellInfo pCellInfo,
swi_uint32  timeout 
)

This function is used to retrieve GSM cell information.

Use of this function should be limited. SWI_NOTIFY_GsmCellInfo notification is generated when there is a change in the cell information. Use of notifications is preferred over direct polling.

This function is only supported on GSM devices.

Parameters
pCellInfo,:[OUT] GSM cell info
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.
See Also
SWI_STRUCT_GsmCellInfo
SWI_NOTIFY_GsmCellInfo
SWI_API SWI_RCODE SwiGetGsmProfileBasic ( struct SWI_STRUCT_GsmProfileBasic pProfile,
swi_uint32  timeout 
)

This function retrieves the basic details of a connection profile.

This function is used with 3G and newer devices. For older devices, use SwiGetProfile.

Calling this function on profile that is not present (deleted) returns default profile settings.

SWI_NOTIFY_GsmProfileChange can be used to monitor for changes made to profile information.

Parameters
pProfile,:[OUT] Basic profile information
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileBasic
SWI_NOTIFY_GsmProfileChange
SwiGetGsmProfileQos
SwiGetGsmProfileDns
SwiGetGsmProfileTft
SwiSetGsmProfileBasic
SwiSetGsmProfileQos
SwiSetGsmProfileDns
SwiSetGsmProfileTft
SWI_STRUCT_Profile
SWI_API SWI_RCODE SwiGetGsmProfileDns ( struct SWI_STRUCT_GsmProfileDns pProfile,
swi_uint32  timeout 
)

This function retrieves the DNS details of a connection profile.

This function is used with 3G and newer devices. For older devices, use SwiGetProfile.

Calling this function on profile that is not present (deleted) returns default profile settings.

SWI_NOTIFY_GsmProfileChange can be used to monitor for changes made to profile information.

Parameters
pProfile,:[OUT] DNS profile information
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileDns
SWI_NOTIFY_GsmProfileChange
SwiGetGsmProfileBasic
SwiGetGsmProfileQos
SwiGetGsmProfileTft
SwiSetGsmProfileBasic
SwiSetGsmProfileQos
SwiSetGsmProfileDns
SwiSetGsmProfileTft
SWI_STRUCT_Profile
SWI_API SWI_RCODE SwiGetGsmProfileQos ( struct SWI_STRUCT_GsmProfileQos pProfile,
swi_uint32  timeout 
)

This function retrieves the QoS details of a connection profile.

This function is used with 3G and newer devices. For older devices, use SwiGetProfile.

Calling this function on profile that is not present (deleted) returns default profile settings.

SWI_NOTIFY_GsmProfileChange can be used to monitor for changes made to profile information.

Parameters
pProfile,:[OUT] QoS profile information
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileQos
SWI_NOTIFY_GsmProfileChange
SwiGetGsmProfileBasic
SwiGetGsmProfileDns
SwiGetGsmProfileTft
SwiSetGsmProfileBasic
SwiSetGsmProfileQos
SwiSetGsmProfileDns
SwiSetGsmProfileTft
SWI_STRUCT_Profile
SWI_API SWI_RCODE SwiGetGsmProfileSummary ( struct SWI_STRUCT_GsmProfileSummary pProfileSummary,
swi_uint32  timeout 
)

This function returns a summary of the status of all account profiles, and identifies which one is the default profile for auto connection.

Use this function with 3G and newer devices. SwiGetProfileSummary should be used with older devices.

The summary reports the status of each profile along with its context number. The summary structure reports two profile context identities: one for the default profile used for automatic activation, and another to identify the current profile that is actively connected to the network (activated). If the modem is not currently connected, the current profile context is reported as zero.

Parameters
pProfileSummary,:[OUT] Profile summary information
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileSummary
SwiGetProfileSummary
SWI_API SWI_RCODE SwiGetGsmProfileTft ( struct SWI_STRUCT_GsmProfileTft pProfile,
swi_uint32  timeout 
)

This function retrieves the TFT details of a connection profile.

This function is used with 3G and newer devices. Older devices do not support TFT configurations.

Calling this function on profile that is not present (deleted) returns default profile settings.

SWI_NOTIFY_GsmProfileChange can be used to monitor for changes made to profile information.

Parameters
pProfile,:[OUT] TFT profile information
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileTft
SWI_NOTIFY_GsmProfileChange
SwiGetGsmProfileBasic
SwiGetGsmProfileDns
SwiGetGsmProfileQos
SwiSetGsmProfileBasic
SwiSetGsmProfileQos
SwiSetGsmProfileDns
SwiSetGsmProfileTft
SWI_STRUCT_Profile
SWI_API SWI_RCODE SwiGetGsmSystemStatus ( struct SWI_STRUCT_GsmSystemStatus pSysStatus,
swi_uint32  timeout 
)

This function is used to retrieve the GSM system status.

This function replaces SwiGetNetworkStatus.

Use of this function should be limited. SWI_NOTIFY_GsmSystemStatus notification is generated when there is a change in the system status information. Use of notifications is preferred over direct polling.

This function is only supported on GSM devices.

Parameters
pSysStatus,:[OUT] System status
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmSystemStatus
SWI_NOTIFY_GsmSystemStatus
SwiGetNetworkStatus
SWI_API SWI_RCODE SwiGetIPAddressEx ( struct SWI_STRUCT_IpAddress pIp,
swi_uint32  timeout 
)

This function retrieves the IP address of the specified profile.

This function is only supported on GSM devices.

Parameters
pIp,:[OUT] IP address information. ProfileId of the IP address structure must be specified before calling this function.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_IpAddress
SwiGetIPAddress
SWI_API SWI_RCODE SwiGetNetworkStatus ( struct SWI_STRUCT_GSM_NetworkStatus sNetworkStatus,
swi_uint32  timeout 
)

This function is obsolete and is replaced with SwiGetGsmSystemStatus.

This function is used to fetch the network status of the modem.

SWI_NOTIFY_NetworkStatus indication is generated when there is a state change. This is the preferred method of monitoring status instead of polling with this function.

This function is only supported on GSM devices.

Parameters
sNetworkStatus,:[OUT] Network status
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SwiGetGsmSystemStatus
SWI_STRUCT_GSM_NetworkStatus
SWI_NOTIFY_NetworkStatus
SWI_API SWI_RCODE SwiGetPktSessionStatus ( struct SWI_STRUCT_PktSessionStatus sSessionStatus,
swi_uint32  timeout 
)

This function is used to fetch the packet session status of the modem.

This function has been deprecated and SwiGetPktSessionStatusEx() should be used instead.

See Also
SwiGetPktSessionStatusEx()
Parameters
sSessionStatus,:[OUT] Packet session status
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_PktSessionStatus
SWI_NOTIFY_PktSessionStatus
SWI_API SWI_RCODE SwiGetPktSessionStatusEx ( struct SWI_STRUCT_PktSessionCall sPktSessionCall,
swi_uint32  timeout 
)

This API is used to fetch the packet session status of the modem.

This API replaces the old API SwiGetPktSessionStatus()

This API is only supported on GSM devices.

Parameters
sSessionStatus,:[IN/OUT] Packet session status containing profileID
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_PktSessionCall
SWI_API SWI_RCODE SwiGetPLMNMode ( enum SWI_TYPE_PLMN_Mode eMode,
swi_uint32  timeout 
)

This function is used to fetch the PLMN selection mode of the modem.

The modem PLMN selection mode will be either Automatic or Manual.

This function is only supported on GSM devices.

Parameters
eMode,:[OUT] PLMN selection mode
timeout,:[OUT] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_TYPE_PLMN_Mode
SwiSetPLMNMode
SWI_API SWI_RCODE SwiGetPLMNSelection ( struct SWI_STRUCT_PlmnSelection sPlmn,
swi_uint32  timeout 
)

The PLMN scan initiated by SwiStartPLMNSearch compiles a list of PLMNs in the area. This function is used to retrieve a single PLMN from that list.

This function is only supported on GSM devices.

Parameters
sPlmn,:[OUT] PLMN information
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid. The modem's response contains a single PLMNs information and will indicate if there are more PLMN to be retrieved from the list on the modem. See SWI_STRUCT_PlmnSelection for additional info. If there are additional PLMNs in the list, call SwiGetPLMNSelection repeatedly until all PLMNs are read.
See Also
See SWI_RCODE for other error return codes.
SWI_NOTIFY_PlmnAvailable
SwiStartPLMNSearch
SWI_STRUCT_PlmnSelection
SWI_API SWI_RCODE SwiGetPrlRegion ( struct SWI_STRUCT_PrlRegion psPrl,
swi_uint32  timeout 
)

This function allows the host to get the PRL Region of the device. The PRL Region setting determines the scan order and grouping of the GSM and WCDMA bands.

Parameters
sPrl:[OUT]PRL region information. The structure size must be populated by the caller.
timeout:[IN]Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid. when SWI_RCODE_OK is returned, the caller still has to check the ePrlChangeStatu *s for the actual results of the request.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PrlRegion
SwiSetPrlRegion
SWI_API SWI_RCODE SwiGetRat ( struct SWI_STRUCT_Rat psRat,
swi_uint32  timeout 
)

This function allows the host to get the RAT mode of the device. This function is only supported on GSM devices.

Parameters
psRat,:[OUT] RAT mode 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.
See Also
SWI_STRUCT_Rat
SwiSetRat
SWI_API SWI_RCODE SwiGetRscpEcIo ( struct SWI_STRUCT_RscpEcIo pRscpEcIo,
swi_uint32  timeout 
)

This function is used to retrieve the RSCP and Ec/Io measurements.

Use of this function should be limited. SWI_NOTIFY_RscpEcIo notification is generated when there is a change in the information. Use of notifications is preferred over direct polling.

This function is only supported on GSM devices.

Parameters
pRscpEcIo,:[OUT] RSCP and Ec/Io measurements.
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.
See Also
SWI_STRUCT_RscpEcIo
SWI_NOTIFY_RscpEcIo
SWI_API SWI_RCODE SwiGetRssiBars ( const swi_int32  iRssi,
swi_uint32 pNumBars 
)

This function maps RSSI values to the number of RSSI bars that should be shown to the user. It will output 0 to 5 RSSI bars.

This function is only supported on GSM devices.

Parameters
iRssi,:[IN] RSSI value in dBm to be converted to number of RSSI bars.
pNumBars,:[OUT] Number of RSSI bars to be displayed.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
SWI_RCODE_INVALID_PAR: Invalid RRSI value was supplied.
See Also
See SWI_RCODE for other error return codes.
To get the RSSI value in dBm, call SwiGetRssiBer.
SWI_API SWI_RCODE SwiGetRssiBer ( struct SWI_STRUCT_Rssi sRssiBer,
swi_uint32  timeout 
)

This function is used to fetch the current received signal strength indication (RSSI) and bit error rate (BER) from the modem.

The RSSI values are measured in dBm. A return value approaching -110 indicates that the modem is outside of coverage or the signal is weak.

Use of this function should be reserved to application startup. There is a notification available in the GPRS API (SWI_NOTIFY_Rssi) that also includes a measure of the Block Error Rate (BER). Use of notifications is preferred over direct polling.

This function is only supported on GSM devices.

Parameters
sRssiBer,:[OUT] RSSI and BER values
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_Rssi
SWI_NOTIFY_Rssi
SWI_API SWI_RCODE SwiGetServiceStatusEx ( enum SWI_TYPE_ServiceStatus eServiceStatus,
swi_uint32  timeout 
)

This function requests the current service status from the modem.

Use of this function should be limited. There is a notification available in the GPRS API (SWI_NOTIFY_NetworkStatus or SWI_NOTIFY_GsmSystemStatus) that reports this data along with other useful service parameters. Use of notifications is preferred over direct polling.

This function is only supported on GSM devices.

Parameters
eServiceStatus,:[OUT] Service status
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_TYPE_ServiceStatus
SWI_STRUCT_GsmSystemStatus
SWI_NOTIFY_NetworkStatus
SWI_API SWI_RCODE SwiGetTrafficStatistics ( swi_uint32 nSent,
swi_uint32 nReceived,
swi_uint32  timeout 
)

This function is called to retrieve network traffic statistics (the number of bytes transmitted and received).

The traffic counters are reset to zero when the connection is dropped. While disconnected, this will report zeros. The traffic count is user payload data only and does not include network housekeeping traffic or SMS messages.

Parameters
nSent,:[OUT] Number of bytes sent
nReceived,:[OUT] Number of bytes received
timeout,:[IN] Response timeout value in milliseconds
See Also
See SWI_RCODE for additional information.
SWI_API SWI_RCODE SwiResetTrafficStatistics ( swi_uint32  timeout)

This function is used to reset the modem's byte data counters.

If not explicitly reset, byte counter information is persistent across PDP context activations.

This function is only supported on GSM devices.

Parameters
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed.
See Also
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiSetDefaultProfile ( const swi_uint32  nProfileID,
swi_uint32  timeout 
)

This function sets which profile is to be used for possible automatic connection. If the profile that is set to be the default has the auto connection flag set to true, then that profile will be used to connect to the network automatically when the modem is started or reset.

The modem does not verify that the profile contains a valid (non-blank) account. You can set the default to a "deleted" profile; the autoconnect flag will be false so this is equivalent to disabling autoconnection.

Parameters
nProfileID,:[IN] Profile ID to be made the default. Profile ID ranges from 1-16 for 3G and newer devices and 1-3 for older (AC7xx and MP7xx) devices.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed.
See Also
See SWI_RCODE for other error return codes.
SwiGetGsmProfileSummary
SwiGetProfileSummary
SWI_API SWI_RCODE SwiSetGsmProfileBasic ( struct SWI_STRUCT_GsmProfileBasic  pProfile,
swi_uint32  timeout 
)

This function stores the basic user account information in a profile slot, making it available for connection.

This function is used with 3G and newer devices. For older devices, use SwiSetProfile.

Parameters
pProfile,:[IN] Basic profile information to be updated on the modem. The profile ID and size of the structure must be provided by the caller.
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed.
SWI_RCODE_FAILED: The modem will verify the validity of the data in the profile structure. If it fails to validate, the function will return SWI_RCODE_FAILED. You must use the validation process provided in the sample code to ensure the profile data can be written. If the profile is active when you attempt to write a new setting, the function will also return SWI_RCODE_FAILED.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileBasic
SWI_NOTIFY_GsmProfileChange
SWI_API SWI_RCODE SwiSetGsmProfileDns ( struct SWI_STRUCT_GsmProfileDns  pProfile,
swi_uint32  timeout 
)

This function stores the DNS user account information in a profile slot.

This function is used with 3G and newer devices. For older devices, use SwiSetProfile.

Parameters
pProfile,:[IN] DNS profile information to be updated on the modem. The profile ID and size of the structure must be provided by the caller.
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed.
SWI_RCODE_FAILED: The modem will verify the validity of the data in the profile structure. If it fails to validate, the function will return SWI_RCODE_FAILED. You must use the validation process provided in the sample code to ensure the profile data can be written. If the profile is active when you attempt to write a new setting, the function will also return SWI_RCODE_FAILED.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileDns
SWI_NOTIFY_GsmProfileChange
SWI_API SWI_RCODE SwiSetGsmProfileQos ( struct SWI_STRUCT_GsmProfileQos  pProfile,
swi_uint32  timeout 
)

This function stores the QoS user account information in a profile slot.

This function is used with 3G and newer devices. For older devices, use SwiSetProfile.

Parameters
pProfile,:[IN] QoS profile information to be updated on the modem. The profile ID and size of the structure must be provided by the caller.
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed.
SWI_RCODE_FAILED: The modem will verify the validity of the data in the profile structure. If it fails to validate, the function will return SWI_RCODE_FAILED. You must use the validation process provided in the sample code to ensure the profile data can be written. If the profile is active when you attempt to write a new setting the function will also return SWI_RCODE_FAILED.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileQos
SWI_NOTIFY_GsmProfileChange
SWI_API SWI_RCODE SwiSetGsmProfileTft ( struct SWI_STRUCT_GsmProfileTft  pProfile,
swi_uint32  timeout 
)

This function stores the TFT user account information in a profile slot.

This function is used with 3G and newer devices. Older devices do not support TFT configurations.

Parameters
pProfile,:[IN] TFT profile information to be updated on the modem. The profile ID and size of the structure must be provided by the caller.
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed.
SWI_RCODE_FAILED: The modem will verify the validity of the data in the profile structure. If it fails to validate, the function will return SWI_RCODE_FAILED. You must use the validation process provided in the sample code to ensure the profile data can be written. If the profile is active when you attempt to write a new setting, the function will also return SWI_RCODE_FAILED.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_GsmProfileTft
SWI_NOTIFY_GsmProfileChange
SWI_API SWI_RCODE SwiSetHostStartup ( swi_bool  bStartup,
swi_uint32  timeout 
)

This function controls the radio power state.

This function is similar to SwiSetModemDisable. When called to "shutdown" the radio, the modem will detach from the network and power down the radio. Unlike SwiSetModemDisable, however, this powered down state is NOT persistent across modem power cycles.

When called to "startup" the radio, the modem will power on the radio and attempt to attach to a network (if available).

It is recommended that this function be called with the "shutdown" parameter when the host application shuts down or when the PC enters a suspend state.

It is recommended that this function be called with the "startup" parameter when the host application initially starts up and after resuming from a PC suspend state.

A change in the radio's power state will be signaled with a SWI_NOTIFY_ModemDisabled indication.

This function is only supported on GSM devices.

Parameters
bStartup,:[IN] Set to true to power up the radio and attempt to attach to a network (if available). Set to false to detach from the network and power down the radio.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request was received by the modem. The result of the request is indicated in a SWI_NOTIFY_ModemDisabled notification.
See SWI_RCODE for other error return codes.
See Also
SWI_NOTIFY_ModemDisabled
SWI_API SWI_RCODE SwiSetPLMNMode ( const struct SWI_STRUCT_PlmnSelection  sPlmn,
swi_uint32  timeout 
)

This function is used to set the PLMN selection mode of the modem.

The mode can be set to automatic or manual. The PLMN must be specified for the manual mode. Use SwiStartPLMNSearch to search for a list of available PLMNs before switching to manual mode.

This function is only supported on GSM devices.

Parameters
sPlmn,:[IN] PLMN selection mode information
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See Also
See SWI_RCODE for other error return codes.
SWI_STRUCT_PlmnSelection
SwiGetPLMNMode
SwiStartPLMNSearch
SWI_API SWI_RCODE SwiSetPrlRegion ( struct SWI_STRUCT_PrlRegion psPrl,
swi_uint32  timeout 
)

This function allows the host to set the PRL Region of the device. The PRL Region setting determines the scan order and grouping of the GSM and WCDMA bands.

Parameters
sPrl:[IN/OUT]PRL region information. The structure size, PRL region and the password to unlock API must be populated by the caller. The action result is returned.
timeout:[IN]Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid. when SWI_RCODE_OK is returned, the caller still has to check the ePrlChangeStatus for the actual result of the request.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PrlRegion
SwiGetPrlRegion
SwiApiUnlock
SWI_API SWI_RCODE SwiSetRat ( struct SWI_STRUCT_Rat psRat,
swi_uint32  timeout 
)

This function allows the host to set the RAT mode of the device. This function is only supported on GSM devices.

Parameters
psRat[IN/OUT] RAT information. The structure size and RAT mode type must be supplied by the caller. The action result is returned.
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.
See Also
SWI_STRUCT_Rat
SwiGetRat
SWI_API SWI_RCODE SwiStartPLMNSearch ( swi_uint32  timeout)

This function is used to initiate a PLMN scan. In general this is done before switching to manual PLMN selection mode.

This function should not be called until the SWI_NOTIFY_PlmnReady notification has been received.

This function is only supported on GSM devices.

Parameters
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed. The result of the request will be indicated in a SWI_NOTIFY_PlmnAvailable notification. SwiGetPLMNSelection() should be used to retrieve the list of PLMN found in the area as a result of the scan.
See Also
See SWI_RCODE for other error return codes.
SWI_NOTIFY_PlmnAvailable
SWI_NOTIFY_PlmnReady
SwiGetPLMNSelection
SwiSetPLMNMode
SwiGetPLMNMode

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