LinuxQMISDK: qaGobiApiDcs.h File Reference

LinuxQMISDK SLQS03.03.07

- Main Page
- Modules
- References
- Data Structures

- File List
- Globals

Data Structures | Macros | Enumerations | Functions
qaGobiApiDcs.h File Reference
Device Connectivity Service (DCS)

Device Connectivity Service API function prototypes. More...

Go to the source code of this file.

## Data Structures
struct | DcsUsbPortNames
struct | QosMap
struct | NetStats

## Macros
#define | LEN 10
#define | PORTNAM_LEN 32

## Enumerations
enum | eAPI_DCS_GET_DEVICE_MODE { DCS_DEVICE_MODE_DISCONNECTED, DCS_DEVICE_MODE_READY, DCS_DEVICE_MODE_BOOT_READY }

## Functions
ULONG | QCWWAN2kEnumerateDevices (BYTE *pDevicesSize, BYTE *pDevices)
ULONG | QCWWAN2kConnect (CHAR *pDeviceID, CHAR *pDeviceKey)
ULONG | QCWWANDisconnect ()
ULONG | QCWWAN2kGetConnectedDeviceID (ULONG deviceIDSize, CHAR *pDeviceID, ULONG deviceKeySize, CHAR *pDeviceKey)
ULONG | QCWWANEnumerateDevices (BYTE *pDevicesSize, BYTE *pDevices)
ULONG | QCWWANConnect (CHAR *pDeviceID, CHAR *pDeviceKey)
ULONG | SetSDKImagePath (LPCSTR pPath)
ULONG | SLQSGetUsbPortNames (struct DcsUsbPortNames *pUsbPortNames)
ULONG | SLQSStart_AVAgent (BYTE modem_index)
ULONG | SLQSStart (BYTE modem_index, CHAR *usb_path)
ULONG | SLQSKillSDKProcess ()
ULONG | SLQSGetDeviceMode (BYTE *pDeviceMode)
ULONG | SLQSStartSrv (BYTE action, BYTE mask)
ULONG | SLQSSetLoggingMask (BYTE mask)
ULONG | SLQSQosMap (BYTE instance, BYTE dscp, ULONG qos_id)
ULONG | SLQSQosEditMap (BYTE instance, BYTE dscp, ULONG qos_id)
ULONG | SLQSQosReadMap (BYTE instance, BYTE dscp, ULONG *qos_id)
ULONG | SLQSQosDumpMap (BYTE instance, struct QosMap *pmap, BYTE *plen)
ULONG | SLQSQosUnmap (BYTE instance, BYTE dscp)
ULONG | SLQSQosClearMap (BYTE instance)
int | SLQSGetPidof (CHAR *pProcName)
ULONG | SLQSGetNetStatistic (struct NetStats *pNetStatistic, BYTE instance)

## Detailed Description

Device Connectivity Service API function prototypes.

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

## Macro Definition Documentation

#define LEN 10

#define PORTNAM_LEN 32

This structure contains the SLQSGetUsbPortNames Information

Parameters

  AtCmdPort | [OUT] Name of AT command port
  NmeaPort | [OUT] Name of NMEA port
  DmPort | [OUT] Name of DM port

Note
  Technology Supported: UMTS/CDMA
  Device Supported: MC83x5, MC7700/10/50
  Timeout: 2 seconds
  Port names are limited to 32 characters.

## Enumeration Type Documentation

enum eAPI_DCS_GET_DEVICE_MODE

An enumeration of eAPI_DCS_GET_DEVICE_MODE states

Enumerator
DCS_DEVICE_MODE_DISCONNECTED |
DCS_DEVICE_MODE_READY |
DCS_DEVICE_MODE_BOOT_READY |

## Function Documentation

ULONG QCWWAN2kConnect | ( | CHAR * | pDeviceID,
|  | CHAR * | pDeviceKey
| ) |  |

Connects the Connection Manager API to the first detected QC WWAN device. This function MUST be called after QCWWAN2kEnumerateDevices has been called.

Parameters

  pDeviceID[IN] | Device path pertaining to the device for which the API is being invoked e.g. /dev/qcqmi0.
  pDeviceKey[IN] | Device key pertaining to the device for which the API is being invoked

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_ERR_NO_DEVICE otherwise

Note
  Timeout: 2 seconds

ULONG QCWWAN2kEnumerateDevices | ( | BYTE * | pDevicesSize,
|  | BYTE * | pDevices
| ) |  |

