LinuxSDK  V1.4.0.5
Data Structures | Macros | Enumerations | Functions
SwiApiGsmBasic.h File Reference

This file contains definitions, enumerations, structures and forward declarations for SwiApiGsmBasic.c. More...

#include "SwiDataTypes.h"
#include "SwiRcodes.h"

Go to the source code of this file.

Data Structures

struct  SWI_STRUCT_AvailFeatures
 
struct  SWI_STRUCT_Band
 
struct  CNS_BAND_PAYLOAD
 
struct  SWI_STRUCT_Fsn
 
struct  SWI_STRUCT_Thb
 
struct  SWI_STRUCT_ModemDisabled
 
struct  SWI_STRUCT_Imei
 
struct  SWI_STRUCT_FeatureCustomizations
 

Macros

#define MAX_NO_CONTEXT   3
 
#define MAX_3G_GSM_PROFILES   16
 
#define NUMBER_PLMN   14
 
#define NUMBER_Band   5
 
#define LENGTH_IPAddress   16
 
#define LENGTH_AccessPointName   101
 
#define LENGTH_UserName   128
 
#define LENGTH_Label   31
 
#define LENGTH_Password   128
 
#define LENGTH_AddressNumber   20
 
#define LENGTH_SME   20
 
#define LENGTH_SMSTimestamp   14
 
#define LENGTH_SMSValidityPeriod   16
 
#define LENGTH_MaxCHV   9
 
#define LENGTH_MaxPhone   20
 
#define LENGTH_CallerName   82
 
#define MAX_CALLS   7
 
#define LENGTH_MaxDebugString   201
 
#define LENGTH_DcsMsgInd   3
 
#define LENGTH_Timestamp   14
 
#define LENGTH_Validity   16
 
#define LENGTH_MAX_Sms   1024
 
#define LENGTH_MAX_SmsMsgData   161
 
#define LENGTH_MsgWaiting   3
 
#define LENGTH_EntryName   (31 * UTF8_MAX_CHAR_SIZE) + 1
 
#define LENGTH_GSM_PhoneNumber   40
 
#define LENGTH_EmergencyPhoneNumber   6
 
#define LENGTH_ForwardNumber   38
 
#define LENGTH_ForwardInfo   18
 
#define LENGTH_SSPassword   4
 
#define VERSION_SuppService   0x0001
 
#define MAX_FWD_INFO_ENTRIES   8
 
#define MAX_CALL_BARR_ENTRIES   8
 
#define MAX_INFO_DATA   70
 
#define MAX_BS_LIST   70
 
#define LENGTH_RawData   229
 
#define LENGTH_SSString   40
 
#define LENGTH_STKCommand   119
 
#define LENGTH_STKCommand_utf8   (119 * UTF8_MAX_CHAR_SIZE) + 1
 
#define LENGTH_STKRespInput   120
 
#define LENGTH_STKRespInput_utf8   (120 * UTF8_MAX_CHAR_SIZE) + 1
 
#define LENGTH_SSString   40
 
#define LENGTH_SetFeaturesKey   21
 
#define LENGTH_RandNum   16
 
#define LENGTH_Kc   8
 
#define LENGTH_USSDInput   100
 
#define LENGTH_CommandData   157
 
#define LENGTH_ErrorString   33
 
#define LENGTH_IccId   10
 
#define LENGTH_Imei   16
 
#define LENGTH_Tac   7
 
#define LENGTH_Fac   3
 
#define LENGTH_Snr   7
 
#define LENGTH_ChkByte   2
 
#define LENGTH_Fsn   16
 
#define LENGTH_Signature   9
 

Enumerations

enum  SWI_TYPE_Band {
  SWI_BAND_None, SWI_BAND_PGSM, SWI_BAND_EGSM, SWI_BAND_DCS,
  SWI_BAND_PGSM_DCS, SWI_BAND_EGSM_DCS, SWI_BAND_PCS, SWI_BAND_PGSM_PCS,
  SWI_BAND_EGSM_PCS, SWI_BAND_GSM850, SWI_BAND_GSM850_PCS, SWI_BAND_GSM_ALL,
  SWI_BAND_WCDMA_EU, SWI_BAND_WCDMA_NA, SWI_BAND_WCDMA_GSM_NA, SWI_BAND_WCDMA_GSM_EU,
  SWI_BAND_WCDMA_ALL = 0x0010, SWI_BAND_WCDMA_AU, SWI_BAND_WCDMA_JAP, SWI_BAND_WCDMA_GSM_AU,
  SWI_BAND_WCDMA_GSM_AU_2, SWI_BAND_WCDMA_GSM_AU_3, SWI_BAND_AUTO = 0xffff
}
 
enum  SWI_TYPE_PDP { SWI_PDP_IP, SWI_PDP_PPP, SWI_PDP_IPV6 }
 

Functions

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

Detailed Description

This file contains definitions, enumerations, structures and forward declarations for SwiApiGsmBasic.c.

Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved

Macro Definition Documentation

