|
LinuxSDK
V1.4.0.5
|
SWI CDMA specific basic APIs. More...
#include "SwiApiCdmaBasic.h"#include "SwiIntPkCdmaBasic.h"#include "SwiIntUpkCdmaBasic.h"#include "ap/apidefs.h"Variables | |
| static swi_bool | gnDeviceEVDOSettingNew = FALSE |
SWI CDMA specific basic APIs.
Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved
| SWI_API SWI_RCODE SwiChangeLockPIN | ( | const swi_charp | OldPassword, |
| const swi_charp | NewPassword, | ||
| swi_uint16 * | pResponse, | ||
| swi_uint32 | timeout | ||
| ) |
This function changes the user’s passcode (PIN).
The return value: SWI_RCODE_REQUEST_TIMEOUT requires special care. If the OldPassword was accepted, the new setting will be made. A subsequent retry will report an invalid password (OldPassword) because the new password is in effect. On the other hand, if the OldPassword was rejected, the settings are unchanged. A retry will report an invalid password, because the user failed to match. Both cases give exactly the same result on a retry! The recommended course of action is to have the application silently retry the command using the NewPassword value in both the old and new parameters. If the modem accepts this, then the change is complete. If the modem rejects it, then OldPassword was likely rejected in the orginal call and the user will have to start the process over.
| OldPassword[IN] | The original passcode; to permit the user to make the change. |
| NewPassword[IN] | The new setting for the passcode. |
| pResponse[OUT] | The result of the requested change: 0 = change rejected; 1 = change accepted |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetActivationStatus | ( | swi_uint16 * | pActivationStatus, |
| swi_uint32 | timeout | ||
| ) |
This function reports the activation status of the modem.
This function can be used to determine if the modem has been activated with at least one NAM account profile. If not, the application should only offer the user E911 service and a mechanism to activate the modem with the service provider, either by OTASP or direct data entry.
| pActivationStatus[OUT] | The destination in which the status is returned: 0 = False; 1 = True. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetAutoLock | ( | swi_uint16 * | autoLock, |
| swi_uint32 | timeout | ||
| ) |
This function reports the state of the autolock feature.
The setting of autolock is controlled with SwiSetAutoLock.
| autoLock[OUT] | The status of the autolock feature: 0 = disabled; 1 = enabled |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetCarrierID | ( | swi_int16 * | pnCarrierID, |
| swi_uint32 | timeout | ||
| ) |
This function reports the ID of the carrier the modem is configured for.
| pnCarrierID[OUT] | Carrier ID. Possible enumerated values are defined in SWI_TYPE_CarrierID. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetCdmaIMSI | ( | swi_uint16 | namIndex, |
| swi_charp | pszMIN, | ||
| swi_uint32 | length, | ||
| swi_uint32 | timeout | ||
| ) |
This function returns the MIN (Mobile Identifi-cation Number) string of the specified NAM account profile.
This function returns the NMSI digits of the CDMA IMSI (refer to IS-95B). The length of the MIN string can be up to 10 bytes.
| namIndex[IN] | Index (base 0) of the NAM account to query. See SwiGetNamInfo. |
| pszMIN[OUT] | The MIN string of the selected NAM profile. |
| length[IN] | Size of the buffer to receive the result. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetDeviceEVDOSetting | ( | swi_uint16 * | pwMask, |
| swi_uint32 | timeout | ||
| ) |
This function gets device CDMA setting.
| pwMask[OUT] | Pointer to save mask retrived for device CDMA setting. 0: CDMA Rev 0; 1: CDMA Rev A. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetDistributorID | ( | swi_int16 * | pnDistributorID, |
| swi_uint32 | timeout | ||
| ) |
This function reports the ID of the Distributor the modem is configured for.
| pnDistributorID[OUT] | Distributor ID. Possible enumerated values are defined in SWI_TYPE_DistributorID |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetE911Mode | ( | swi_uint16 * | e911Mode, |
| swi_uint32 | timeout | ||
| ) |
This function This function reports the current E911 mode of the modem. Modem features may be disabled in E911 mode, based on service provider settings.
The modem enters E911 mode when a voice call is originated using one of the pre-programmed emergency numbers. The mode is cleared after five minutes or manually via SwiSetE911Mode.
There is a notification (SWI_NOTIFY_E911Mode) to report the modem’s entry and exit from E911 mode.
| e911Mode[OUT] | The destination in which the mode is returned: 0 = Off; 1 = On |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetECIO | ( | swi_uint16 * | pEcio, |
| swi_uint32 | timeout | ||
| ) |
This function reports the current EC/IO value
The EC/IO value returned is positive, and should be negated to be interpreted correctly.
| pEcio[OUT] | The destination in which the EC/IO value is returned. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetERIVer | ( | const swi_charp | pszERIFilename, |
| swi_uint16 * | pnERIVer, | ||
| swi_uint32 | timeout | ||
| ) |
This function gets the ERI version stored in the modem.
| pszERIFilename[IN] | ERI Filename stored in modem. |
| pnERIVer[IN] | ERI File Version. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetESN | ( | swi_int32 * | lEsn, |
| swi_uint32 | timeout | ||
| ) |
This function returns the device's unique identity as a string. The returned value is the ESN (Electronic Serial Number) of the modem.
Managing display of the ESN as a string is up to you. In the CDMA marketplace, the ESN is usually presented as the single 8-character string, in the form of a hexadecimal number; for example: CE0271C8.
| lEsn[OUT] | ESN returned from modem. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetGeneralFeatureSupport | ( | swi_uint32 * | pMask, |
| swi_uint32 | timeout | ||
| ) |
This function gets the device's General Feature support capabilities.
See SWI_TYPE_General_Features for mask definitions.
| pMask[OUT] | Bitmask of capability settings |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetLEDEnable | ( | swi_bool * | pbEnable, |
| swi_uint32 | timeout | ||
| ) |
This function gets the device's LED enable state.
This functionality is not support on all devices. A successful return indicates the functionality exists and the current setting of the LED.
| pbEnable[OUT] | Current state of LED setting (0=disabled, 1=enabled). |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetLEDEnableEx | ( | SWI_STRUCT_LED_CFG_ENABLE * | pLED, |
| swi_uint32 | timeout | ||
| ) |
This function gets the device's LED enable state.
This API extends SwiGetLEDEnable by adding a bit mask for indicating LED groups (ie. pwr/signal and glowtop).
This functionality is not support on all devices. Check SwiGetGeneralFeatureSupport() for SWI_GEN_FEATURE_ENH_LED to determine if enhanced LED support is available. If so, this API must be used in place of SwiGetLEDEnable().
| pLED[IN] | LED enable state returned from modem. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetLockStatus | ( | swi_uint16 * | pLockStatus, |
| swi_uint32 | timeout | ||
| ) |
This function reports the state of the user security lock.
| pLockStatus[OUT] | The status of the user security lock: 0 = not locked; 1 = locked |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetMEIDESN | ( | struct SWI_STRUCT_MeidEsn * | pMeidEsn, |
| swi_uint32 | timeout | ||
| ) |
This function returns the device's unique identity The returned value is the MEID (Mobile Equipment Identifier) and ESN (Electronic Serial Number) of the modem.
Managing display of the MEID and ESN is up to the caller
| timeout[IN] | Function timeout in milliseconds |
| pMeidEns[OUT] | The destination in which the MEID and ESN is returned. |
| SWI_API SWI_RCODE SwiGetNamInfo | ( | swi_uint16 * | cntNamProfile, |
| swi_uint16 * | nextNamProfile, | ||
| swi_uint32 | timeout | ||
| ) |
This function reports information about the modem’s NAM profile table: the number of profiles supported, and the next empty table entry.
| cntNamProfile[OUT] | The total number of NAM profiles the modem can support. |
| nextNamProfile[OUT] | The index number (base 0) of the next empty profile. 0xFFFF indicates no empty profiles. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetNamValidStatus | ( | swi_uint16 * | pNamValidStatus, |
| swi_uint32 | timeout | ||
| ) |
This function returns the NAM valid status
| pNamValidStatus[OUT] | Returns the NAM valid status. 0x0000 – Incomplete NAM, Service Required 0x0001 – Complete NAM 0x0002 – Incomplete NAM, exceptional Service Required |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetPhoneNumber | ( | swi_charp | PhoneNumber, |
| swi_uint32 | BufferSize, | ||
| swi_uint32 | timeout | ||
| ) |
This function returns the phone number from the currently active NAM account profile.
The phone number is returned as an null-termi-nated ASCII string of 10-15 numerals.
The current NAM account profile is set with SwiPstSetCurrentNam.
| PhoneNumber[OUT] | The destination in which the current account phone number is returned. |
| BufferSize[IN] | The maximum size of the output string(PhoneNumber). |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetPortMapping | ( | swi_uint8 * | pnPortMapping, |
| swi_uint32 | timeout | ||
| ) |
This function gets the current port mapping
| pnPortMapping[OUT] | Pointer pointing to current port mapping returned |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetPRIVersion | ( | swi_uint8 * | pMajor, |
| swi_uint8 * | pMinor, | ||
| swi_uint32 | timeout | ||
| ) |
This function retrieves the modem's PRI version.
| pMajor[OUT] | PRI major version |
| pMinor[OUT] | PRI minor version |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetPRLVersion | ( | swi_uint16 * | pPrlVersion, |
| swi_uint32 | timeout | ||
| ) |
This function gets PRL version
| pPrlVersion[OUT] | Version number of the current PRL. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetProvisioningDate | ( | swi_uint16 | namIndex, |
| swi_charp | pszProvisioningData, | ||
| swi_uint32 | length, | ||
| swi_uint32 | timeout | ||
| ) |
This function returns the date on which a specified NAM index was activated (written).
The provisioning date is set whenever the NAM profile is written. The date comes from the CDMA network at the time the account profile is written, or as soon as CDMA coverage is available.
| namIndex[IN] | The (base 0) index number of the NAM account profile to query. See SwiGetNamInfo. |
| pszProvisioningData[OUT] | Date string in the form YYYYMMDD. An empty account index will report all zeroes. |
| length[IN] | The maximum size of the output string. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetStationClassMark | ( | swi_uint8 * | pbSCM, |
| swi_uint32 | timeout | ||
| ) |
This function gets device's Station Class Mark
| pbSCM[OUT] | Pointer to data buffer. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetSystemTime | ( | swi_uint16 * | year, |
| swi_uint16 * | month, | ||
| swi_uint16 * | day, | ||
| swi_uint16 * | weekDay, | ||
| swi_uint16 * | hour, | ||
| swi_uint16 * | minute, | ||
| swi_uint16 * | second, | ||
| swi_uint32 | timeout | ||
| ) |
This function returns the date and time from the CDMA network.
| year[OUT] | Year as a binary number; such as 0x7D0 for year 2000. |
| month[OUT] | Month in binary |
| day[OUT] | Day date in the month in binary |
| weekDay[OUT] | Day of the week as a numeric: 0x0001 = Mon, 0x0001 = Mon, 0x0007 = Sun |
| hour[OUT] | Hour in binary (24-hour clock). For example: 0x0016 = 10 PM |
| minute[OUT] | Minutes in binary |
| second[OUT] | Seconds in binary |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetTechHdrMacIndex | ( | SWI_STRUCT_Tech_Hdr_Mac_Index * | pTechHdrMacIndex, |
| swi_uint32 | timeout | ||
| ) |
This function gets the device HDR MAC index value.
| pTechHdrMacIndex[OUT] | Mac Index. (see SWI_STRUCT_Tech_Hdr_Mac_Index) |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetTemperature | ( | swi_int32 * | iTemperature, |
| swi_uint32 | timeout | ||
| ) |
This function reports the temperature of the radio within the modem.
The modem firmware monitors the radio temperature to protect electronics and prevent drift from specification. Consult the product specification for the specific type of unit you are using to determine the way the modem handles high temperatures.
| iTemperature[OUT] | Temperature in degrees C. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiGetTotalUpTime | ( | swi_uint32 * | pTotalUpTime, |
| swi_uint32 | timeout | ||
| ) |
This function returns the Devices Life Timer value
| pTotalUpTime[OUT] | Device Life Timer value. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiIsModemReady | ( | swi_uint32 | timeout | ) |
This function reports whether the modem is in a state where it is ready for normal operation. This function should be called after successfully calling SwiRegisterCallback, and before any other API function call.
This function should always be called after successfully calling SwiRegisterCallback (which is always called after SwiApiOpen, and before any other API function call.
When the modem undergoes a power cycle (typically after inserting the modem or resuming from a reset or host suspend), the modem may take some time to initialize. During this period, the modem may not respond to any API modem functions, in spite a successful call with SwiApiOpen. This function is used to test for this condition, and should be repeatedly called until it succeeds.
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiLockModem | ( | const swi_charp | Password, |
| swi_uint16 * | pResponse, | ||
| swi_uint32 | timeout | ||
| ) |
This function toggles the state of the user security lock.
| Password[IN] | The user’s passcode to contol the modem lock. |
| pResponse[OUT] | The modem’s response to the password provided: 0 = passcode rejected; 1 = accepted - state toggled |
| timeout[IN] | Function timeout in milliseconds. |
This function forces modem out of CDMA deep sleep.
Typically prior to dialing a number using the dialpad, using the phone book or when RAS dialing, this function should be called to wake up the modem if it is in CDMA power save mode.
| SWI_API SWI_RCODE SwiPriGetVoiceDataMask | ( | swi_uint16 * | voiceDataMask, |
| swi_uint32 | timeout | ||
| ) |
This function reports the modem's voice/data capabilities
| voiceDataMask[OUT] | The destination in which the data is returned. Possible mask bit values are defined in SWI_TYPE_PRI_VoiceDataMask (See SwiStructs.h for details) |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetAccolc | ( | swi_uint16 | Nam, |
| swi_uint16 * | Accolc, | ||
| swi_uint32 | timeout | ||
| ) |
This function gets the Access Overload Class setting.
| Nam[IN] | NAM index. |
| Accolc[OUT] | Accolc setting |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetCurrentNam | ( | swi_uint16 * | CurrentNam, |
| swi_uint32 | timeout | ||
| ) |
This function returns the currently active NAM index number.
This account profile is used for all call connections. Use SwiPstSetCurrentNam to change the active account.
| CurrentNam[OUT] | The index (base 0) of the currently active NAM account profile. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetImsi1112 | ( | swi_uint16 | Nam, |
| swi_uint16 * | Digits1112, | ||
| swi_uint32 | timeout | ||
| ) |
This function gets IMSI_1112.
Value must be decoded for proper display.
| Nam[IN] | NAM index. |
| Digits1112[OUT] | Encoded IMSI_1112 |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetImsiMcc | ( | swi_uint16 | Nam, |
| swi_uint16 * | Mcc, | ||
| swi_uint32 | timeout | ||
| ) |
This function gets Mobile Country Code (MCC).
Value must be decoded for proper display.
| Nam[IN] | NAM index. |
| Mcc[OUT] | Encoded MCC |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetImsiMS1 | ( | swi_uint16 | Nam, |
| swi_uint32 * | IMSI, | ||
| swi_uint32 | timeout | ||
| ) |
This function retrieves 1st part of IMSI
Use SwiPstGetImsiMS2 to retrieve 2nd part. Both IMSI parts must be retrieved and decoded for complete IMSI display.
| Nam[IN] | NAM index. |
| IMSI[OUT] | Encoded IMSI value. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetImsiMS2 | ( | swi_uint16 | Nam, |
| swi_uint16 * | Imsi_MS2, | ||
| swi_uint32 | timeout | ||
| ) |
This function retrieves 2st part of IMSI.
Use SwiPstGetImsiMS1 to retrieve 1st part. Both IMSI parts must be retrieved and decoded for complete IMSI display.
| Nam[IN] | NAM index. |
| Imsi_MS2[OUT] | Encoded IMSI value. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetNamName | ( | swi_uint16 | Nam, |
| swi_charp | pszNamName, | ||
| swi_uint32 | length, | ||
| swi_uint32 | timeout | ||
| ) |
This function retrieves NAM name.
| Nam[IN] | NAM index. |
| pszNamName[OUT] | Nam Name String. |
| length[IN] | Length of string buffer passed in. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstGetSci | ( | swi_uint16 * | Sci, |
| swi_uint32 | timeout | ||
| ) |
This function gets the Slot Cycle Index value.
| Sci[OUT] | The Slot cycle index setting. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstLock | ( | swi_uint16 | Type, |
| swi_uint16 | Nam, | ||
| swi_uint16 * | commitResult, | ||
| swi_uint16 * | failureMask, | ||
| swi_uint32 | timeout | ||
| ) |
This function closes the activation process, either cancelling the changes or committing them to storage.
The modem must have been unlocked via SwiPstUnlock prior to this command.
In the event of a failure, the entire process of activation should be repeated. The failure mask reports all known reasons why a commit failed. See Activation process in the API Reference for a description of the complete activation process.
| Type[IN] | 0 = cancel changes; 1 = commit changes |
| Nam[IN] | Index (base 0) of the NAM account profile to commit or cancel. See SwiGetNamInfo. |
| commitResult[OUT] | 0 = Fail - see remarks; 1 = Success |
| failureMask[OUT] | Bit-mapped failure reason, see SWI_TYPE_Commit_ErrorMask for possible values |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstSetAccolc | ( | swi_uint16 | Nam, |
| swi_uint16 | Accolc, | ||
| swi_uint32 | timeout | ||
| ) |
This function Sets the Access Overload Class value.
| Nam[IN] | NAM index. |
| Accolc[IN] | Accolc setting |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstSetCurrentNam | ( | swi_uint16 | CurrentNam, |
| swi_uint32 | timeout | ||
| ) |
This function sets the index to a NAM account profile to make the active account for connec-tions and other queries.
The modem must be reset via SwiResetModem to have the change take effect.
The current setting can be read using SwiPstGetCurrentNam.
| CurrentNam[IN] | Index (base 0) to set as the currently active NAM account profile. See SwiGetNamInfo. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstSetImsi1112 | ( | swi_uint16 | Nam, |
| swi_uint16 | Digits1112, | ||
| swi_uint32 | timeout | ||
| ) |
This function sets IMSI_1112
Value must be encoded before written to modem.
| Nam[IN] | NAM index. |
| Digits1112[IN] | Encoded IMSI_1112 |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstSetImsiMcc | ( | swi_uint16 | Nam, |
| swi_uint16 | Mcc, | ||
| swi_uint32 | timeout | ||
| ) |
This function sets the Mobile Country Code (MCC).
| Nam[IN] | NAM index. |
| Mcc[IN] | Encoded MCC |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstSetImsiMS1 | ( | swi_uint16 | Nam, |
| swi_uint32 | Imsi_MS1, | ||
| swi_uint32 | timeout | ||
| ) |
This function sets 1st part of IMSI.
IMSI must be encoded before writing to modem.
| Nam[IN] | NAM index. |
| Imsi_MS1[IN] | encoded IMSI value. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstSetImsiMS2 | ( | swi_uint16 | Nam, |
| swi_uint16 | Imsi_MS2, | ||
| swi_uint32 | timeout | ||
| ) |
This function sets 2nd part of IMSI.
IMSI must be encoded before writing to modem.
| Nam[IN] | NAM index. |
| Imsi_MS2[IN] | Encoded IMSI value. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstSetNamName | ( | swi_uint16 | Nam, |
| const swi_charp | pszNamName, | ||
| swi_uint32 | timeout | ||
| ) |
This function sets the NAM name
| Nam[IN] | NAM index. |
| pszNamName[IN] | Nam Name String. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiPstUnlock | ( | swi_uint32 | SubsidyLock, |
| swi_uint32 | timeout | ||
| ) |
This function uses the subsidy lock value (OTSL, MSL, or SPC) to unlock access to activate (write) a NAM account profile.
| SubsidyLock[IN] | Either the OTSL, or the MSL (also known as the SPC). This number is provided by the service provider. |
| timeout[IN] | Function timeout in milliseconds. |
This function resets the modem.
This is typically done after modifying particular modem settings that require a reset for the new settings to take effect.
During the period in which the modem resets and re-initializes, the modem will not respond to any API requests.
After the reset, any previously enabled notifications must be re-enabled, and any previous modem states and/or information may no longer be valid.
Typical scenarios requiring a modem reset include:
| SWI_API SWI_RCODE SwiRtnReset | ( | swi_uint8 | nType, |
| swi_uint32 | timeout | ||
| ) |
This function performs a RTN or PRI reset on the device.
This will reset the device to factory state. Note that this action may take several moments.
| nType[IN] | Type of reset (PRI_RESET = 1,RTN_RESET = 2) |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetAKey | ( | swi_charp | szAKey, |
| swi_uint32 | timeout | ||
| ) |
This function sets the 20 Digit AKey.
AKey Checksum is managed internally by the API. Modem must be MSL unlocked to write this item. Modem should be relocked after written.
| szAKey[IN] | AKey to be written to modem. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetAutoLock | ( | swi_uint16 | autoLock, |
| swi_uint32 | timeout | ||
| ) |
This function This function sets the state of the automatic user security lock on the modem.
If you enable the autolock, the lock will be on the next time the modem is started (reset or power cycled). The state of the current autolock setting can be read using SwiGetAutoLock.
A locked modem is unlocked with SwiLockModem.
| autoLock[IN] | The autolock state setting: 0 = Off; !0 = Enabled |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetDeviceEVDOSetting | ( | swi_uint16 | wMask, |
| swi_uint32 | timeout | ||
| ) |
This function sets device CDMA setting
| wMask[IN] | Mask to be set for device CDMA setting. 0: CDMA Rev 0; 1: CDMA Rev A. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetE911Mode | ( | swi_uint16 | e911Mode, |
| swi_uint32 | timeout | ||
| ) |
This function turns off the E911 mode of the modem.
The modem enters E911 mode when a voice call is originated using one of the pre-programmed emergency numbers. The mode is cleared after five minutes, or this function can be used to force the modem back to normal operations.
There is a notification (SWI_NOTIFY_E911Mode) to report the modem’s entry and exit from E911 mode.
| e911Mode[IN] | Must be zero (0). |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetERI | ( | swi_uint8 * | pERIBuffer, |
| swi_uint16 | nERIBufLen, | ||
| swi_uint32 | timeout | ||
| ) |
This function write the ERI data to the modem.
Before calling this API, make sure that the modem is SPC (or MSL) unlocked. After calling this API, whether the operation is successfull or not, should call SwiResetModem
| pERIBuffer[IN] | Pointer to the entire ERI data buffer. |
| nERIBufLen[IN] | Size of the ERI data. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetIMSI | ( | swi_uint16 | namIndex, |
| const swi_charp | pszMIN, | ||
| swi_uint32 | timeout | ||
| ) |
This function sets the MIN string for the specified NAM account profile.
The MIN is a string of the NMSI digits of the CDMA IMSI (refer to IS-95B). The MIN must be from 1 to 10 bytes long. The modem will pad with zeroes for MINs less than 10 bytes. The balance of the IMSI is pre-programmed at the factory for the particular service provider.
The data is not committed until SwiPstLock is called. See "Activation process" in documentation for a description of the activation process.
| namIndex[IN] | Index (base 0) of the NAM account to set. See SwiGetNamInfo. |
| pszMIN[IN] | MIN to store. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetLEDEnable | ( | swi_bool | bEnable, |
| swi_uint32 | timeout | ||
| ) |
This function sets the device's LED enable state.
This functionality is not support on all devices. A successful return indicates the functionality exists and the LED setting was set. To determine if feature is supported, use SwiGetLEDEnable().
| bEnable[IN] | LED setting (0=disabled, 1=enabled) |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetLEDEnableEx | ( | const SWI_STRUCT_LED_CFG_ENABLE * | pLED, |
| swi_uint32 | timeout | ||
| ) |
This function sets the device's LED enable states.
This API extends SwiSetLEDEnable by adding a bit mask to control LED groups.
This functionality is not support on all devices. A successful return indicates the functionality exists and the LED setting was set. To determine if feature is supported, check for SWI_GEN_FEATURE_ENH_LED using SwiGetGeneralFeatureSupport(). If supported, this API must be used in place of SwiSetLEDEnable().
| pLED[IN] | Table of LED settings. 0 = disable, 1 = enable. Note: Type field is not used. |
| timeout[IN] | Function timeout in milliseconds. |
This function This function set the modem to offline mode.
This is typically done before saving data to the modem and then reset the modem with SwiResetModem. The benefit to bring the modem to offline mode is to limit modem's operation during this mode.
Typical scenarios requiring a modem reset include:
During this mode, the modem might error out on certain operations like, voice/data/SMS related call.
SWI_NOTIFY_Power[_Power.State == SWI_Type_PowerOffline] notification will be sent when the modem completes the offline. See SWI_NOTIFY_Power for details.
To exit this mode, application needs to call SwiResetModem.
| SWI_API SWI_RCODE SwiSetPortMapping | ( | swi_uint8 | nPortMapping, |
| swi_uint32 | timeout | ||
| ) |
This function sets the port mapping
| nPortMapping[IN] | Port mapping to set. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetPRL | ( | swi_uint16 | NamIndex, |
| swi_uint8 * | pPRLBuffer, | ||
| swi_uint16 | nPRLBufLen, | ||
| swi_uint32 | timeout | ||
| ) |
This function upload the PRL binary data to the modem.
If this API returns error then call it one more time with the same parameters. Before calling this API, make sure that the modem is SPC (or MSL) unlocked. After calling this API, whether the operation is successfull or not, should call SwiResetModem
| NamIndex[IN] | NAM index. |
| pPRLBuffer[IN] | Pointer to the entire binary data of PRL to upload. |
| nPRLBufLen[IN] | Size of the binary data. |
| timeout[IN] | Function timeout in milliseconds. |
| SWI_API SWI_RCODE SwiSetPRLEx | ( | swi_uint16 | NamIndex, |
| swi_uint8 * | pPRLBuffer, | ||
| swi_uint16 | nPRLBufLen, | ||
| swi_uint32 | timeout | ||
| ) |
This function upload the PRL binary data to the modem. If this API returns error then call it one more time with the same parameters. This API differs from SwiSetPRL in that this call does not need modem to be SPC (or MSL) unlocked. After calling this API, whether the operation is successfull or not, should call SwiResetModem
| NamIndex[IN] | NAM index. |
| pPRLBuffer[IN] | Pointer to the entire binary data of PRL to upload. |
| nPRLBufLen[IN] | Size of the binary data. |
| timeout[IN] | Function timeout in milliseconds. |