Enumerates the QC WWAN devices currently attached to the host. This API MUST be called before any other API.

Parameters

  pDeviceSize[IN/OUT] | Upon input, maximum number of elements that the device array can contain. Upon successful output, actual number of elements in the device array.
  pDevices[IN/OUT] | Device array; array elements are structures with the following elements: CHAR deviceID[256] - Device path (e.g. /dev/qcqmi0) CHAR deviceKey[16] - Device key stored in the device (e.g. A1000004B01051)

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_ERR_NO_DEVICE on otherwise

Note
  Timeout: 2 seconds

ULONG QCWWAN2kGetConnectedDeviceID | ( | ULONG | deviceIDSize,
|  | CHAR * | pDeviceID,
|  | ULONG | deviceKeySize,
|  | CHAR * | pDeviceKey
| ) |  |

Returns the device ID and device key of the currently connected QC WWAN device.

Parameters

  deviceIDSize | Maximum number of characters (including NULL terminator) that the device ID array can contain.
  pDeviceID[OUT] | Device path string
  deviceKeySize | Maximum number of characters (including NULL terminator) that the device key array can contain.
  pDeviceKey[OUT] | Device key string

Returns
  eQCWWAN_ERR_NONE if device found, eQCWWAN_ERR_NO_DEVICE otherwise

Note
  Timeout: 2 seconds

ULONG QCWWANConnect | ( | CHAR * | pDeviceID,
|  | CHAR * | pDeviceKey
| ) |  |

Enumerates the QC WWAN devices currently attached to the host. This API MUST be called before any other API.

Parameters

  pDeviceID[IN] | Device path pertaining to the device for which the API is being invoked e.g. /dev/qcqmi0.
  pDeviceKey[IN] | Device key pertaining to the device for which the API is being invoked

Returns
  eQCWWAN_ERR_NONE if device found, eQCWWAN_ERR_NO_DEVICE otherwise

Note
  Timeout: 2 seconds
  This API is deprecated; use QCWWAN2kConnect instead

ULONG QCWWANDisconnect | ( |  | ) |

Disconnects the Connection Manager API from a previously connected QC device. This function de-registers all the callback functions that have been registered.

Parameters

  none |

Returns
  eQCWWAN_ERR_NONE

Note
  Timeout: 2 seconds

ULONG QCWWANEnumerateDevices | ( | BYTE * | pDevicesSize,
|  | BYTE * | pDevices
| ) |  |

Enumerates the QC WWAN devices currently attached to the host. This API is deprecated; use QCWWAN2kEnumerateDevices instead.

Parameters

  pDeviceSize[IN/OUT] | Upon input, maximum number of elements that the device array can contain. Upon successful output, actual number of elements in the device array.
  pDevices[IN/OUT] | Device array; array elements are structures with the following elements: CHAR deviceID[256] - Device path (e.g. /dev/qcqmi0) CHAR deviceKey[16] - Device key stored in the device

Returns
  eQCWWAN_ERR_NONE

Note
  Timeout: 2 seconds
  This API must be called prior to any other APIs.

ULONG SetSDKImagePath | ( | LPCSTR | pPath | ) |

Set the location of the SLQS executable

Parameters

  pPath[IN] | - Pointer to fully qualified path of SLQS executable (includes the executable file’s name)

Returns
  eQCWWAN_ERR_NONE

Note
  Timeout: None

ULONG SLQSGetDeviceMode | ( | BYTE * | pDeviceMode | ) |

Returns the Device Mode

Parameters

  pDeviceMode[OUT] | Pointer to SLQS Device Mode of type eAPI_DCS_GET_DEVICE_MODE

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: 2 seconds

ULONG SLQSGetNetStatistic | ( | struct NetStats * | pNetStatistic,
|  | BYTE | instance
| ) |  |

Returns the usbnet statistics for a particular PDN.

Parameters

  | pNetStatistic[OUT] | Pointer to the struct NetStats which the value of every member is to be retrieved
  [in] | instance | PDP Instance id

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: 5 seconds

int SLQSGetPidof | ( | CHAR * | pProcName | ) |

ULONG SLQSGetUsbPortNames | ( | struct DcsUsbPortNames * | pUsbPortNames | ) |

Returns the Usb Port Names currently in use.

Parameters

  pUsbPortNames[OUT] | Pointer to SLQS Usb Port Names Information

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: 2 seconds

