le_mdc_interface.h File Reference

#include "legato.h"

Go to the source code of this file.

Data Structures

struct  le_mdc_ProfileInfo_t
 

Macros

#define LE_MDC_INTERFACE_NAME_MAX_LEN   20
 
#define LE_MDC_INTERFACE_NAME_MAX_BYTES   21
 
#define LE_MDC_IPV4_ADDR_MAX_LEN   15
 
#define LE_MDC_IPV4_ADDR_MAX_BYTES   16
 
#define LE_MDC_IPV6_ADDR_MAX_LEN   45
 
#define LE_MDC_IPV6_ADDR_MAX_BYTES   46
 
#define LE_MDC_APN_NAME_MAX_LEN   100
 
#define LE_MDC_APN_NAME_MAX_BYTES   101
 
#define LE_MDC_USER_NAME_MAX_LEN   64
 
#define LE_MDC_USER_NAME_MAX_BYTES   65
 
#define LE_MDC_PASSWORD_NAME_MAX_LEN   100
 
#define LE_MDC_PASSWORD_NAME_MAX_BYTES   101
 
#define LE_MDC_DEFAULT_PROFILE   -1
 
#define LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE   -2
 
#define LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE   7
 
#define LE_MDC_PROFILE_LIST_ENTRY_MAX   255
 
#define LE_MDC_PROFILE_LIST_ENTRY_NAMELEN_MAX   50
 

Typedefs

typedef void(* le_mdc_DisconnectHandler_t) (void *)
 
typedef struct le_mdc_Profile * le_mdc_ProfileRef_t
 
typedef struct le_mdc_SessionStateHandler * le_mdc_SessionStateHandlerRef_t
 
typedef struct le_mdc_MtPdpSessionStateHandler * le_mdc_MtPdpSessionStateHandlerRef_t
 
typedef void(* le_mdc_SessionStateHandlerFunc_t) (le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t ConnectionState, void *contextPtr)
 
typedef void(* le_mdc_MtPdpSessionStateHandlerFunc_t) (le_mdc_ConState_t ConnectionState, void *contextPtr)
 
typedef void(* le_mdc_SessionHandlerFunc_t) (le_mdc_ProfileRef_t profileRef, le_result_t result, void *contextPtr)
 

Enumerations

enum  le_mdc_DataBearerTechnology_t {
  LE_MDC_DATA_BEARER_TECHNOLOGY_UNKNOWN = 0, LE_MDC_DATA_BEARER_TECHNOLOGY_GSM = 1, LE_MDC_DATA_BEARER_TECHNOLOGY_GPRS = 2, LE_MDC_DATA_BEARER_TECHNOLOGY_EGPRS = 3,
  LE_MDC_DATA_BEARER_TECHNOLOGY_WCDMA = 4, LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA = 5, LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA_PLUS = 6, LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSPA_PLUS = 7,
  LE_MDC_DATA_BEARER_TECHNOLOGY_HSDPA = 8, LE_MDC_DATA_BEARER_TECHNOLOGY_HSUPA = 9, LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSUPA = 10, LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSPA = 11,
  LE_MDC_DATA_BEARER_TECHNOLOGY_LTE = 12, LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_FDD = 13, LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_TDD = 14, LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_CA_DL = 15,
  LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_CA_UL = 16, LE_MDC_DATA_BEARER_TECHNOLOGY_TD_SCDMA = 17, LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_1X = 18, LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO = 19,
  LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO_REVA = 20, LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EHRPD = 21, LE_MDC_DATA_BEARER_TECHNOLOGY_IS95_1X = 22, LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REV0_DPA = 23,
  LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVA_DPA = 24, LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_DPA = 25, LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVA_MPA = 26, LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_MPA = 27,
  LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVA_EMPA = 28, LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_EMPA = 29, LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_MMPA = 30, LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_EVDO_FMC = 31,
  LE_MDC_DATA_BEARER_TECHNOLOGY_64_QAM = 32, LE_MDC_DATA_BEARER_TECHNOLOGY_S2B = 33
}
 
enum  le_mdc_Pdp_t { LE_MDC_PDP_UNKNOWN = 0, LE_MDC_PDP_IPV4 = 1, LE_MDC_PDP_IPV6 = 2, LE_MDC_PDP_IPV4V6 = 3 }
 
enum  le_mdc_Auth_t { LE_MDC_AUTH_NONE = 0x1, LE_MDC_AUTH_PAP = 0x2, LE_MDC_AUTH_CHAP = 0x4 }
 
enum  le_mdc_ConState_t {
  LE_MDC_DISCONNECTED = 0, LE_MDC_AUTHENTICATING = 1, LE_MDC_CONNECTED = 2, LE_MDC_SUSPENDING = 3,
  LE_MDC_INCOMING = 4
}
 
