le_mdc API Reference
Data Structures | |
struct | le_mdc_ProfileInfo_t |
Files | |
file | le_mdc_common.h |
file | le_mdc_interface.h |
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_PROFILE_LIST_ENTRY_MAX 36 |
#define | LE_MDC_PROFILE_LIST_ENTRY_NAMELEN_MAX 50 |
#define | LE_MDC_MAX_PDP_CID_INDEX 36 |
#define | LE_MDC_AUTH_NONE 0x1 |
#define | LE_MDC_AUTH_PAP 0x2 |
#define | LE_MDC_AUTH_CHAP 0x4 |
Typedefs | |
typedef struct le_mdc_Profile * | le_mdc_ProfileRef_t |
typedef uint32_t | le_mdc_Auth_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) |
typedef void(* | le_mdc_DisconnectHandler_t) (void *) |
Detailed Description
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_AUTH_NONE
#define LE_MDC_AUTH_NONE 0x1 |
Authentication bit mask.
◆ LE_MDC_DEFAULT_PROFILE
#define LE_MDC_DEFAULT_PROFILE -1 |
Default profile definition.
◆ 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 36 |
Define the max # of entries in a cellular profile list. So far most of the supported modules & platforms have a limit of 24 profiles, while on 9x50 Qualcomm on the EM75xx baseline it has been increased to 34. It's unforeseeable that in the short future this limit will further be raised beyond this level.
◆ 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_ConState_t
enum le_mdc_ConState_t |
◆ le_mdc_DataBearerTechnology_t
Enumeration of data bearer technologies.
◆ le_mdc_DisconnectionReason_t
Enumeration of the possible reasons for the disconnection.
◆ le_mdc_Pdp_t
enum le_mdc_Pdp_t |
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 | ||
) |
Reference to a modem data connection profile. Enumeration of data bearer technologies. Enumeration of Packet Data Protocol. Authentication bit mask. Enumeration of connection state. Enumeration of the possible reasons for the disconnection. Handler for Data session connection state changes. Handler for MT-PDP Data session connection state changes. Handler for asynchronous session start and stop result response Reference type used by Add/Remove functions for EVENT 'le_mdc_SessionState' Reference type used by Add/Remove functions for EVENT 'le_mdc_MtPdpSessionState' This is the structure with info about a given cellular data profile Add handler function for EVENT 'le_mdc_SessionState'
This event provides information on data session connection state changes for the given profileRef.
- Parameters
-
[in] profileRef The 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] profileRef Query this profile object [out] apnStr The 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] profileRef Query this profile object [out] typePtr Authentication type [out] userName UserName used by authentication [in] userNameSize [out] password Password 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] rxBytesPtr bytes amount received since the last counter reset [out] txBytesPtr bytes amount transmitted since the last counter reset
◆ le_mdc_GetCidList()
le_result_t le_mdc_GetCidList | ( | uint8_t * | cidPtr, |
size_t * | cidSizePtr | ||
) |
Get the list of supported PDP context identifiers
- Returns
- LE_OK on success
- LE_BAD_PARAMETER if the input parameter is not valid
- LE_FAULT for other failures
- Parameters
-
[out] cidPtr List of supported PDP context identifiers [in,out] cidSizePtr
◆ 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] profileRef Query this profile object [out] downlinkDataBearerTechPtrPtr downlink data bearer technology [out] uplinkDataBearerTechPtrPtr uplink data bearer technology
◆ 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.
- Warning
- The return value le_mdc_DisconnectionReason_t might be limited by the platform. Please refer to the platform documentation Modem Control platform constraints.
- 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] profileRef profile reference [in] pdpType pdp 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] profileRef Query this profile object [out] interfaceName The 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] profileRef Query this profile object [out] ipAddr The 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] profileRef Query this profile object [out] dns1AddrStr The primary DNS IP address in dotted format [in] dns1AddrStrSize [out] dns2AddrStr The 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] profileRef Query this profile object [out] gatewayAddr The 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] profileRef Query this profile object [out] ipAddr The 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] profileRef Query this profile object [out] dns1AddrStr The primary DNS IP address in dotted format [in] dns1AddrStrSize [out] dns2AddrStr The 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] profileRef Query this profile object [out] gatewayAddr The 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] profileRef Query this profile object
◆ 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] profileRef profile reference [in] pdpType pdp type of session
◆ 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.
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.
- 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] profileRef profile reference [in] pdpType pdp type of session [out] failureTypePtr platform specific failure type [out] failureCodePtr platform 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] index index 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] apnStr The Access Point Name [out] profileRefPtr profile 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] profileRef Query 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] profileListPtr list 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] profileRef Query this profile object [out] connectionStatePtr The 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] profileRef Query 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] profileRef Query 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] profileRef Profile reference [in] interfaceName Network 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] profileRef Reject 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] profileRef Query this profile object [in] apnStr The 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] profileRef Query this profile object [in] type Authentication type [in] userName UserName used by authentication [in] password Password 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_UNSUPPORTED if default APN switching is disabled
- LE_FAULT for all other errors
- Note
- The process exits if an invalid profile object is given
- Parameters
-
[in] profileRef Query 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] profileRef Query this profile object [in] pdp The Packet Data Protocol
◆ le_mdc_SetServerDisconnectHandler()
LE_FULL_API 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_TIMEOUT for session start timeout
- LE_FAULT for other failures
- Note
- The process exits, if an invalid profile object is given
- Parameters
-
[in] profileRef Start 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] profileRef Start data session for this profile object [in] handlerPtr Handler 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] profileRef Stop 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] profileRef Stop data session for this profile object [in] handlerPtr Handler 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.