ULONG SLQSKillSDKProcess | ( |  | ) |

Kill the SDK process

Parameters

  none |

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: N/A
  This API useful if the application was started with non root priveleges as subsequent attempt to start any application will fail because the SDK requires root permission to access /dev/qcqmi device special files.

ULONG SLQSQosClearMap | ( | BYTE | instance | ) |

Clear Differential Service Code Point(DSCP) to QoS identifier association

Parameters

  [in] | instance | PDP Instance id

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  See qmerrno.h for eQCWWAN_xxx error values

ULONG SLQSQosDumpMap | ( | BYTE | instance,
|  | struct QosMap * | pmap,
|  | BYTE * | plen
| ) |  |

Dump all assoication of Differential Service Code Point(DSCP) with QoS identifier

Parameters

  [in] | instance | PDP Instance id
  [out] | pmap | Pointer to QosMap struct
  [out] | plen | number of QoSMap element

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  See qmerrno.h for eQCWWAN_xxx error values

ULONG SLQSQosEditMap | ( | BYTE | instance,
|  | BYTE | dscp,
|  | ULONG | qos_id
| ) |  |

Edit assoication of Differential Service Code Point(DSCP) with QoS identifier

Parameters

  [in] | instance | PDP Instance id
  [in] | dscp |
  [in] | qos_id |

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  See qmerrno.h for eQCWWAN_xxx error values

ULONG SLQSQosMap | ( | BYTE | instance,
|  | BYTE | dscp,
|  | ULONG | qos_id
| ) |  |

Associate Differential Service Code Point(DSCP) with QoS identifier

Parameters

  [in] | instance | PDP Instance id
  [in] | dscp |
  [in] | qos_id |

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  See qmerrno.h for eQCWWAN_xxx error values

ULONG SLQSQosReadMap | ( | BYTE | instance,
|  | BYTE | dscp,
|  | ULONG * | qos_id
| ) |  |

Read assoication of Differential Service Code Point(DSCP) with QoS identifier

Parameters

  [in] | instance | PDP Instance id
  [in] | dscp |
  [out] | qos_id |

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  See qmerrno.h for eQCWWAN_xxx error values

ULONG SLQSQosUnmap | ( | BYTE | instance,
|  | BYTE | dscp
| ) |  |

Remove Differential Service Code Point(DSCP) to QoS identifier association

Parameters

  [in] | instance | PDP Instance id
  [in] | dscp |

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  See qmerrno.h for eQCWWAN_xxx error values

ULONG SLQSSetLoggingMask | ( | BYTE | mask | ) |

Limit Syslog messages according to the Mask provided by user

Parameters

  mask | Mask 0x01: disable all log Mask 0xFF: enable all log

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: 5 seconds

ULONG SLQSStart | ( | BYTE | modem_index,
|  | CHAR * | usb_path
| ) |  |

Create the SDK process and IPC sockets for the Application and SDK processes to communicate over.

Parameters

  [in] | modem_index | 0: first modem detected 1: second modem detected 2: third modem detected ... 7: seventh modem detected
  [in] | usb_path | optional usb path for multi modem scenario when specified, the modem_index will mapping to usb_path e.g.: set usb_path to '2-2' to match modem at /sys/bus/usb/devices/2-2/ Please set to NULL when not used

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: N/A

ULONG SLQSStart_AVAgent | ( | BYTE | modem_index | ) |

Create IPC sockets for AirVantage Agent and SDK processes to communicate over

Parameters

  none |

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: N/A

ULONG SLQSStartSrv | ( | BYTE | action,
|  | BYTE | mask
| ) |  |

Registers/degisters for service with unsolicited notifications

Parameters

  action,1 | for register, 0 for deregister
  mask | Bit mask for unsolicited notifications Bit0 - WDS Bit1 - NAS Bit2 - PDS Bit3 - VOICE

Returns
  eQCWWAN_ERR_NONE on success, eQCWWAN_xxx error value otherwise

See Also
  see qmerrno.h for eQCWWAN_xxx error values

Note
  Timeout: 2 seconds API is useful to register for the servcies which supports unsolicited notifications. Registration/deregistration can be done by using parameter action if action is set then the mask (set bits) will be used for resistering service and if action is "0" mask(set bits) will be used to deregister servcies. For example : bit mask 0x03 - Registers for services WDS and NAS if action is "1" and deregisters WDS and NAS if action is "0".