enum  le_mdc_DisconnectionReason_t {
  LE_MDC_DISC_NO_SERVICE = 0, LE_MDC_DISC_OPERATOR_DETERMINED_BARRING = 1, LE_MDC_DISC_INSUFFICIENT_MBMS_CAPABILITIES = 2, LE_MDC_DISC_LLC_SNDCP_FAILURE = 3,
  LE_MDC_DISC_INSUFFICIENT_RESOURCES = 4, LE_MDC_DISC_MISSING_OR_UNKNOWN_APN = 5, LE_MDC_DISC_UNKNOWN_PDP_ADDR_OR_TYPE = 6, LE_MDC_DISC_USER_AUTHENTICATION_FAILURE = 7,
  LE_MDC_DISC_ACTIVATION_REJECTED_BY_GGSN_OR_GW = 8, LE_MDC_DISC_ACTIVATION_REJECTED_UNSPECIFIED = 9, LE_MDC_DISC_SERVICE_OPTION_NOT_SUPPORTED = 10, LE_MDC_DISC_REQUESTED_SERVICE_OPTION_UNSUBSCRIBED = 11,
  LE_MDC_DISC_REQUESTED_SERVICE_OPTION_OUT_OF_ORDER = 12, LE_MDC_DISC_NSAPI_ALREADY_USED = 13, LE_MDC_DISC_REGULAR_DEACTIVATION = 14, LE_MDC_DISC_QOS_NOT_ACCEPTED = 15,
  LE_MDC_DISC_NETWORK_FAILURE = 16, LE_MDC_DISC_REACTIVATION_REQUESTED = 17, LE_MDC_DISC_FEATURE_NOT_SUPPORTED = 18, LE_MDC_DISC_TFT_SEMANTIC_ERROR = 19,
  LE_MDC_DISC_TFT_SYNTACTICAL_ERROR = 20, LE_MDC_DISC_UNKNOWN_PDP_CONTEXT = 21, LE_MDC_DISC_PACKET_FILTER_SEMANTIC_ERROR = 22, LE_MDC_DISC_PACKET_FILTER_SYNTACTICAL_ERROR = 23,
  LE_MDC_DISC_PDP_CONTEXT_WITHOUT_ACTIVE_TFT = 24, LE_MDC_DISC_MULTICAST_TIME_OUT = 25, LE_MDC_DISC_BEARER_CONTROL_MODE_VIOLATION = 26, LE_MDC_DISC_IPV4_ONLY_ALLOWED = 27,
  LE_MDC_DISC_IPV6_ONLY_ALLOWED = 28, LE_MDC_DISC_SINGLE_ADDR_ONLY_ALLOWED = 29, LE_MDC_DISC_COLLISION_WITH_NETWORK_INITIATED_REQ = 30, LE_MDC_DISC_BEARER_HANDLING_UNSUPPORTED = 31,
  LE_MDC_DISC_MAX_PDP_CONTEXTS = 32, LE_MDC_DISC_APN_UNSUPPORTED_FOR_RAT_AND_PLMN = 33, LE_MDC_DISC_INCOMPATIBLE_APN = 34, LE_MDC_DISC_INVALID_TRANSACTION_ID = 35,
  LE_MDC_DISC_MESSAGE_INCORRECT_SEMANTIC = 36, LE_MDC_DISC_INVALID_MANDATORY_INFORMATION = 37, LE_MDC_DISC_UNSUPPORTED_MESSAGE_TYPE = 38, LE_MDC_DISC_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE = 39,
  LE_MDC_DISC_UNKNOWN_INFORMATION_ELEMENT = 40, LE_MDC_DISC_CONDITIONAL_IE_ERROR = 41, LE_MDC_DISC_MESSAGE_AND_STATE_UNCOMPATIBLE = 42, LE_MDC_DISC_PROTOCOL_ERROR_UNSPECIFIED = 43,
  LE_MDC_DISC_PLATFORM_SPECIFIC = 44, LE_MDC_DISC_UNDEFINED = 45
}
 

Functions

void le_mdc_ConnectService (void)
 
le_result_t le_mdc_TryConnectService (void)
 
void le_mdc_SetServerDisconnectHandler (le_mdc_DisconnectHandler_t disconnectHandler, void *contextPtr)
 
void le_mdc_DisconnectService (void)
 
