|
LinuxSDK
V1.4.0.5
|
Contains source code for GSM APIs related to network and data. More...
Contains source code for GSM APIs related to network and data.
Copyright: © 2011 Sierra Wireless, Inc. all rights reserved
| SWI_API SWI_RCODE SwiActivateProfile | ( | const swi_uint32 | nProfileID, |
| swi_bool | Activate, | ||
| swi_uint32 | timeout | ||
| ) |
This function initiates or destroys a packet session.
| 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. |
| 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".
| 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 |
| 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.
| pCellInfo,: | [OUT] GSM cell info |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| pProfile,: | [OUT] Basic profile information |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| pProfile,: | [OUT] DNS profile information |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| pProfile,: | [OUT] QoS profile information |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| pProfileSummary,: | [OUT] Profile summary information |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| pProfile,: | [OUT] TFT profile information |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| pSysStatus,: | [OUT] System status |
| timeout,: | [IN] Response timeout value in milliseconds. |
| 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.
| 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. |
| 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.
| sNetworkStatus,: | [OUT] Network status |
| timeout,: | [IN] Response timeout value in milliseconds. |
| 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.
| sSessionStatus,: | [OUT] Packet session status |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| sSessionStatus,: | [IN/OUT] Packet session status containing profileID |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| eMode,: | [OUT] PLMN selection mode |
| timeout,: | [OUT] Response timeout value in milliseconds |
| 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.
| sPlmn,: | [OUT] PLMN information |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| sPrl:[OUT] | PRL region information. The structure size must be populated by the caller. |
| timeout:[IN] | Response timeout value in milliseconds |
| 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.
| psRat,: | [OUT] RAT mode information. |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| pRscpEcIo,: | [OUT] RSCP and Ec/Io measurements. |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| iRssi,: | [IN] RSSI value in dBm to be converted to number of RSSI bars. |
| pNumBars,: | [OUT] Number of RSSI bars to be displayed. |
| 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.
| sRssiBer,: | [OUT] RSSI and BER values |
| timeout,: | [IN] Response timeout value in milliseconds. |
| 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.
| eServiceStatus,: | [OUT] Service status |
| timeout,: | [IN] Response timeout value in milliseconds. |
| 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.
| nSent,: | [OUT] Number of bytes sent |
| nReceived,: | [OUT] Number of bytes received |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| timeout,: | [IN] Response timeout value in milliseconds. |
| 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.
| 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. |
| 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.
| 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 |
| 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.
| 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 |
| 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.
| 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 |
| 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.
| 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 |
| 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.
| 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. |
| 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.
| sPlmn,: | [IN] PLMN selection mode information |
| timeout,: | [IN] Response timeout value in milliseconds |
| 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.
| 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 |
| 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.
| 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 |
| 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.
| timeout,: | [IN] Response timeout value in milliseconds |