Modem Data Control API

Click here for the API Reference documentation.


Data Profiles
Data Sessions
Data Statistics
Data configuration tree

A data session is useful for applications that need to send or receive data over a network where SMS messages are insufficient. To start a data session, a data profile must be configured as specified by the target network.

The Modem Data Control (mdc) API is used to manage data profiles and data sessions.

Data Profiles

If a pre-defined data profile has been configured then this profile can be loaded using le_mdc_LoadProfile. le_mdc_LoadProfile will try to read the data profile configuration from the configuration tree. If one data profile is currently in use and one of its parameters changes in the configuration tree, the new value will be loaded automatically. The maximum number of data profiles supported is modem dependent.

The following data profile parameters can be retrieved:

Data Sessions

A data session can be started using le_mdc_StartSession. To start a data session, a data profile must be created and written to the modem, or an existing data profile can be used. A data session can be stopped using le_mdc_StopSession. The number of simultaneous data sessions supported is dependent on the modem, but cannot be more than the maximum number of supported profiles.

The current state of a data session can be queried using le_mdc_GetSessionState. An application can also a register handler to be notified when the session state changes. The handler can be managed using le_mdc_AddSessionStateHandler and le_mdc_RemoveSessionStateHandler.

Once a data session starts, a Linux network interface is created. It's the application's responsibility to configure the network interface, usually through a DHCP client. Query the interface name using le_mdc_GetInterfaceName. The IP address for the current data session can be retreived by le_mdc_GetIPAddress. The Gateway and DNS addresses can be retrieved using le_mdc_GetGatewayAddress and le_mdc_GetDNSAddresses. The Access Point Name can be retrieved by le_mdc_GetAccessPointName. The Data bearer Technology can be retreived by le_mdc_GetDataBearerTechnology.

Data Statistics

Data bytes received/transmitted can be access through le_mdc_GetBytesCounters. These values correspond to the number of bytes received/transmitted since the last software reset or the last le_mdc_ResetBytesCounter called. Making these value persistent after a software reboot is the client responsibility.

Data configuration tree

The configuration database path for the Modem Data Control is:

   /
       modemServices/
           modemDataConnection/
               <ProfileName_1>/
                   accessPointName<string> == <ADDR>
                   packetDataProtocol<string> == <PDP_TYPE>
                   authentication/
                       pap/
                           enable<bool> == <true/false>
                           userName<string> == <USERNAME>
                           password<string> == <PWD>
                       chap/
                           enable<bool> == <true/false>
                           userName<string> == <USERNAME>
                           password<string> == <PWD>

               <ProfileName_2>/
                   accessPointName<string> == <ADDR>
               ...
               <ProfileName_5>/
                   accessPointName<string> == <ADDR>
  
  • 'ADDR' is an address like xxx.xxx.xxx.xxx .
  • 'USERNAME' is the name used for authentication
  • 'PWD' is the password used for authentication
  • 'PDP_TYPE' is the protocol:
    • IPV4
    • IPV6

If //modemServices/modemDataConnection/<ProfileName>/packetDataProtocol is omitted, IPV4 will be the default protocol.

Note:
PAP and CHAP authentication are not usable at the same time, the first authentication enabled found in the configDB will be used.

Copyright (C) Sierra Wireless, Inc. 2013. All rights reserved. Use of this work is subject to license.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines