le_sms_interface.h File Reference
#include "legato.h"
#include "le_mdmDefs_interface.h"

Go to the source code of this file.

Macros

#define LE_SMS_TIMESTAMP_MAX_LEN   20
 
#define LE_SMS_TIMESTAMP_MAX_BYTES   21
 
#define LE_SMS_TEXT_MAX_LEN   160
 
#define LE_SMS_TEXT_MAX_BYTES   161
 
#define LE_SMS_BINARY_MAX_BYTES   140
 
#define LE_SMS_PDU_MAX_PAYLOAD   140
 
#define LE_SMS_PDU_MAX_BYTES   176
 

Typedefs

typedef struct le_sms_Msg * le_sms_MsgRef_t
 
typedef struct le_sms_MsgList * le_sms_MsgListRef_t
 
typedef struct le_sms_RxMessageHandler * le_sms_RxMessageHandlerRef_t
 
typedef void(* le_sms_CallbackResultFunc_t) (le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)
 
typedef void(* le_sms_RxMessageHandlerFunc_t) (le_sms_MsgRef_t msgRef, void *contextPtr)
 

Enumerations

enum  le_sms_Format_t { LE_SMS_FORMAT_PDU, LE_SMS_FORMAT_TEXT, LE_SMS_FORMAT_BINARY, LE_SMS_FORMAT_UNKNOWN }
 
enum  le_sms_Type_t { LE_SMS_TYPE_RX, LE_SMS_TYPE_TX, LE_SMS_TYPE_BROADCAST_RX }
 
enum  le_sms_Status_t {
  LE_SMS_RX_READ, LE_SMS_RX_UNREAD, LE_SMS_STORED_SENT, LE_SMS_STORED_UNSENT,
  LE_SMS_SENT, LE_SMS_SENDING, LE_SMS_UNSENT, LE_SMS_SENDING_FAILED,
  LE_SMS_SENDING_TIMEOUT, LE_SMS_STATUS_UNKNOWN
}
 
enum  le_sms_Languages_t {
  LE_SMS_LANGUAGE_UNKNOWN, LE_SMS_LANGUAGE_ENGLISH, LE_SMS_LANGUAGE_FRENCH, LE_SMS_LANGUAGE_SPANISH,
  LE_SMS_LANGUAGE_JAPANESE, LE_SMS_LANGUAGE_KOREAN, LE_SMS_LANGUAGE_CHINESE, LE_SMS_LANGUAGE_HEBREW,
  LE_SMS_LANGUAGE_MAX
}
 
enum  le_sms_CdmaServiceCat_t {
  LE_SMS_CDMA_SVC_CAT_UNKNOWN, LE_SMS_CDMA_SVC_CAT_EMERGENCY_BROADCAST, LE_SMS_CDMA_SVC_CAT_ADMINISTRATIVE, LE_SMS_CDMA_SVC_CAT_MAINTENANCE,
  LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_LOCAL, LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_REGIONAL, LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_NATIONAL, LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_INTERNATIONAL,
  LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_LOCAL, LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_REGIONAL, LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_NATIONAL, LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_INTERNATIONAL,
  LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_LOCAL, LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_REGIONAL, LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_NATIONAL, LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_INTERNATIONAL,
  LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_LOCAL, LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_REGIONAL, LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_NATIONAL, LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_INTERNATIONAL,
  LE_SMS_CDMA_SVC_CAT_LOCAL_WEATHER, LE_SMS_CDMA_SVC_CAT_TRAFFIC_REPORTS, LE_SMS_CDMA_SVC_CAT_LOCAL_FLIGHT_SCHEDULES, LE_SMS_CDMA_SVC_CAT_RESTAURANTS,
  LE_SMS_CDMA_SVC_CAT_LODGINGS, LE_SMS_CDMA_SVC_CAT_RETAIL_DIRECTORY, LE_SMS_CDMA_SVC_CAT_ADVERTISEMENTS, LE_SMS_CDMA_SVC_CAT_STOCK_QUOTES,
  LE_SMS_CDMA_SVC_CAT_EMPLOYMENT_OPPORTUNITIES, LE_SMS_CDMA_SVC_CAT_MEDICAL, LE_SMS_CDMA_SVC_CAT_TECHNOLOGY_NEWS, LE_SMS_CDMA_SVC_CAT_MULTI_CAT,
  LE_SMS_CDMA_SVC_CAT_CATPT, LE_SMS_CDMA_SVC_CAT_MAX
}
 
enum  le_sms_ErrorCode3GPP2_t {
  LE_SMS_ERROR_ADDR_VACANT, LE_SMS_ERROR_ADDR_TRANSLATION_FAILURE, LE_SMS_ERROR_NETWORK_RESOURCE_SHORTAGE, LE_SMS_ERROR_NETWORK_FAILURE,
  LE_SMS_ERROR_INVALID_TELESERVICE_ID, LE_SMS_ERROR_NETWORK_OTHER, LE_SMS_ERROR_NO_PAGE_RESPONSE, LE_SMS_ERROR_DEST_BUSY,
  LE_SMS_ERROR_NO_ACK, LE_SMS_ERROR_DEST_RESOURCE_SHORTAGE, LE_SMS_ERROR_SMS_DELIVERY_POSTPONED, LE_SMS_ERROR_DEST_OUT_OF_SERV,
  LE_SMS_ERROR_DEST_NOT_AT_ADDR, LE_SMS_ERROR_DEST_OTHER, LE_SMS_ERROR_RADIO_IF_RESOURCE_SHORTAGE, LE_SMS_ERROR_RADIO_IF_INCOMPATABILITY,
  LE_SMS_ERROR_RADIO_IF_OTHER, LE_SMS_ERROR_ENCODING, LE_SMS_ERROR_SMS_ORIG_DENIED, LE_SMS_ERROR_SMS_TERM_DENIED,
  LE_SMS_ERROR_SUPP_SERV_NOT_SUPP, LE_SMS_ERROR_SMS_NOT_SUPP, LE_SMS_ERROR_MISSING_EXPECTED_PARAM, LE_SMS_ERROR_MISSING_MAND_PARAM,
  LE_SMS_ERROR_UNRECOGNIZED_PARAM_VAL, LE_SMS_ERROR_UNEXPECTED_PARAM_VAL, LE_SMS_ERROR_USER_DATA_SIZE_ERR, LE_SMS_ERROR_GENERAL_OTHER,
  LE_SMS_ERROR_3GPP2_PLATFORM_SPECIFIC, LE_SMS_ERROR_3GPP2_MAX
}
 
enum  le_sms_ErrorCode_t {
  LE_SMS_RP_ERROR_UNASSIGNED_NUMBER, LE_SMS_RP_ERROR_OPERATOR_DETERMINED_BARRING, LE_SMS_RP_ERROR_CALL_BARRED, LE_SMS_RP_ERROR_RESERVED,
  LE_SMS_RP_ERROR_SMS_TRANSFER_REJECTED, LE_SMS_RP_ERROR_MEMORY_CAP_EXCEEDED, LE_SMS_RP_ERROR_DESTINATION_OUT_OF_ORDER, LE_SMS_RP_ERROR_UNIDENTIFIED_SUBSCRIBER,
  LE_SMS_RP_ERROR_FACILITY_REJECTED, LE_SMS_RP_ERROR_UNKNOWN_SUBSCRIBER, LE_SMS_RP_ERROR_NETWORK_OUT_OF_ORDER, LE_SMS_RP_ERROR_TEMPORARY_FAILURE,
  LE_SMS_RP_ERROR_CONGESTION, LE_SMS_RP_ERROR_RESOURCES_UNAVAILABLE, LE_SMS_RP_ERROR_REQUESTED_FACILITY_NOT_SUBSCRIBED, LE_SMS_RP_ERROR_REQUESTED_FACILITY_NOT_IMPLEMENTED,
  LE_SMS_RP_ERROR_INVALID_SMS_TRANSFER_REFERENCE_VALUE, LE_SMS_RP_ERROR_SEMANTICALLY_INCORRECT_MESSAGE, LE_SMS_RP_ERROR_INVALID_MANDATORY_INFO, LE_SMS_RP_ERROR_MESSAGE_TYPE_NOT_IMPLEMENTED,
  LE_SMS_RP_ERROR_MESSAGE_NOT_COMPATABLE_WITH_SMS, LE_SMS_RP_ERROR_INFO_ELEMENT_NOT_IMPLEMENTED, LE_SMS_RP_ERROR_PROTOCOL_ERROR, LE_SMS_RP_ERROR_INTERWORKING,
  LE_SMS_TP_ERROR_TELE_INTERWORKING_NOT_SUPPORTED, LE_SMS_TP_ERROR_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED, LE_SMS_TP_ERROR_SHORT_MESSAGE_CANNOT_BE_REPLACED, LE_SMS_TP_ERROR_UNSPECIFIED_PID_ERROR,
  LE_SMS_TP_ERROR_DCS_NOT_SUPPORTED, LE_SMS_TP_ERROR_MESSAGE_CLASS_NOT_SUPPORTED, LE_SMS_TP_ERROR_UNSPECIFIED_DCS_ERROR, LE_SMS_TP_ERROR_COMMAND_CANNOT_BE_ACTIONED,
  LE_SMS_TP_ERROR_COMMAND_UNSUPPORTED, LE_SMS_TP_ERROR_UNSPECIFIED_COMMAND_ERROR, LE_SMS_TP_ERROR_TPDU_NOT_SUPPORTED, LE_SMS_TP_ERROR_SC_BUSY,
  LE_SMS_TP_ERROR_NO_SC_SUBSCRIPTION, LE_SMS_TP_ERROR_SC_SYS_FAILURE, LE_SMS_TP_ERROR_INVALID_SME_ADDRESS, LE_SMS_TP_ERROR_DESTINATION_SME_BARRED,
  LE_SMS_TP_ERROR_SM_REJECTED_OR_DUPLICATE, LE_SMS_TP_ERROR_TP_VPF_NOT_SUPPORTED, LE_SMS_TP_ERROR_TP_VP_NOT_SUPPORTED, LE_SMS_TP_ERROR_SIM_SMS_STORAGE_FULL,
  LE_SMS_TP_ERROR_NO_SMS_STORAGE_CAP_IN_SIM, LE_SMS_TP_ERROR_MS_ERROR, LE_SMS_TP_ERROR_MEMORY_CAP_EXCEEDED, LE_SMS_TP_ERROR_SIM_APP_TOOLKIT_BUSY,
  LE_SMS_TP_ERROR_SIM_DATA_DOWNLOAD_ERROR, LE_SMS_TP_ERROR_UNSPECIFIED_ERROR, LE_SMS_ERROR_3GPP_PLATFORM_SPECIFIC, LE_SMS_ERROR_3GPP_MAX
}
 

Functions

void le_sms_ConnectService (void)
 
void le_sms_DisconnectService (void)
 
le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler (le_sms_RxMessageHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_sms_RemoveRxMessageHandler (le_sms_RxMessageHandlerRef_t addHandlerRef)
 
le_sms_MsgRef_t le_sms_Create (void)
 
le_result_t le_sms_SetTimeout (le_sms_MsgRef_t msgRef, uint32_t timeout)
 
le_result_t le_sms_SetDestination (le_sms_MsgRef_t msgRef, const char *dest)
 
le_result_t le_sms_SetText (le_sms_MsgRef_t msgRef, const char *text)
 
le_result_t le_sms_SetBinary (le_sms_MsgRef_t msgRef, const uint8_t *binPtr, size_t binNumElements)
 
le_result_t le_sms_SetPDU (le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduNumElements)
 
le_result_t le_sms_Send (le_sms_MsgRef_t msgRef)
 
le_result_t le_sms_SendAsync (le_sms_MsgRef_t msgRef, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)
 
le_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode (le_sms_MsgRef_t msgRef)
 
void le_sms_GetErrorCode (le_sms_MsgRef_t msgRef, le_sms_ErrorCode_t *rpCausePtr, le_sms_ErrorCode_t *tpCausePtr)
 
int32_t le_sms_GetPlatformSpecificErrorCode (le_sms_MsgRef_t msgRef)
 
le_sms_MsgRef_t le_sms_SendText (const char *destStr, const char *textStr, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)
 
le_sms_MsgRef_t le_sms_SendPdu (const uint8_t *pduPtr, size_t pduNumElements, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)
 
void le_sms_Delete (le_sms_MsgRef_t msgRef)
 
le_sms_Format_t le_sms_GetFormat (le_sms_MsgRef_t msgRef)
 
le_sms_Type_t le_sms_GetType (le_sms_MsgRef_t msgRef)
 
le_result_t le_sms_GetCellBroadcastId (le_sms_MsgRef_t msgRef, uint16_t *messageIdPtr)
 
le_result_t le_sms_GetCellBroadcastSerialNumber (le_sms_MsgRef_t msgRef, uint16_t *serialNumberPtr)
 
le_result_t le_sms_GetSenderTel (le_sms_MsgRef_t msgRef, char *tel, size_t telNumElements)
 
le_result_t le_sms_GetTimeStamp (le_sms_MsgRef_t msgRef, char *timestamp, size_t timestampNumElements)
 
size_t le_sms_GetUserdataLen (le_sms_MsgRef_t msgRef)
 
le_result_t le_sms_GetText (le_sms_MsgRef_t msgRef, char *text, size_t textNumElements)
 
le_result_t le_sms_GetBinary (le_sms_MsgRef_t msgRef, uint8_t *binPtr, size_t *binNumElementsPtr)
 
le_result_t le_sms_GetPDU (le_sms_MsgRef_t msgRef, uint8_t *pduPtr, size_t *pduNumElementsPtr)
 
size_t le_sms_GetPDULen (le_sms_MsgRef_t msgRef)
 
le_result_t le_sms_DeleteFromStorage (le_sms_MsgRef_t msgRef)
 
le_sms_MsgListRef_t le_sms_CreateRxMsgList (void)
 
void le_sms_DeleteList (le_sms_MsgListRef_t msgListRef)
 
le_sms_MsgRef_t le_sms_GetFirst (le_sms_MsgListRef_t msgListRef)
 
le_sms_MsgRef_t le_sms_GetNext (le_sms_MsgListRef_t msgListRef)
 
le_sms_Status_t le_sms_GetStatus (le_sms_MsgRef_t msgRef)
 
void le_sms_MarkRead (le_sms_MsgRef_t msgRef)
 
void le_sms_MarkUnread (le_sms_MsgRef_t msgRef)
 
le_result_t le_sms_GetSmsCenterAddress (char *tel, size_t telNumElements)
 
le_result_t le_sms_SetSmsCenterAddress (const char *tel)
 
le_result_t le_sms_ActivateCellBroadcast (void)
 
le_result_t le_sms_DeactivateCellBroadcast (void)
 
le_result_t le_sms_ActivateCdmaCellBroadcast (void)
 
le_result_t le_sms_DeactivateCdmaCellBroadcast (void)
 
le_result_t le_sms_AddCellBroadcastIds (uint16_t fromId, uint16_t toId)
 
le_result_t le_sms_RemoveCellBroadcastIds (uint16_t fromId, uint16_t toId)
 
le_result_t le_sms_ClearCellBroadcastIds (void)
 
le_result_t le_sms_AddCdmaCellBroadcastServices (le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)
 
le_result_t le_sms_RemoveCdmaCellBroadcastServices (le_sms_CdmaServiceCat_t serviceCat, le_sms_Languages_t language)
 
le_result_t le_sms_ClearCdmaCellBroadcastServices (void)
 

Detailed Description

Legato SMS include file.

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.

Macro Definition Documentation

#define LE_SMS_BINARY_MAX_BYTES   140

The raw binary message can be up to 140 bytes long.

#define LE_SMS_PDU_MAX_BYTES   176

The PDU message can be up to 36 (header) + 140 (payload) bytes long.

#define LE_SMS_PDU_MAX_PAYLOAD   140

The PDU payload bytes long.

#define LE_SMS_TEXT_MAX_BYTES   161

Test message string length (including the null-terminator).

#define LE_SMS_TEXT_MAX_LEN   160

The text message can be up to 160 characters long. One extra byte is added for the null character.

#define LE_SMS_TIMESTAMP_MAX_BYTES   21

Time stamp string length (including the null-terminator).

#define LE_SMS_TIMESTAMP_MAX_LEN   20

Time stamp string length. The string format is "yy/MM/dd,hh:mm:ss+/-zz" (Year/Month/Day,Hour:Min:Seconds+/-TimeZone). One extra byte is added for the null character.

Typedef Documentation

typedef void(* le_sms_CallbackResultFunc_t) (le_sms_MsgRef_t msgRef, le_sms_Status_t status, void *contextPtr)

Handler for Sending result.

Parameters
msgRefReference to the message object.
statusStatus result.
contextPtr
typedef struct le_sms_MsgList* le_sms_MsgListRef_t

Opaque type for SMS Message Listing.

typedef struct le_sms_Msg* le_sms_MsgRef_t

Declare a reference type for referring to SMS Message objects.

typedef void(* le_sms_RxMessageHandlerFunc_t) (le_sms_MsgRef_t msgRef, void *contextPtr)

Handler for New Message.

Parameters
msgRefMessage reference.
contextPtr
typedef struct le_sms_RxMessageHandler* le_sms_RxMessageHandlerRef_t

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

Enumeration Type Documentation

CDMA Cell broadcast Service Categories.

Enumerator
LE_SMS_CDMA_SVC_CAT_UNKNOWN 

Unknown or Unspecified.

LE_SMS_CDMA_SVC_CAT_EMERGENCY_BROADCAST 

Emergency Broadcast.

LE_SMS_CDMA_SVC_CAT_ADMINISTRATIVE 

Administrative.

LE_SMS_CDMA_SVC_CAT_MAINTENANCE 

Maintenance.

LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_LOCAL 

General News Local.

LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_REGIONAL 

General News Regional.

LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_NATIONAL 

General News National.

LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_INTERNATIONAL 

General News International.

LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_LOCAL 

Business News Local.

LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_REGIONAL 

Business News Regional.

LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_NATIONAL 

Business News National.

LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_INTERNATIONAL 

Business News International.

LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_LOCAL 

Sports News Local.

LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_REGIONAL 

Sports News Regional.

LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_NATIONAL 

Sports News National.

LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_INTERNATIONAL 

Sports News International.

LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_LOCAL 

Entertainment News Local.

LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_REGIONAL 

Entertainment News Regional.

LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_NATIONAL 

Entertainment News National.

LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_INTERNATIONAL 

Entertainment News International.

LE_SMS_CDMA_SVC_CAT_LOCAL_WEATHER 

Local weather.

LE_SMS_CDMA_SVC_CAT_TRAFFIC_REPORTS 

Area Traffic Reports.

LE_SMS_CDMA_SVC_CAT_LOCAL_FLIGHT_SCHEDULES 

Local Airplane Flight Schedules.

LE_SMS_CDMA_SVC_CAT_RESTAURANTS 

Restaurants.

LE_SMS_CDMA_SVC_CAT_LODGINGS 

Lodgings.

LE_SMS_CDMA_SVC_CAT_RETAIL_DIRECTORY 

Retail Directory.

LE_SMS_CDMA_SVC_CAT_ADVERTISEMENTS 

Advertisements.

LE_SMS_CDMA_SVC_CAT_STOCK_QUOTES 

Stock Quotes.

LE_SMS_CDMA_SVC_CAT_EMPLOYMENT_OPPORTUNITIES 

Employment Opportunities.

LE_SMS_CDMA_SVC_CAT_MEDICAL 

Medical/Health/Hospitals.

LE_SMS_CDMA_SVC_CAT_TECHNOLOGY_NEWS 

Technology News.

LE_SMS_CDMA_SVC_CAT_MULTI_CAT 

Multicategory.

LE_SMS_CDMA_SVC_CAT_CATPT 

Card Application Toolkit Protocol Teleservice.

3GPP2 Message Error code when the message sending has failed.

Enumerator
LE_SMS_ERROR_ADDR_VACANT 

The SMS Destination Address is valid but is not. currently allocated to an SMS terminal.

LE_SMS_ERROR_ADDR_TRANSLATION_FAILURE 

The SMS Destination Address is invalid.

LE_SMS_ERROR_NETWORK_RESOURCE_SHORTAGE 

The network transmission failed due to lack of a network resource or link capacity.

LE_SMS_ERROR_NETWORK_FAILURE 

A network node failed, a link failed, or a required operation failed.

LE_SMS_ERROR_INVALID_TELESERVICE_ID 

The SMS_TeleserviceIdentifier is not known, is not supported, or is not authorized by an addressed functional entity.

LE_SMS_ERROR_NETWORK_OTHER 

A network problem other than identified above.

LE_SMS_ERROR_NO_PAGE_RESPONSE 

The addressed MS-based SME is known, but it does not respond to a page.

LE_SMS_ERROR_DEST_BUSY 

The destination MS-based SME is SMS capable, but is currently engaged in a call, a service, or a call mode that precludes the use of SMS, or the destination SME is congested.

LE_SMS_ERROR_NO_ACK 

The destination SME does not acknowledge receipt of the SMS delivery.

LE_SMS_ERROR_DEST_RESOURCE_SHORTAGE 

A required terminal resource is not available to process this message.

LE_SMS_ERROR_SMS_DELIVERY_POSTPONED 

Delivery is not currently possible.

LE_SMS_ERROR_DEST_OUT_OF_SERV 

The addressed destination is out of service for an extended period of time.

LE_SMS_ERROR_DEST_NOT_AT_ADDR 

The MS-based SME is no longer at the temporary SMS routing address.

LE_SMS_ERROR_DEST_OTHER 

A terminal problem other than described above.

LE_SMS_ERROR_RADIO_IF_RESOURCE_SHORTAGE 

There is no channel available or there is radio congestion at this time.

LE_SMS_ERROR_RADIO_IF_INCOMPATABILITY 

The MS for an MS-based SME is operating in a mode that does not support SMS at this time.

LE_SMS_ERROR_RADIO_IF_OTHER 

A radio interface problem to an MS-based SME other than described above.

LE_SMS_ERROR_ENCODING 

The size of a parameter or field is not what is expected.

LE_SMS_ERROR_SMS_ORIG_DENIED 

The originating MIN is not recognized.

LE_SMS_ERROR_SMS_TERM_DENIED 

The destination is not authorized to receive the SMS message.

LE_SMS_ERROR_SUPP_SERV_NOT_SUPP 

The originating supplementary service is not known or supported.

LE_SMS_ERROR_SMS_NOT_SUPP 

The originating supplementary service is not known or supported.

LE_SMS_ERROR_MISSING_EXPECTED_PARAM 

An optional parameter that is required for a particular function.

LE_SMS_ERROR_MISSING_MAND_PARAM 

A parameter is missing that is mandatory. for a particular message.

LE_SMS_ERROR_UNRECOGNIZED_PARAM_VAL 

A known parameter has an unknown or unsupported value.

LE_SMS_ERROR_UNEXPECTED_PARAM_VAL 

A known parameter has a known but unexpected value.

LE_SMS_ERROR_USER_DATA_SIZE_ERR 

The User Data size is too large for access technology, transport network, or call mode, etc

LE_SMS_ERROR_GENERAL_OTHER 

Other general problems.

LE_SMS_ERROR_3GPP2_PLATFORM_SPECIFIC 

Platform specific code.

LE_SMS_ERROR_3GPP2_MAX 

Undefined reason.

Message Error code when the message sending has failed.

Enumerator
LE_SMS_RP_ERROR_UNASSIGNED_NUMBER 

Unassigned (unallocated) number.

LE_SMS_RP_ERROR_OPERATOR_DETERMINED_BARRING 

Operator determined barring.

LE_SMS_RP_ERROR_CALL_BARRED 

Call barred.

LE_SMS_RP_ERROR_RESERVED 

Reserved.

LE_SMS_RP_ERROR_SMS_TRANSFER_REJECTED 

Short message transfer rejected.

LE_SMS_RP_ERROR_MEMORY_CAP_EXCEEDED 

Memory capacity exceeded.

LE_SMS_RP_ERROR_DESTINATION_OUT_OF_ORDER 

Destination out of order.

LE_SMS_RP_ERROR_UNIDENTIFIED_SUBSCRIBER 

Unidentified subscriber.

LE_SMS_RP_ERROR_FACILITY_REJECTED 

Facility rejected.

LE_SMS_RP_ERROR_UNKNOWN_SUBSCRIBER 

Unknown subscriber.

LE_SMS_RP_ERROR_NETWORK_OUT_OF_ORDER 

Network out of order.

LE_SMS_RP_ERROR_TEMPORARY_FAILURE 

Temporary failure.

LE_SMS_RP_ERROR_CONGESTION 

Congestion.

LE_SMS_RP_ERROR_RESOURCES_UNAVAILABLE 

Resources unavailable, unspecified.

LE_SMS_RP_ERROR_REQUESTED_FACILITY_NOT_SUBSCRIBED 

Resources facility not subscribed.

LE_SMS_RP_ERROR_REQUESTED_FACILITY_NOT_IMPLEMENTED 

Resources facility not implemented.

LE_SMS_RP_ERROR_INVALID_SMS_TRANSFER_REFERENCE_VALUE 

Invalid short message transfer reference value

LE_SMS_RP_ERROR_SEMANTICALLY_INCORRECT_MESSAGE 

Sementically incorect message.

LE_SMS_RP_ERROR_INVALID_MANDATORY_INFO 

Invalid mandatory information.

LE_SMS_RP_ERROR_MESSAGE_TYPE_NOT_IMPLEMENTED 

Message type nonexistent or not implemented.

LE_SMS_RP_ERROR_MESSAGE_NOT_COMPATABLE_WITH_SMS 

Message not compatible with short message protocol state

LE_SMS_RP_ERROR_INFO_ELEMENT_NOT_IMPLEMENTED 

Information element nonexistent or not implemented

LE_SMS_RP_ERROR_PROTOCOL_ERROR 

Protocol error, unspecified.

LE_SMS_RP_ERROR_INTERWORKING 

Interworking, unspecified.

LE_SMS_TP_ERROR_TELE_INTERWORKING_NOT_SUPPORTED 

Telematic interworking not supported.

LE_SMS_TP_ERROR_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED 

Short Message Type 0 not supported.

LE_SMS_TP_ERROR_SHORT_MESSAGE_CANNOT_BE_REPLACED 

Cannot replace short message.

LE_SMS_TP_ERROR_UNSPECIFIED_PID_ERROR 

Unspecified TP-PID error.

LE_SMS_TP_ERROR_DCS_NOT_SUPPORTED 

Data coding scheme (alphabet) not supported

LE_SMS_TP_ERROR_MESSAGE_CLASS_NOT_SUPPORTED 

Message class not supported.

LE_SMS_TP_ERROR_UNSPECIFIED_DCS_ERROR 

Unspecified TP-DCS error.

LE_SMS_TP_ERROR_COMMAND_CANNOT_BE_ACTIONED 

Command cannot be actioned.

LE_SMS_TP_ERROR_COMMAND_UNSUPPORTED 

Command unsupported.

LE_SMS_TP_ERROR_UNSPECIFIED_COMMAND_ERROR 

Unspecified TP-Command error.

LE_SMS_TP_ERROR_TPDU_NOT_SUPPORTED 

TPDU not supported.

LE_SMS_TP_ERROR_SC_BUSY 

SC busy.

LE_SMS_TP_ERROR_NO_SC_SUBSCRIPTION 

No SC subscription.

LE_SMS_TP_ERROR_SC_SYS_FAILURE 

SC system failure.

LE_SMS_TP_ERROR_INVALID_SME_ADDRESS 

Invalid SME address.

LE_SMS_TP_ERROR_DESTINATION_SME_BARRED 

Destination SME barred.

LE_SMS_TP_ERROR_SM_REJECTED_OR_DUPLICATE 

SM Rejected-Duplicate SM.

LE_SMS_TP_ERROR_TP_VPF_NOT_SUPPORTED 

TP-VPF not supported.

LE_SMS_TP_ERROR_TP_VP_NOT_SUPPORTED 

TP-VP not supporte.

LE_SMS_TP_ERROR_SIM_SMS_STORAGE_FULL 

(U)SIM SMS storage full

LE_SMS_TP_ERROR_NO_SMS_STORAGE_CAP_IN_SIM 

No SMS storage capability in (U)SIM.

LE_SMS_TP_ERROR_MS_ERROR 

Error in MS.

LE_SMS_TP_ERROR_MEMORY_CAP_EXCEEDED 

Memory capacity exceeded.

LE_SMS_TP_ERROR_SIM_APP_TOOLKIT_BUSY 

(U)SIM Application Toolkit busy

LE_SMS_TP_ERROR_SIM_DATA_DOWNLOAD_ERROR 

(U)SIM data download error

LE_SMS_TP_ERROR_UNSPECIFIED_ERROR 

Unspecified error cause.

LE_SMS_ERROR_3GPP_PLATFORM_SPECIFIC 

Platform specific code.

LE_SMS_ERROR_3GPP_MAX 

Undefined reason.

Message Format.

Enumerator
LE_SMS_FORMAT_PDU 

PDU message format.

LE_SMS_FORMAT_TEXT 

Text message format.

LE_SMS_FORMAT_BINARY 

Binary message format.

LE_SMS_FORMAT_UNKNOWN 

Unknown message format.

CDMA Cell broadcast message languages.

Enumerator
LE_SMS_LANGUAGE_UNKNOWN 

Unknow or Unspecified language.

LE_SMS_LANGUAGE_ENGLISH 

English language.

LE_SMS_LANGUAGE_FRENCH 

French language.

LE_SMS_LANGUAGE_SPANISH 

Spanish language.

LE_SMS_LANGUAGE_JAPANESE 

Japanese language.

LE_SMS_LANGUAGE_KOREAN 

Korean language.

LE_SMS_LANGUAGE_CHINESE 

Chinese language.

LE_SMS_LANGUAGE_HEBREW 

Hebrew language.

Message Status.

Enumerator
LE_SMS_RX_READ 

Message present in the message storage has been read.

LE_SMS_RX_UNREAD 

Message present in the message storage has not been read.

LE_SMS_STORED_SENT 

Message saved in the message storage has been sent.

LE_SMS_STORED_UNSENT 

Message saved in the message storage has not been sent.

LE_SMS_SENT 

Message has been sent.

LE_SMS_SENDING 

Message has been in the sending pool.

LE_SMS_UNSENT 

Message has not been sent.

LE_SMS_SENDING_FAILED 

Message sending has Failed.

LE_SMS_SENDING_TIMEOUT 

Message sending has Failed due to timeout.

LE_SMS_STATUS_UNKNOWN 

Unknown message status.

Message Type.

Enumerator
LE_SMS_TYPE_RX 

SMS mobile terminated message.

LE_SMS_TYPE_TX 

SMS mobile originated message.

LE_SMS_TYPE_BROADCAST_RX 

SMS Cell Broadcast message.

Function Documentation

le_result_t le_sms_ActivateCdmaCellBroadcast ( void  )

Activate CDMA Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
le_result_t le_sms_ActivateCellBroadcast ( void  )

Activate Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
le_result_t le_sms_AddCdmaCellBroadcastServices ( le_sms_CdmaServiceCat_t  serviceCat,
le_sms_Languages_t  language 
)

Add CDMA Cell Broadcast category services.

Returns
  • LE_FAULT Function failed.
  • LE_BAD_PARAMETER Parameter is invalid.
  • LE_OK Function succeeded.
Parameters
[in]serviceCatService category assignment. Reference to 3GPP2 C.R1001-D v1.0 Section 9.3.1 Standard Service Category Assignments.
[in]languageLanguage Indicator. Reference to 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator Value Assignments
le_result_t le_sms_AddCellBroadcastIds ( uint16_t  fromId,
uint16_t  toId 
)

Add Cell Broadcast message Identifiers range.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
Parameters
[in]fromIdStarting point of the range of cell broadcast message identifier.
[in]toIdEnding point of the range of cell broadcast message identifier.
le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler ( le_sms_RxMessageHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_sms_RxMessage'

This event provides information on new received messages.

Parameters
[in]handlerPtr
[in]contextPtr
le_result_t le_sms_ClearCdmaCellBroadcastServices ( void  )

Clear CDMA Cell Broadcast category services.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
le_result_t le_sms_ClearCellBroadcastIds ( void  )

Clear Cell Broadcast message Identifiers.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
void le_sms_ConnectService ( void  )

Connect the current client thread to the service providing this API.

This function must be called before any other functions in this API. Normally, it's automatically called for the main thread, but must be explicitly called for other threads. For details, see Client-specific Functions.

This function is created automatically.

le_sms_MsgRef_t le_sms_Create ( void  )

Create an SMS Message data structure.

Returns
Reference to the new Message object.
Note
On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
le_sms_MsgListRef_t le_sms_CreateRxMsgList ( void  )

Create an object's reference of the list of received messages saved in the SMS message storage area.

Returns
Reference to the List object. Null pointer if no messages have been retrieved.
le_result_t le_sms_DeactivateCdmaCellBroadcast ( void  )

Deactivate CDMA Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
le_result_t le_sms_DeactivateCellBroadcast ( void  )

Deactivate Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
void le_sms_Delete ( le_sms_MsgRef_t  msgRef)

Delete a Message data structure.

It deletes the Message data structure and all the allocated memory is freed. If several users own the Message object (e.g., several handler functions registered for SMS message reception), the Message object will only be deleted if one User owns the Message object.

Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
le_result_t le_sms_DeleteFromStorage ( le_sms_MsgRef_t  msgRef)

Delete an SMS message from the storage area.

Verifies first if the parameter is valid, then it checks the modem state can support message deleting.

Returns
LE_FAULT Function failed to perform the deletion.
LE_NO_MEMORY Message storage is not available.
LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
void le_sms_DeleteList ( le_sms_MsgListRef_t  msgListRef)

Delete the list of the Messages retrieved from the message storage.

Note
On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
Parameters
[in]msgListRefMessages list.
void le_sms_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_sms_ErrorCode3GPP2_t le_sms_Get3GPP2ErrorCode ( le_sms_MsgRef_t  msgRef)

Get the error code when a 3GPP2 message sending has Failed.

Returns
The error code
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
It is only applicable for 3GPP2 message sending failure, otherwise LE_SMS_ERROR_3GPP2_MAX is returned.
Parameters
[in]msgRefReference to the message object.
le_result_t le_sms_GetBinary ( le_sms_MsgRef_t  msgRef,
uint8_t *  binPtr,
size_t *  binNumElementsPtr 
)

Get the binary Message.

Output parameters are updated with the binary message content and the length of the raw binary message in bytes. If the binary data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is returned and 'raw' is filled until 'len' bytes.

Returns
LE_FORMAT_ERROR Message is not in binary format
LE_OVERFLOW Message length exceed the maximum length.
LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[out]binPtrBinary message.
[in,out]binNumElementsPtr
le_result_t le_sms_GetCellBroadcastId ( le_sms_MsgRef_t  msgRef,
uint16_t *  messageIdPtr 
)

Get the Cell Broadcast Message Identifier.

Returns
  • LE_FAULT Message is not a cell broadcast type.
  • LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[out]messageIdPtrCell Broadcast Message Identifier.
le_result_t le_sms_GetCellBroadcastSerialNumber ( le_sms_MsgRef_t  msgRef,
uint16_t *  serialNumberPtr 
)

Get the Cell Broadcast Message Serial Number.

Returns
  • LE_FAULT Message is not a cell broadcast type.
  • LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[out]serialNumberPtrCell Broadcast Serial Number.
void le_sms_GetErrorCode ( le_sms_MsgRef_t  msgRef,
le_sms_ErrorCode_t rpCausePtr,
le_sms_ErrorCode_t tpCausePtr 
)

Get the Radio Protocol and the Transfer Protocol error code when a 3GPP message sending has failed.

Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
It is only applicable for 3GPP message sending failure, otherwise LE_SMS_ERROR_3GPP_MAX is returned.
Parameters
[in]msgRefReference to the message object.
[out]rpCausePtrRadio Protocol cause code.
[out]tpCausePtrTransfer Protocol cause code.
le_sms_MsgRef_t le_sms_GetFirst ( le_sms_MsgListRef_t  msgListRef)

Get the first Message object reference in the list of messages retrieved with le_sms_CreateRxMsgList().

Returns
NULL No message found.
Msg Message object reference.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgListRefMessages list.
le_sms_Format_t le_sms_GetFormat ( le_sms_MsgRef_t  msgRef)

Get the message format.

Returns
Message format.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
For incoming SMS, format returned by le_sms_GetFormat is never LE_SMS_FORMAT_PDU.
Parameters
[in]msgRefReference to the message object.
le_sms_MsgRef_t le_sms_GetNext ( le_sms_MsgListRef_t  msgListRef)

Get the next Message object reference in the list of messages retrieved with le_sms_CreateRxMsgList().

Returns
NULL No message found.
Msg Message object reference.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgListRefMessages list.
le_result_t le_sms_GetPDU ( le_sms_MsgRef_t  msgRef,
uint8_t *  pduPtr,
size_t *  pduNumElementsPtr 
)

Get the PDU message.

Output parameters are updated with the PDU message content and the length of the PDU message in bytes. If the PDU data exceed the value of 'len' input parameter, a LE_OVERFLOW error code is returned and 'pdu' is filled until 'len' bytes.

Returns
LE_FORMAT_ERROR Unable to encode the message in PDU (only for outgoing messages).
LE_OVERFLOW Message length exceed the maximum length.
LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[out]pduPtrPDU message.
[in,out]pduNumElementsPtr
size_t le_sms_GetPDULen ( le_sms_MsgRef_t  msgRef)

Get the message Length value.

Returns
Length of the data in bytes of the PDU message.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
int32_t le_sms_GetPlatformSpecificErrorCode ( le_sms_MsgRef_t  msgRef)

Called to get the platform specific error code.

Returns
The platform specific error code.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
le_result_t le_sms_GetSenderTel ( le_sms_MsgRef_t  msgRef,
char *  tel,
size_t  telNumElements 
)

Get the Sender Telephone number.

Output parameter is updated with the Telephone number. If the Telephone number string exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.

Returns
LE_NOT_PERMITTED Message is not a received message.
LE_OVERFLOW Telephone number length exceed the maximum length.
LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[out]telTelephone number string.
[in]telNumElements
le_result_t le_sms_GetSmsCenterAddress ( char *  tel,
size_t  telNumElements 
)

Get the SMS center address.

Output parameter is updated with the SMS Service center address. If the Telephone number string exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'tel' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'tel'.

Returns
  • LE_FAULT Service is not available.
  • LE_OVERFLOW Telephone number length exceed the maximum length.
  • LE_OK Function succeeded.
Parameters
[out]telSMS center address number string.
[in]telNumElements
le_sms_Status_t le_sms_GetStatus ( le_sms_MsgRef_t  msgRef)

Read the Message status (Received Read, Received Unread, Stored Sent, Stored Unsent).

Returns
Status of the message.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefMessages list.
le_result_t le_sms_GetText ( le_sms_MsgRef_t  msgRef,
char *  text,
size_t  textNumElements 
)

Get the text Message.

Output parameter is updated with the text string encoded in ASCII format. If the text string exceeds the value of 'len' parameter, LE_OVERFLOW error code is returned and 'text' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'text'.

Returns
LE_OVERFLOW Message length exceed the maximum length.
LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[out]textSMS text.
[in]textNumElements
le_result_t le_sms_GetTimeStamp ( le_sms_MsgRef_t  msgRef,
char *  timestamp,
size_t  timestampNumElements 
)

Get the Service Center Time Stamp string.

Output parameter is updated with the Time Stamp string. If the Time Stamp string exceeds the value of 'len' parameter, a LE_OVERFLOW error code is returned and 'timestamp' is filled until 'len-1' characters and a null-character is implicitly appended at the end of 'timestamp'.

Returns
LE_NOT_PERMITTED Message is not a received message.
LE_OVERFLOW Timestamp number length exceed the maximum length.
LE_OK Function succeeded.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[out]timestampMessage time stamp (in text mode). string format: "yy/MM/dd,hh:mm:ss+/-zz" (Year/Month/Day,Hour:Min:Seconds+/-TimeZone)
[in]timestampNumElements
le_sms_Type_t le_sms_GetType ( le_sms_MsgRef_t  msgRef)

Get the message type.

Returns
Message type.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
size_t le_sms_GetUserdataLen ( le_sms_MsgRef_t  msgRef)

Get the message Length value.

Returns
Number of characters for text messages, or the length of the data in bytes for raw binary messages.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
void le_sms_MarkRead ( le_sms_MsgRef_t  msgRef)

Mark a message as 'read'.

Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefMessages list.
void le_sms_MarkUnread ( le_sms_MsgRef_t  msgRef)

Mark a message as 'unread'.

Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefMessages list.
le_result_t le_sms_RemoveCdmaCellBroadcastServices ( le_sms_CdmaServiceCat_t  serviceCat,
le_sms_Languages_t  language 
)

Remove CDMA Cell Broadcast category services.

Returns
  • LE_FAULT Function failed.
  • LE_BAD_PARAMETER Parameter is invalid.
  • LE_OK Function succeeded.
Parameters
[in]serviceCatService category assignment. Reference to 3GPP2 C.R1001-D v1.0 Section 9.3.1 Standard Service Category Assignments.
[in]languageLanguage Indicator. Reference to 3GPP2 C.R1001-D v1.0 Section 9.2.1 Language Indicator Value Assignments
le_result_t le_sms_RemoveCellBroadcastIds ( uint16_t  fromId,
uint16_t  toId 
)

Remove Cell Broadcast message Identifiers range.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
Parameters
[in]fromIdStarting point of the range of cell broadcast message identifier.
[in]toIdEnding point of the range of cell broadcast message identifier.
void le_sms_RemoveRxMessageHandler ( le_sms_RxMessageHandlerRef_t  addHandlerRef)

Remove handler function for EVENT 'le_sms_RxMessage'

Parameters
[in]addHandlerRef
le_result_t le_sms_Send ( le_sms_MsgRef_t  msgRef)

Send an SMS message.

Verifies first if the parameters are valid, then it checks the modem state can support message sending.

Returns
LE_FORMAT_ERROR Message content is invalid.
LE_FAULT Function failed to send the message.
LE_OK Function succeeded.
LE_TIMEOUT Timeout before the complete sending.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
le_result_t le_sms_SendAsync ( le_sms_MsgRef_t  msgRef,
le_sms_CallbackResultFunc_t  handlerPtr,
void *  contextPtr 
)

Send an asynchronous SMS message.

Verifies first if the parameters are valid, then it checks the modem state can support message sending.

Returns
LE_FORMAT_ERROR Message content is invalid.
LE_FAULT Function failed to send the message.
LE_OK Function succeeded.
LE_TIMEOUT Timeout before the complete sending.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[in]handlerPtr
[in]contextPtr
le_sms_MsgRef_t le_sms_SendPdu ( const uint8_t *  pduPtr,
size_t  pduNumElements,
le_sms_CallbackResultFunc_t  handlerPtr,
void *  contextPtr 
)

Create and asynchronously send a PDU message.

Returns
  • le_sms_Msg Reference to the new Message object pooled.
  • NULL Not possible to pool a new message.
Parameters
[in]pduPtrPDU message.
[in]pduNumElements
[in]handlerPtr
[in]contextPtr
le_sms_MsgRef_t le_sms_SendText ( const char *  destStr,
const char *  textStr,
le_sms_CallbackResultFunc_t  handlerPtr,
void *  contextPtr 
)

Create and asynchronously send a text message.

Returns
  • le_sms_Msg Reference to the new Message object pooled.
  • NULL Not possible to pool a new message.
Note
If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the function will not return.
Parameters
[in]destStrTelephone number string.
[in]textStrSMS text.
[in]handlerPtr
[in]contextPtr
le_result_t le_sms_SetBinary ( le_sms_MsgRef_t  msgRef,
const uint8_t *  binPtr,
size_t  binNumElements 
)

Set the binary message content.

Returns
LE_NOT_PERMITTED Message is Read-Only.
LE_BAD_PARAMETER Length of the data is equal to zero.
LE_OK Function succeeded.
Note
If length of the data is too long (max LE_SMS_BINARY_MAX_BYTES bytes), it is a fatal error, the function will not return.
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[in]binPtrBinary data.
[in]binNumElements
le_result_t le_sms_SetDestination ( le_sms_MsgRef_t  msgRef,
const char *  dest 
)

Set the Telephone destination number.

Telephone number is defined in ITU-T recommendations E.164/E.163. E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.

Returns
LE_NOT_PERMITTED Message is Read-Only.
LE_BAD_PARAMETER Telephone destination number length is equal to zero.
LE_OK Function succeeded.
Note
If telephone destination number is too long is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[in]destTelephone number string.
le_result_t le_sms_SetPDU ( le_sms_MsgRef_t  msgRef,
const uint8_t *  pduPtr,
size_t  pduNumElements 
)

Set the PDU message content.

Returns
LE_NOT_PERMITTED Message is Read-Only.
LE_BAD_PARAMETER Length of the data is equal to zero.
LE_OK Function succeeded.
Note
If length of the data is too long (max LE_SMS_PDU_MAX_BYTES bytes), it is a fatal error, the function will not return.
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[in]pduPtrPDU message.
[in]pduNumElements
le_result_t le_sms_SetSmsCenterAddress ( const char *  tel)

Set the SMS center address.

SMS center address number is defined in ITU-T recommendations E.164/E.163. E.164 numbers can have a maximum of fifteen digits and are usually written with a '+' prefix.

Returns
  • LE_FAULT Service is not available..
  • LE_OK Function succeeded.
Note
If the SMS center address number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
Parameters
[in]telSMS center address number string.
le_result_t le_sms_SetText ( le_sms_MsgRef_t  msgRef,
const char *  text 
)

This function must be called to set the Text Message content.

Returns
LE_NOT_PERMITTED Message is Read-Only.
LE_BAD_PARAMETER Text message length is equal to zero.
LE_OK Function succeeded.
Note
Text Message is encoded in ASCII format (ISO8859-15) and characters have to exist in the GSM 23.038 7 bit alphabet.
If message is too long (max LE_SMS_TEXT_MAX_LEN digits), it is a fatal error, the function will not return.
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]msgRefReference to the message object.
[in]textSMS text.
le_result_t le_sms_SetTimeout ( le_sms_MsgRef_t  msgRef,
uint32_t  timeout 
)

Set the timeout to send a SMS Message.

Returns
  • LE_FAULT Message is not in UNSENT state or is Read-Only.
  • LE_OK Function succeeded.
Note
On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
Parameters
[in]msgRefReference to the message object.
[in]timeoutTimeout in seconds.