le_mdc_SessionStateHandlerRef_t le_mdc_AddSessionStateHandler (le_mdc_ProfileRef_t profileRef, le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_mdc_RemoveSessionStateHandler (le_mdc_SessionStateHandlerRef_t handlerRef)
 
le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler (le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_mdc_RemoveMtPdpSessionStateHandler (le_mdc_MtPdpSessionStateHandlerRef_t handlerRef)
 
le_mdc_ProfileRef_t le_mdc_GetProfile (uint32_t index)
 
uint32_t le_mdc_GetProfileIndex (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_StartSession (le_mdc_ProfileRef_t profileRef)
 
void le_mdc_StartSessionAsync (le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)
 
le_result_t le_mdc_StopSession (le_mdc_ProfileRef_t profileRef)
 
void le_mdc_StopSessionAsync (le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)
 
le_result_t le_mdc_RejectMtPdpSession (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_GetSessionState (le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t *connectionStatePtr)
 
le_result_t le_mdc_GetInterfaceName (le_mdc_ProfileRef_t profileRef, char *interfaceName, size_t interfaceNameSize)
 
le_result_t le_mdc_GetIPv4Address (le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)
 
le_result_t le_mdc_GetIPv4GatewayAddress (le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)
 
le_result_t le_mdc_GetIPv4DNSAddresses (le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)
 
le_result_t le_mdc_GetIPv6Address (le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)
 
le_result_t le_mdc_GetIPv6GatewayAddress (le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)
 
le_result_t le_mdc_GetIPv6DNSAddresses (le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)
 
bool le_mdc_IsIPv4 (le_mdc_ProfileRef_t profileRef)
 
bool le_mdc_IsIPv6 (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_GetDataBearerTechnology (le_mdc_ProfileRef_t profileRef, le_mdc_DataBearerTechnology_t *downlinkDataBearerTechPtrPtr, le_mdc_DataBearerTechnology_t *uplinkDataBearerTechPtrPtr)
 
le_result_t le_mdc_GetBytesCounters (uint64_t *rxBytesPtr, uint64_t *txBytesPtr)
 
le_result_t le_mdc_ResetBytesCounter (void)
 
le_result_t le_mdc_StopBytesCounter (void)
 
le_result_t le_mdc_StartBytesCounter (void)
 
le_result_t le_mdc_SetPDP (le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdp)
 
le_mdc_Pdp_t le_mdc_GetPDP (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_SetAPN (le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL apnStr)
 
le_result_t le_mdc_SetDefaultAPN (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_GetAPN (le_mdc_ProfileRef_t profileRef, char *apnStr, size_t apnStrSize)
 
le_result_t le_mdc_SetAuthentication (le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t type, const char *LE_NONNULL userName, const char *LE_NONNULL password)
 
le_result_t le_mdc_GetAuthentication (le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t *typePtr, char *userName, size_t userNameSize, char *password, size_t passwordSize)
 
uint32_t le_mdc_NumProfiles (void)
 
le_result_t le_mdc_GetProfileFromApn (const char *LE_NONNULL apnStr, le_mdc_ProfileRef_t *profileRefPtr)
 
le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReason (le_mdc_ProfileRef_t profileRef)
 
int32_t le_mdc_GetPlatformSpecificDisconnectionCode (le_mdc_ProfileRef_t profileRef)
 
void le_mdc_GetPlatformSpecificFailureConnectionReason (le_mdc_ProfileRef_t profileRef, int32_t *failureTypePtr, int32_t *failureCodePtr)
 
le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReasonExt (le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType)
 
int32_t le_mdc_GetPlatformSpecificDisconnectionCodeExt (le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType)
 
void le_mdc_GetPlatformSpecificFailureConnectionReasonExt (le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType, int32_t *failureTypePtr, int32_t *failureCodePtr)
 
le_result_t le_mdc_MapProfileOnNetworkInterface (le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL interfaceName)
 
le_result_t le_mdc_GetProfileList (le_mdc_ProfileInfo_t *profileListPtr, size_t *profileListSizePtr)
 

Detailed Description

Legato Modem Data Control include file.

Macro Definition Documentation

◆ LE_MDC_APN_NAME_MAX_BYTES

#define LE_MDC_APN_NAME_MAX_BYTES   101

Maximum number of bytes in a apn name (including the null-terminator).

◆ LE_MDC_APN_NAME_MAX_LEN

#define LE_MDC_APN_NAME_MAX_LEN   100

Maximum number of bytes in a apn name (not including the null-terminator).

◆ LE_MDC_DEFAULT_PROFILE

#define LE_MDC_DEFAULT_PROFILE   -1

Default profile definition.

◆ LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE

#define LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE   7
Deprecated:
LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE is deprecated. LE_MDC_DISC_USER_AUTHENTICATION_FAILURE should be used instead.

◆ LE_MDC_INTERFACE_NAME_MAX_BYTES

#define LE_MDC_INTERFACE_NAME_MAX_BYTES   21

Maximum number of bytes in a profile name (including the null-terminator).

◆ LE_MDC_INTERFACE_NAME_MAX_LEN

#define LE_MDC_INTERFACE_NAME_MAX_LEN   20

Maximum number of bytes in a interface name (not including the null-terminator).

◆ LE_MDC_IPV4_ADDR_MAX_BYTES

#define LE_MDC_IPV4_ADDR_MAX_BYTES   16

Maximum number of bytes in an IPv4 address (including the null-terminator).

◆ LE_MDC_IPV4_ADDR_MAX_LEN

#define LE_MDC_IPV4_ADDR_MAX_LEN   15

Maximum number of bytes in an IPv4 address (not including the null-terminator).

◆ LE_MDC_IPV6_ADDR_MAX_BYTES

#define LE_MDC_IPV6_ADDR_MAX_BYTES   46

Maximum number of bytes in an IPv6 address (including the null-terminator).

◆ LE_MDC_IPV6_ADDR_MAX_LEN

#define LE_MDC_IPV6_ADDR_MAX_LEN   45

Maximum number of bytes in an IPv6 address (not including the null-terminator).

◆ LE_MDC_PASSWORD_NAME_MAX_BYTES

#define LE_MDC_PASSWORD_NAME_MAX_BYTES   101

Maximum number of bytes in a password name (including the null-terminator).

◆ LE_MDC_PASSWORD_NAME_MAX_LEN

#define LE_MDC_PASSWORD_NAME_MAX_LEN   100

Maximum number of bytes in a password name (not including the null-terminator).

◆ LE_MDC_PROFILE_LIST_ENTRY_MAX

#define LE_MDC_PROFILE_LIST_ENTRY_MAX   255

Define the max # of entries in a profile list.

◆ LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE

#define LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE   -2

Default profile definition for Bearer Independent Protocol (BIP).

◆ LE_MDC_USER_NAME_MAX_BYTES

#define LE_MDC_USER_NAME_MAX_BYTES   65

Maximum number of bytes in a user name (including the null-terminator).

◆ LE_MDC_USER_NAME_MAX_LEN

#define LE_MDC_USER_NAME_MAX_LEN   64

Maximum number of bytes in a user name (not including the null-terminator).

Typedef Documentation

◆ le_mdc_DisconnectHandler_t

typedef void(* le_mdc_DisconnectHandler_t) (void *)

Type for handler called when a server disconnects.

◆ le_mdc_MtPdpSessionStateHandlerFunc_t

typedef void(* le_mdc_MtPdpSessionStateHandlerFunc_t) (le_mdc_ConState_t ConnectionState, void *contextPtr)

Handler for MT-PDP Data session connection state changes.

◆ le_mdc_MtPdpSessionStateHandlerRef_t

typedef struct le_mdc_MtPdpSessionStateHandler* le_mdc_MtPdpSessionStateHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_mdc_MtPdpSessionState'

◆ le_mdc_ProfileRef_t

typedef struct le_mdc_Profile* le_mdc_ProfileRef_t

Reference to a modem data connection profile.

◆ le_mdc_SessionHandlerFunc_t

typedef void(* le_mdc_SessionHandlerFunc_t) (le_mdc_ProfileRef_t profileRef, le_result_t result, void *contextPtr)

Handler for asynchronous session start and stop result response

◆ le_mdc_SessionStateHandlerFunc_t

typedef void(* le_mdc_SessionStateHandlerFunc_t) (le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t ConnectionState, void *contextPtr)

Handler for Data session connection state changes.

◆ le_mdc_SessionStateHandlerRef_t

typedef struct le_mdc_SessionStateHandler* le_mdc_SessionStateHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_mdc_SessionState'

Enumeration Type Documentation

◆ le_mdc_Auth_t

Authentication bit mask.

Enumerator
LE_MDC_AUTH_NONE 

no authentication

LE_MDC_AUTH_PAP 

PAP protocol.

LE_MDC_AUTH_CHAP 

CHAP protocol.

◆ le_mdc_ConState_t

Enumeration of connection state.

Enumerator
LE_MDC_DISCONNECTED 

Data session is disconnected.

LE_MDC_AUTHENTICATING 

Authenticating data session.

LE_MDC_CONNECTED 

Data session is connected.

LE_MDC_SUSPENDING 

Suspending data session.

LE_MDC_INCOMING 

Incoming data session (MT-PDP context request)

◆ le_mdc_DataBearerTechnology_t

Enumeration of data bearer technologies.

Enumerator
LE_MDC_DATA_BEARER_TECHNOLOGY_UNKNOWN 

Unknown.

LE_MDC_DATA_BEARER_TECHNOLOGY_GSM 

GSM.

LE_MDC_DATA_BEARER_TECHNOLOGY_GPRS 

GPRS.

LE_MDC_DATA_BEARER_TECHNOLOGY_EGPRS 

Enhanced GPRS (EDGE)

LE_MDC_DATA_BEARER_TECHNOLOGY_WCDMA 

WCDMA (UMTS)

LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA 

HSPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA_PLUS 

HSPA+.

LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSPA_PLUS 

Dual Cell - HSPA+.

LE_MDC_DATA_BEARER_TECHNOLOGY_HSDPA 

HSDPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HSUPA 

HSUPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSUPA 

Dual Cell - HSUPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSPA 

Dual Cell - HSPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_LTE 

LTE.

LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_FDD 

LTE FDD.

LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_TDD 

LTE TDD.

LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_CA_DL 

LTE CA DL.

LE_MDC_DATA_BEARER_TECHNOLOGY_LTE_CA_UL 

LTE CA UL.

LE_MDC_DATA_BEARER_TECHNOLOGY_TD_SCDMA 

TD-SCDMA.

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_1X 

CDMA2000 1X.

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO 

CDMA2000 HRPD (1xEV-DO)

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO_REVA 

CDMA2000 HRPD (1xEV-DO RevA)

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EHRPD 

CDMA2000 EHRPD.

LE_MDC_DATA_BEARER_TECHNOLOGY_IS95_1X 

IS95 1X.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REV0_DPA 

HDR REV0 DPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVA_DPA 

HDR REVA DPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_DPA 

HDR REVB DPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVA_MPA 

HDR REVA MPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_MPA 

HDR REVB MPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVA_EMPA 

HDR REVA EMPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_EMPA 

HDR REVB EMPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_REVB_MMPA 

HDR REVB MMPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HDR_EVDO_FMC 

HDR EVDO FMC.

LE_MDC_DATA_BEARER_TECHNOLOGY_64_QAM 

64 QAM

LE_MDC_DATA_BEARER_TECHNOLOGY_S2B 

S2B.

◆ le_mdc_DisconnectionReason_t

Enumeration of the possible reasons for the disconnection.

Enumerator
LE_MDC_DISC_NO_SERVICE 

Modem has no service.

LE_MDC_DISC_OPERATOR_DETERMINED_BARRING 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INSUFFICIENT_MBMS_CAPABILITIES 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_LLC_SNDCP_FAILURE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INSUFFICIENT_RESOURCES 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_MISSING_OR_UNKNOWN_APN 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_UNKNOWN_PDP_ADDR_OR_TYPE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_USER_AUTHENTICATION_FAILURE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_ACTIVATION_REJECTED_BY_GGSN_OR_GW 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_ACTIVATION_REJECTED_UNSPECIFIED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_SERVICE_OPTION_NOT_SUPPORTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REQUESTED_SERVICE_OPTION_UNSUBSCRIBED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REQUESTED_SERVICE_OPTION_OUT_OF_ORDER 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_NSAPI_ALREADY_USED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REGULAR_DEACTIVATION 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_QOS_NOT_ACCEPTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_NETWORK_FAILURE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REACTIVATION_REQUESTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_FEATURE_NOT_SUPPORTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_TFT_SEMANTIC_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_TFT_SYNTACTICAL_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_UNKNOWN_PDP_CONTEXT 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_PACKET_FILTER_SEMANTIC_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_PACKET_FILTER_SYNTACTICAL_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_PDP_CONTEXT_WITHOUT_ACTIVE_TFT 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_MULTICAST_TIME_OUT 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_BEARER_CONTROL_MODE_VIOLATION 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_IPV4_ONLY_ALLOWED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_IPV6_ONLY_ALLOWED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_SINGLE_ADDR_ONLY_ALLOWED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_COLLISION_WITH_NETWORK_INITIATED_REQ 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_BEARER_HANDLING_UNSUPPORTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_MAX_PDP_CONTEXTS 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_APN_UNSUPPORTED_FOR_RAT_AND_PLMN 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INCOMPATIBLE_APN 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INVALID_TRANSACTION_ID 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_MESSAGE_INCORRECT_SEMANTIC 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_INVALID_MANDATORY_INFORMATION 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_UNSUPPORTED_MESSAGE_TYPE 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_UNKNOWN_INFORMATION_ELEMENT 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_CONDITIONAL_IE_ERROR 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_MESSAGE_AND_STATE_UNCOMPATIBLE 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_PROTOCOL_ERROR_UNSPECIFIED 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_PLATFORM_SPECIFIC 

Platform specific code.

LE_MDC_DISC_UNDEFINED 

Undefined reason.

◆ le_mdc_Pdp_t

Enumeration of Packet Data Protocol.

Enumerator
LE_MDC_PDP_UNKNOWN 

Unknown.

LE_MDC_PDP_IPV4 

IPv4.

LE_MDC_PDP_IPV6 

IPv6.

LE_MDC_PDP_IPV4V6 

IPv4 and IPv6.

Function Documentation

◆ le_mdc_AddMtPdpSessionStateHandler()

le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler ( le_mdc_SessionStateHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_mdc_MtPdpSessionState'

This event provides information on data session connection state changes for the given profileRef.

Parameters
[in]handlerPtr
[in]contextPtr

◆ le_mdc_AddSessionStateHandler()

le_mdc_SessionStateHandlerRef_t le_mdc_AddSessionStateHandler ( le_mdc_ProfileRef_t  profileRef,
le_mdc_SessionStateHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_mdc_SessionState'

This event provides information on data session connection state changes for the given profileRef.

Parameters
[in]profileRefThe profile object of interest
[in]handlerPtr
[in]contextPtr

◆ le_mdc_ConnectService()

void le_mdc_ConnectService ( void  )

Connect the current client thread to the service providing this API. Block until the service is available.

For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.

This function is created automatically.

◆ le_mdc_DisconnectService()

void le_mdc_DisconnectService ( void  )

Disconnect the current client thread from the service providing this API.

Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.

This function is created automatically.

◆ le_mdc_GetAPN()

le_result_t le_mdc_GetAPN ( le_mdc_ProfileRef_t  profileRef,
char *  apnStr,
size_t  apnStrSize 
)

Get the Access Point Name (APN) for the given profile.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_OVERFLOW if the APN is is too long
  • LE_FAULT on failed
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]apnStrThe Access Point Name
[in]apnStrSize

◆ le_mdc_GetAuthentication()

le_result_t le_mdc_GetAuthentication ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Auth_t typePtr,
char *  userName,
size_t  userNameSize,
char *  password,
size_t  passwordSize 
)

Get authentication property

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_OVERFLOW userName or password are too small
  • LE_FAULT on failed
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]typePtrAuthentication type
[out]userNameUserName used by authentication
[in]userNameSize
[out]passwordPassword used by authentication
[in]passwordSize

◆ le_mdc_GetBytesCounters()

le_result_t le_mdc_GetBytesCounters ( uint64_t *  rxBytesPtr,
uint64_t *  txBytesPtr 
)

Get number of bytes received/transmitted without error since the last reset.

Returns
  • LE_OK on success
  • LE_FAULT for all other errors
Note
  • The process exits, if an invalid pointer is given
Parameters
[out]rxBytesPtrbytes amount received since the last counter reset
[out]txBytesPtrbytes amount transmitted since the last counter reset

◆ le_mdc_GetDataBearerTechnology()

le_result_t le_mdc_GetDataBearerTechnology ( le_mdc_ProfileRef_t  profileRef,
le_mdc_DataBearerTechnology_t downlinkDataBearerTechPtrPtr,
le_mdc_DataBearerTechnology_t uplinkDataBearerTechPtrPtr 
)

Get the Data Bearer Technology for the given profile, if the data session is connected.

Returns
  • LE_OK on success
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]downlinkDataBearerTechPtrPtrdownlink data bearer technology
[out]uplinkDataBearerTechPtrPtruplink data bearer technology

◆ le_mdc_GetDisconnectionReason()

le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReason ( le_mdc_ProfileRef_t  profileRef)

Called to get the disconnection reason.

Returns
The disconnection reason.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Deprecated:
This function is deprecated, le_mdc_GetDisconnectionReasonExt should be used for the new code.
Parameters
[in]profileRefprofile reference

◆ le_mdc_GetDisconnectionReasonExt()

le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReasonExt ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Pdp_t  pdpType 
)

Called to get the disconnection reason.

Returns
The disconnection reason.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv6 session). For IPv4 and IPv6 mode, pdpType is ignored because there is only one session for IPv4 and IPv6 mode.
Parameters
[in]profileRefprofile reference
[in]pdpTypepdp type of session

◆ le_mdc_GetInterfaceName()

le_result_t le_mdc_GetInterfaceName ( le_mdc_ProfileRef_t  profileRef,
char *  interfaceName,
size_t  interfaceNameSize 
)

Get the network interface name, if the data session is connected.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the interface name would not fit in interfaceNameStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]interfaceNameThe name of the network interface
[in]interfaceNameSize

◆ le_mdc_GetIPv4Address()

le_result_t le_mdc_GetIPv4Address ( le_mdc_ProfileRef_t  profileRef,
char *  ipAddr,
size_t  ipAddrSize 
)

Get the IPv4 address for the given profile, if the data session is connected and has an IPv4 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in ipAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]ipAddrThe IP address in dotted format
[in]ipAddrSize

◆ le_mdc_GetIPv4DNSAddresses()

le_result_t le_mdc_GetIPv4DNSAddresses ( le_mdc_ProfileRef_t  profileRef,
char *  dns1AddrStr,
size_t  dns1AddrStrSize,
char *  dns2AddrStr,
size_t  dns2AddrStrSize 
)

Get the primary/secondary DNS v4 addresses for the given profile, if the data session is connected and has an IPv4 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in buffer
  • LE_FAULT for all other errors
Note
  • If only one DNS address is available, then it will be returned, and an empty string will be returned for the unavailable address
  • The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]dns1AddrStrThe primary DNS IP address in dotted format