#define LENGTH_AccessPointName   101
#define LENGTH_AddressNumber   20
#define LENGTH_CallerName   82
#define LENGTH_ChkByte   2
#define LENGTH_CommandData   157
#define LENGTH_DcsMsgInd   3
#define LENGTH_EmergencyPhoneNumber   6
#define LENGTH_EntryName   (31 * UTF8_MAX_CHAR_SIZE) + 1
#define LENGTH_ErrorString   33
#define LENGTH_Fac   3
#define LENGTH_ForwardInfo   18
#define LENGTH_ForwardNumber   38
#define LENGTH_Fsn   16
#define LENGTH_GSM_PhoneNumber   40
#define LENGTH_IccId   10
#define LENGTH_Imei   16
#define LENGTH_IPAddress   16
#define LENGTH_Kc   8
#define LENGTH_Label   31
#define LENGTH_MAX_Sms   1024
#define LENGTH_MAX_SmsMsgData   161
#define LENGTH_MaxCHV   9
#define LENGTH_MaxDebugString   201
#define LENGTH_MaxPhone   20
#define LENGTH_MsgWaiting   3
#define LENGTH_Password   128
#define LENGTH_RandNum   16
#define LENGTH_RawData   229
#define LENGTH_SetFeaturesKey   21
#define LENGTH_Signature   9
#define LENGTH_SME   20
#define LENGTH_SMSTimestamp   14
#define LENGTH_SMSValidityPeriod   16
#define LENGTH_Snr   7
#define LENGTH_SSPassword   4
#define LENGTH_SSString   40
#define LENGTH_SSString   40
#define LENGTH_STKCommand   119
#define LENGTH_STKCommand_utf8   (119 * UTF8_MAX_CHAR_SIZE) + 1
#define LENGTH_STKRespInput   120
#define LENGTH_STKRespInput_utf8   (120 * UTF8_MAX_CHAR_SIZE) + 1
#define LENGTH_Tac   7
#define LENGTH_Timestamp   14
#define LENGTH_UserName   128
#define LENGTH_USSDInput   100
#define LENGTH_Validity   16
#define MAX_3G_GSM_PROFILES   16
#define MAX_BS_LIST   70
#define MAX_CALL_BARR_ENTRIES   8
#define MAX_CALLS   7
#define MAX_FWD_INFO_ENTRIES   8
#define MAX_INFO_DATA   70
#define MAX_NO_CONTEXT   3
#define NUMBER_Band   5
#define NUMBER_PLMN   14
#define VERSION_SuppService   0x0001

Enumeration Type Documentation

This enumeration contains the frequency bands

Note
The AC710 is a single band card. It only supports PCS.
The AC750 is a tri-band card. It supports EGSM, EGSM_DCS, PCS and Auto.
Enumerator
SWI_BAND_None 

no frequency band.

SWI_BAND_PGSM 

900MHz (not supported).

SWI_BAND_EGSM 

extended 900MHz.

SWI_BAND_DCS 

1800MHz (not supported).

SWI_BAND_PGSM_DCS 

900MHz and 1800MHz (not supported).

SWI_BAND_EGSM_DCS 

extended 900MHz and 1800MHz.

SWI_BAND_PCS 

1900MHz.

SWI_BAND_PGSM_PCS 

900 and 1900 MHz.

SWI_BAND_EGSM_PCS 

900e and 1900 MHz.

SWI_BAND_GSM850 

850MHz (not supported).

SWI_BAND_GSM850_PCS 

850 and 1900 MHz (not supported).

SWI_BAND_GSM_ALL 

All GSM bands.

SWI_BAND_WCDMA_EU 

EU band: WCDMA 2100.

SWI_BAND_WCDMA_NA 

NA band: WCDMA 850/1900.

SWI_BAND_WCDMA_GSM_NA 

NA bands: WDMA 850/1900 & GSM 850/1900.

SWI_BAND_WCDMA_GSM_EU 

EU bands: WCDMA 2100 & GSM 900/1800.

SWI_BAND_WCDMA_ALL 

All WCDMA bands.

SWI_BAND_WCDMA_AU 

Australia bands: WCDMA 2100/850.

SWI_BAND_WCDMA_JAP 

Japan bands: WCDMA 2100/800.

SWI_BAND_WCDMA_GSM_AU 

Australia bands: WCDMA 2100/850 GSM 900/1800.

SWI_BAND_WCDMA_GSM_AU_2 

Australia bands: WCDMA 850 GSM 900/1800.

SWI_BAND_WCDMA_GSM_AU_3 

Australia bands: WCDMA 850.

SWI_BAND_AUTO 

auto band selection.

This enumeration contains the PDP connection types.

Enumerator
SWI_PDP_IP 

IPV4.

SWI_PDP_PPP 

PPP.

SWI_PDP_IPV6 

IPV6.

Function Documentation

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

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

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

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

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

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

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

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

NOTE: This function is deprecated and replaced with SwiGetRadioBand

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

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

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

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

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

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

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

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

Parameters
pImei,:[OUT] pointer to SWI_STRUCT_Imei storage
timeout[IN],:response timeout value in milliseconds
Returns
SWI_RCODE_OK - the request has been received by the modem
SWI_RCODE_REQUEST_TIMEOUT - the request has timed out
See SWI_RCODE for other error return codes

Check byte

SWI_API SWI_RCODE SwiGetModemDisable ( swi_bool pModemDisable,
swi_uint32  timeout 
)

This function returns the modem power setting.

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

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

This function is used to retrieve the FSN

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

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

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

This function is used to retrieve the test history byte

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

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

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

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

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

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

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

This function turns the all notifications OFF

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

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

SWI_NOTIFY_AirServerChange

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

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