[in]dns1AddrStrSize
[out]dns2AddrStrThe secondary DNS IP address in dotted format
[in]dns2AddrStrSize

◆ le_mdc_GetIPv4GatewayAddress()

le_result_t le_mdc_GetIPv4GatewayAddress ( le_mdc_ProfileRef_t  profileRef,
char *  gatewayAddr,
size_t  gatewayAddrSize 
)

Get the gateway IPv4 address for the given profile, if the data session is connected and has an IPv4 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]gatewayAddrThe gateway IP address in dotted format
[in]gatewayAddrSize

◆ le_mdc_GetIPv6Address()

le_result_t le_mdc_GetIPv6Address ( le_mdc_ProfileRef_t  profileRef,
char *  ipAddr,
size_t  ipAddrSize 
)

Get the IPv6 address for the given profile, if the data session is connected and has an IPv6 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in ipAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]ipAddrThe IP address in dotted format
[in]ipAddrSize

◆ le_mdc_GetIPv6DNSAddresses()

le_result_t le_mdc_GetIPv6DNSAddresses ( le_mdc_ProfileRef_t  profileRef,
char *  dns1AddrStr,
size_t  dns1AddrStrSize,
char *  dns2AddrStr,
size_t  dns2AddrStrSize 
)

Get the primary/secondary DNS v6 addresses, if the data session is connected and has an IPv6 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address can't fit in buffer
  • LE_FAULT for all other errors
Note
  • If only one DNS address is available, it will be returned, and an empty string will be returned for the unavailable address.
  • The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]dns1AddrStrThe primary DNS IP address in dotted format
[in]dns1AddrStrSize
[out]dns2AddrStrThe secondary DNS IP address in dotted format
[in]dns2AddrStrSize

◆ le_mdc_GetIPv6GatewayAddress()

le_result_t le_mdc_GetIPv6GatewayAddress ( le_mdc_ProfileRef_t  profileRef,
char *  gatewayAddr,
size_t  gatewayAddrSize 
)

Get the gateway IPv6 address for the given profile, if the data session is connected and has an IPv6 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]gatewayAddrThe gateway IP address in dotted format
[in]gatewayAddrSize

◆ le_mdc_GetPDP()

le_mdc_Pdp_t le_mdc_GetPDP ( le_mdc_ProfileRef_t  profileRef)

Get the Packet Data Protocol (PDP) for the given profile.

Returns
  • packet data protocol value
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object

◆ le_mdc_GetPlatformSpecificDisconnectionCode()

int32_t le_mdc_GetPlatformSpecificDisconnectionCode ( le_mdc_ProfileRef_t  profileRef)

Called to get the platform specific disconnection code.

Refer to Platform specific error codes for platform specific disconnection code description.

Returns
The platform specific disconnection code.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Deprecated:
This function is deprecated, le_mdc_GetPlatformSpecificDisconnectionCodeExt should be used for the new code.
Parameters
[in]profileRefprofile reference

◆ le_mdc_GetPlatformSpecificDisconnectionCodeExt()

int32_t le_mdc_GetPlatformSpecificDisconnectionCodeExt ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Pdp_t  pdpType 
)

Called to get the platform specific disconnection code.

Refer to Platform specific error codes for platform specific disconnection code description.

Returns
The platform specific disconnection code.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv6 session). For IPv4 and IPv6 mode, pdpType is ignored because there is only one session for IPv4 and IPv6 mode.
Parameters
[in]profileRefprofile reference
[in]pdpTypepdp type of session

◆ le_mdc_GetPlatformSpecificFailureConnectionReason()

void le_mdc_GetPlatformSpecificFailureConnectionReason ( le_mdc_ProfileRef_t  profileRef,
int32_t *  failureTypePtr,
int32_t *  failureCodePtr 
)

Called to get the platform specific connection failure reason.

Refer to Platform specific error codes for platform specific connection failure types and code descriptions.

Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Deprecated:
This function is deprecated, le_mdc_GetPlatformSpecificFailureConnectionReasonExt should be used for new code.
Parameters
[in]profileRefprofile reference
[out]failureTypePtrplatform specific failure type
[out]failureCodePtrplatform specific failure code

◆ le_mdc_GetPlatformSpecificFailureConnectionReasonExt()

void le_mdc_GetPlatformSpecificFailureConnectionReasonExt ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Pdp_t  pdpType,
int32_t *  failureTypePtr,
int32_t *  failureCodePtr 
)

Called to get the platform specific connection failure reason.

Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv6 session). For IPv4 and IPv6 mode, pdpType is ignored because there is only one session for IPv4 and IPv6 mode.
Parameters
[in]profileRefprofile reference
[in]pdpTypepdp type of session
[out]failureTypePtrplatform specific failure type
[out]failureCodePtrplatform specific failure code

◆ le_mdc_GetProfile()

le_mdc_ProfileRef_t le_mdc_GetProfile ( uint32_t  index)

Get Profile Reference for index

Note
Create a new profile if the profile's index can't be found.
Warning
0 is not a valid index.
Ensure to check the list of supported data profiles for your specific platform.
Returns
  • Reference to the data profile
  • NULL if the profile index does not exist
Parameters
[in]indexindex of the profile.

◆ le_mdc_GetProfileFromApn()

le_result_t le_mdc_GetProfileFromApn ( const char *LE_NONNULL  apnStr,
le_mdc_ProfileRef_t profileRefPtr 
)

Get a profile selected by its APN

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_NOT_FOUND if the requested APN is not found
Parameters
[in]apnStrThe Access Point Name
[out]profileRefPtrprofile reference

◆ le_mdc_GetProfileIndex()

uint32_t le_mdc_GetProfileIndex ( le_mdc_ProfileRef_t  profileRef)

Get the index for the given Profile.

Returns
  • index of the profile in the modem
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object

◆ le_mdc_GetProfileList()

le_result_t le_mdc_GetProfileList ( le_mdc_ProfileInfo_t profileListPtr,
size_t *  profileListSizePtr 
)

Get the list of available profiles

Returns
  • list of available profiles
  • LE_OK if the retrieval is successful; otherwise, some error code
Parameters
[out]profileListPtrlist of available profiles
[in,out]profileListSizePtr

◆ le_mdc_GetSessionState()

le_result_t le_mdc_GetSessionState ( le_mdc_ProfileRef_t  profileRef,
le_mdc_ConState_t connectionStatePtr 
)

Get the current data session state.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_FAULT on failure
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]connectionStatePtrThe data session state

◆ le_mdc_IsIPv4()

bool le_mdc_IsIPv4 ( le_mdc_ProfileRef_t  profileRef)

Allow the caller to know if the given profile is actually supporting IPv4, if the data session is connected.

Returns
TRUE if PDP type is IPv4, FALSE otherwise.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefQuery this profile object

◆ le_mdc_IsIPv6()

bool le_mdc_IsIPv6 ( le_mdc_ProfileRef_t  profileRef)

Allow the caller to know if the given profile is actually supporting IPv6, if the data session is connected.

Returns
TRUE if PDP type is IPv6, FALSE otherwise.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefQuery this profile object

◆ le_mdc_MapProfileOnNetworkInterface()

le_result_t le_mdc_MapProfileOnNetworkInterface ( le_mdc_ProfileRef_t  profileRef,
const char *LE_NONNULL  interfaceName 
)

Map a profile on a network interface

  • Returns
    • LE_OK on success
    • LE_UNSUPPORTED if not supported by the target
    • LE_FAULT for all other errors
Parameters
[in]profileRefProfile reference
[in]interfaceNameNetwork interface name

◆ le_mdc_NumProfiles()

uint32_t le_mdc_NumProfiles ( void  )

Get the number of profiles on the modem.

Returns
  • number of profiles existing on modem

◆ le_mdc_RejectMtPdpSession()

le_result_t le_mdc_RejectMtPdpSession ( le_mdc_ProfileRef_t  profileRef)

Reject MT-PDP profile data session.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if the input parameter is not valid
  • LE_UNSUPPORTED if not supported by the target
  • LE_FAULT for other failures
Note
The process exits, if an invalid profile object is given
Warning
The MT-PDP context activation feature is not supported on all platforms. Please refer to Mobile Terminated PDP context section for full details.
Parameters
[in]profileRefReject MT-PDP data session for this profile object

◆ le_mdc_RemoveMtPdpSessionStateHandler()

void le_mdc_RemoveMtPdpSessionStateHandler ( le_mdc_MtPdpSessionStateHandlerRef_t  handlerRef)

Remove handler function for EVENT 'le_mdc_MtPdpSessionState'

Parameters
[in]handlerRef

◆ le_mdc_RemoveSessionStateHandler()

void le_mdc_RemoveSessionStateHandler ( le_mdc_SessionStateHandlerRef_t  handlerRef)

Remove handler function for EVENT 'le_mdc_SessionState'

Parameters
[in]handlerRef

◆ le_mdc_ResetBytesCounter()

le_result_t le_mdc_ResetBytesCounter ( void  )

Reset received/transmitted data flow statistics

Returns
  • LE_OK on success
  • LE_FAULT for all other errors

◆ le_mdc_SetAPN()

le_result_t le_mdc_SetAPN ( le_mdc_ProfileRef_t  profileRef,
const char *LE_NONNULL  apnStr 
)

Set the Access Point Name (APN) for the given profile.

The APN must be an ASCII string.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_FAULT if the data session is currently connected for the given profile
Note
If APN is too long (max APN_NAME_MAX_LEN digits), it is a fatal error, the function will not return.
Warning
The maximum APN length might be limited by the platform. Please refer to the platform documentation Modem Control platform constraints.
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[in]apnStrThe Access Point Name

◆ le_mdc_SetAuthentication()

le_result_t le_mdc_SetAuthentication ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Auth_t  type,
const char *LE_NONNULL  userName,
const char *LE_NONNULL  password 
)

Set authentication property

Returns
  • LE_OK on success
Note
  • The process exits, if userName or password are NULL when type is not PA_MDC_AUTH_NONE
  • The process exits, if an invalid profile object is given
If userName is too long (max USER_NAME_MAX_LEN digits), it is a fatal error, the function will not return.
If password is too long (max PASSWORD_NAME_MAX_LEN digits), it is a fatal error, the function will not return.
Both PAP and CHAP authentication can be set for 3GPP network: in this case, the device decides which authentication procedure is performed. For example, the device can have a policy to select the most secure authentication mechanism.
Parameters
[in]profileRefQuery this profile object
[in]typeAuthentication type
[in]userNameUserName used by authentication
[in]passwordPassword used by authentication

◆ le_mdc_SetDefaultAPN()

le_result_t le_mdc_SetDefaultAPN ( le_mdc_ProfileRef_t  profileRef)

Set the Access Point Name (APN) for the given profile according to the SIM identification number (ICCID). If no APN is found using the ICCID, fall back on the home network (MCC/MNC) to determine the default APN.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_FAULT for all other errors
Note
The process exits if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object

◆ le_mdc_SetPDP()

le_result_t le_mdc_SetPDP ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Pdp_t  pdp 
)

Set the Packet Data Protocol (PDP) for the given profile.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if the PDP is not supported
  • LE_FAULT if the data session is currently connected for the given profile
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[in]pdpThe Packet Data Protocol

◆ le_mdc_SetServerDisconnectHandler()

void le_mdc_SetServerDisconnectHandler ( le_mdc_DisconnectHandler_t  disconnectHandler,
void *  contextPtr 
)

Set handler called when server disconnection is detected.

When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.

◆ le_mdc_StartBytesCounter()

le_result_t le_mdc_StartBytesCounter ( void  )

Start collecting received/transmitted data flow statistics

Returns
  • LE_OK on success
  • LE_FAULT for all other errors

◆ le_mdc_StartSession()

le_result_t le_mdc_StartSession ( le_mdc_ProfileRef_t  profileRef)

Start profile data session.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if input parameter is incorrect
  • LE_DUPLICATE if the data session is already connected for the given profile
  • LE_FAULT for other failures
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefStart data session for this profile object

◆ le_mdc_StartSessionAsync()

void le_mdc_StartSessionAsync ( le_mdc_ProfileRef_t  profileRef,
le_mdc_SessionHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Start profile data session.

Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefStart data session for this profile object
[in]handlerPtrHandler for start data session result
[in]contextPtr

◆ le_mdc_StopBytesCounter()

le_result_t le_mdc_StopBytesCounter ( void  )

Stop collecting received/transmitted data flow statistics

Returns
  • LE_OK on success
  • LE_FAULT for all other errors

◆ le_mdc_StopSession()

le_result_t le_mdc_StopSession ( le_mdc_ProfileRef_t  profileRef)

Stop profile data session.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if the input parameter is not valid
  • LE_FAULT for other failures
Note
The process exits, if an invalid profile object is given
Warning
The MT-PDP context activation feature is not supported on all platforms. Please refer to Mobile Terminated PDP context section for full details.
Parameters
[in]profileRefStop data session for this profile object

◆ le_mdc_StopSessionAsync()

void le_mdc_StopSessionAsync ( le_mdc_ProfileRef_t  profileRef,
le_mdc_SessionHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Stop profile data session.

Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefStop data session for this profile object
[in]handlerPtrHandler for stop data session result
[in]contextPtr

◆ le_mdc_TryConnectService()

le_result_t le_mdc_TryConnectService ( void  )

Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.

For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.

This function is created automatically.

Returns
  • LE_OK if the client connected successfully to the service.
  • LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
  • LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
  • LE_COMM_ERROR if the Service Directory cannot be reached.