le_sms API Reference

Files

file  le_sms_common.h
 
file  le_sms_interface.h
 

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_UCS2_MAX_BYTES   140
 
#define LE_SMS_UCS2_MAX_CHARS   70
 
#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 struct le_sms_FullStorageEventHandler * le_sms_FullStorageEventHandlerRef_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)
 
typedef void(* le_sms_FullStorageHandlerFunc_t) (le_sms_Storage_t storage, void *contextPtr)
 
typedef void(* le_sms_DisconnectHandler_t) (void *)
 

Enumerations

enum  le_sms_Format_t {
  LE_SMS_FORMAT_PDU = 0, LE_SMS_FORMAT_TEXT = 1, LE_SMS_FORMAT_BINARY = 2, LE_SMS_FORMAT_UCS2 = 3,
  LE_SMS_FORMAT_UNKNOWN = 4
}
 
enum  le_sms_Type_t { LE_SMS_TYPE_RX = 0, LE_SMS_TYPE_TX = 1, LE_SMS_TYPE_BROADCAST_RX = 2, LE_SMS_TYPE_STATUS_REPORT = 3 }
 
enum  le_sms_Status_t {
  LE_SMS_RX_READ = 0, LE_SMS_RX_UNREAD = 1, LE_SMS_STORED_SENT = 2, LE_SMS_STORED_UNSENT = 3,
  LE_SMS_SENT = 4, LE_SMS_SENDING = 5, LE_SMS_UNSENT = 6, LE_SMS_SENDING_FAILED = 7,
  LE_SMS_SENDING_TIMEOUT = 8, LE_SMS_STATUS_UNKNOWN = 9
}
 
enum  le_sms_Languages_t {
  LE_SMS_LANGUAGE_UNKNOWN = 0, LE_SMS_LANGUAGE_ENGLISH = 1, LE_SMS_LANGUAGE_FRENCH = 2, LE_SMS_LANGUAGE_SPANISH = 3,
  LE_SMS_LANGUAGE_JAPANESE = 4, LE_SMS_LANGUAGE_KOREAN = 5, LE_SMS_LANGUAGE_CHINESE = 6, LE_SMS_LANGUAGE_HEBREW = 7,
  LE_SMS_LANGUAGE_MAX = 8
}
 
enum  le_sms_CdmaServiceCat_t {
  LE_SMS_CDMA_SVC_CAT_UNKNOWN = 0, LE_SMS_CDMA_SVC_CAT_EMERGENCY_BROADCAST = 1, LE_SMS_CDMA_SVC_CAT_ADMINISTRATIVE = 2, LE_SMS_CDMA_SVC_CAT_MAINTENANCE = 3,
  LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_LOCAL = 4, LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_REGIONAL = 5, LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_NATIONAL = 6, LE_SMS_CDMA_SVC_CAT_GENERAL_NEWS_INTERNATIONAL = 7,
  LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_LOCAL = 8, LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_REGIONAL = 9, LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_NATIONAL = 10, LE_SMS_CDMA_SVC_CAT_BUSINESS_NEWS_INTERNATIONAL = 11,
  LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_LOCAL = 12, LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_REGIONAL = 13, LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_NATIONAL = 14, LE_SMS_CDMA_SVC_CAT_SPORTS_NEWS_INTERNATIONAL = 15,
  LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_LOCAL = 16, LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_REGIONAL = 17, LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_NATIONAL = 18, LE_SMS_CDMA_SVC_CAT_ENTERTAINMENT_NEWS_INTERNATIONAL = 19,
  LE_SMS_CDMA_SVC_CAT_LOCAL_WEATHER = 20, LE_SMS_CDMA_SVC_CAT_TRAFFIC_REPORTS = 21, LE_SMS_CDMA_SVC_CAT_LOCAL_FLIGHT_SCHEDULES = 22, LE_SMS_CDMA_SVC_CAT_RESTAURANTS = 23,
  LE_SMS_CDMA_SVC_CAT_LODGINGS = 24, LE_SMS_CDMA_SVC_CAT_RETAIL_DIRECTORY = 25, LE_SMS_CDMA_SVC_CAT_ADVERTISEMENTS = 26, LE_SMS_CDMA_SVC_CAT_STOCK_QUOTES = 27,
  LE_SMS_CDMA_SVC_CAT_EMPLOYMENT_OPPORTUNITIES = 28, LE_SMS_CDMA_SVC_CAT_MEDICAL = 29, LE_SMS_CDMA_SVC_CAT_TECHNOLOGY_NEWS = 30, LE_SMS_CDMA_SVC_CAT_MULTI_CAT = 31,
  LE_SMS_CDMA_SVC_CAT_CATPT = 32, LE_SMS_CDMA_SVC_CAT_MAX = 33
}
 
enum  le_sms_Storage_t { LE_SMS_STORAGE_NV = 0, LE_SMS_STORAGE_SIM = 1, LE_SMS_STORAGE_MAX = 2 }
 
enum  le_sms_ErrorCode3GPP2_t {
  LE_SMS_ERROR_ADDR_VACANT = 0, LE_SMS_ERROR_ADDR_TRANSLATION_FAILURE = 1, LE_SMS_ERROR_NETWORK_RESOURCE_SHORTAGE = 2, LE_SMS_ERROR_NETWORK_FAILURE = 3,
  LE_SMS_ERROR_INVALID_TELESERVICE_ID = 4, LE_SMS_ERROR_NETWORK_OTHER = 5, LE_SMS_ERROR_NO_PAGE_RESPONSE = 6, LE_SMS_ERROR_DEST_BUSY = 7,
  LE_SMS_ERROR_NO_ACK = 8, LE_SMS_ERROR_DEST_RESOURCE_SHORTAGE = 9, LE_SMS_ERROR_SMS_DELIVERY_POSTPONED = 10, LE_SMS_ERROR_DEST_OUT_OF_SERV = 11,
  LE_SMS_ERROR_DEST_NOT_AT_ADDR = 12, LE_SMS_ERROR_DEST_OTHER = 13, LE_SMS_ERROR_RADIO_IF_RESOURCE_SHORTAGE = 14, LE_SMS_ERROR_RADIO_IF_INCOMPATABILITY = 15,
  LE_SMS_ERROR_RADIO_IF_OTHER = 16, LE_SMS_ERROR_ENCODING = 17, LE_SMS_ERROR_SMS_ORIG_DENIED = 18, LE_SMS_ERROR_SMS_TERM_DENIED = 19,
  LE_SMS_ERROR_SUPP_SERV_NOT_SUPP = 20, LE_SMS_ERROR_SMS_NOT_SUPP = 21, LE_SMS_ERROR_MISSING_EXPECTED_PARAM = 22, LE_SMS_ERROR_MISSING_MAND_PARAM = 23,
  LE_SMS_ERROR_UNRECOGNIZED_PARAM_VAL = 24, LE_SMS_ERROR_UNEXPECTED_PARAM_VAL = 25, LE_SMS_ERROR_USER_DATA_SIZE_ERR = 26, LE_SMS_ERROR_GENERAL_OTHER = 27,
  LE_SMS_ERROR_3GPP2_PLATFORM_SPECIFIC = 28, LE_SMS_ERROR_3GPP2_MAX = 29
}
 
enum  le_sms_ErrorCode_t {
  LE_SMS_RP_ERROR_UNASSIGNED_NUMBER = 0, LE_SMS_RP_ERROR_OPERATOR_DETERMINED_BARRING = 1, LE_SMS_RP_ERROR_CALL_BARRED = 2, LE_SMS_RP_ERROR_RESERVED = 3,
  LE_SMS_RP_ERROR_SMS_TRANSFER_REJECTED = 4, LE_SMS_RP_ERROR_MEMORY_CAP_EXCEEDED = 5, LE_SMS_RP_ERROR_DESTINATION_OUT_OF_ORDER = 6, LE_SMS_RP_ERROR_UNIDENTIFIED_SUBSCRIBER = 7,
  LE_SMS_RP_ERROR_FACILITY_REJECTED = 8, LE_SMS_RP_ERROR_UNKNOWN_SUBSCRIBER = 9, LE_SMS_RP_ERROR_NETWORK_OUT_OF_ORDER = 10, LE_SMS_RP_ERROR_TEMPORARY_FAILURE = 11,
  LE_SMS_RP_ERROR_CONGESTION = 12, LE_SMS_RP_ERROR_RESOURCES_UNAVAILABLE = 13, LE_SMS_RP_ERROR_REQUESTED_FACILITY_NOT_SUBSCRIBED = 14, LE_SMS_RP_ERROR_REQUESTED_FACILITY_NOT_IMPLEMENTED = 15,
  LE_SMS_RP_ERROR_INVALID_SMS_TRANSFER_REFERENCE_VALUE = 16, LE_SMS_RP_ERROR_SEMANTICALLY_INCORRECT_MESSAGE = 17, LE_SMS_RP_ERROR_INVALID_MANDATORY_INFO = 18, LE_SMS_RP_ERROR_MESSAGE_TYPE_NOT_IMPLEMENTED = 19,
  LE_SMS_RP_ERROR_MESSAGE_NOT_COMPATABLE_WITH_SMS = 20, LE_SMS_RP_ERROR_INFO_ELEMENT_NOT_IMPLEMENTED = 21, LE_SMS_RP_ERROR_PROTOCOL_ERROR = 22, LE_SMS_RP_ERROR_INTERWORKING = 23,
  LE_SMS_TP_ERROR_TELE_INTERWORKING_NOT_SUPPORTED = 24, LE_SMS_TP_ERROR_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED = 25, LE_SMS_TP_ERROR_SHORT_MESSAGE_CANNOT_BE_REPLACED = 26, LE_SMS_TP_ERROR_UNSPECIFIED_PID_ERROR = 27,
  LE_SMS_TP_ERROR_DCS_NOT_SUPPORTED = 28, LE_SMS_TP_ERROR_MESSAGE_CLASS_NOT_SUPPORTED = 29, LE_SMS_TP_ERROR_UNSPECIFIED_DCS_ERROR = 30, LE_SMS_TP_ERROR_COMMAND_CANNOT_BE_ACTIONED = 31,
  LE_SMS_TP_ERROR_COMMAND_UNSUPPORTED = 32, LE_SMS_TP_ERROR_UNSPECIFIED_COMMAND_ERROR = 33, LE_SMS_TP_ERROR_TPDU_NOT_SUPPORTED = 34, LE_SMS_TP_ERROR_SC_BUSY = 35,
  LE_SMS_TP_ERROR_NO_SC_SUBSCRIPTION = 36, LE_SMS_TP_ERROR_SC_SYS_FAILURE = 37, LE_SMS_TP_ERROR_INVALID_SME_ADDRESS = 38, LE_SMS_TP_ERROR_DESTINATION_SME_BARRED = 39,
  LE_SMS_TP_ERROR_SM_REJECTED_OR_DUPLICATE = 40, LE_SMS_TP_ERROR_TP_VPF_NOT_SUPPORTED = 41, LE_SMS_TP_ERROR_TP_VP_NOT_SUPPORTED = 42, LE_SMS_TP_ERROR_SIM_SMS_STORAGE_FULL = 43,
  LE_SMS_TP_ERROR_NO_SMS_STORAGE_CAP_IN_SIM = 44, LE_SMS_TP_ERROR_MS_ERROR = 45, LE_SMS_TP_ERROR_MEMORY_CAP_EXCEEDED = 46, LE_SMS_TP_ERROR_SIM_APP_TOOLKIT_BUSY = 47,
  LE_SMS_TP_ERROR_SIM_DATA_DOWNLOAD_ERROR = 48, LE_SMS_TP_ERROR_UNSPECIFIED_ERROR = 49, LE_SMS_ERROR_3GPP_PLATFORM_SPECIFIC = 50, LE_SMS_ERROR_3GPP_MAX = 51
}
 

Functions

void le_sms_ConnectService (void)
 
le_result_t le_sms_TryConnectService (void)
 
LE_FULL_API void le_sms_SetServerDisconnectHandler (le_sms_DisconnectHandler_t disconnectHandler, void *contextPtr)
 
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 handlerRef)
 
le_sms_FullStorageEventHandlerRef_t le_sms_AddFullStorageEventHandler (le_sms_FullStorageHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_sms_RemoveFullStorageEventHandler (le_sms_FullStorageEventHandlerRef_t handlerRef)
 
le_sms_MsgRef_t le_sms_Create (void)
 
le_result_t le_sms_SetDestination (le_sms_MsgRef_t msgRef, const char *LE_NONNULL dest)
 
le_result_t le_sms_SetText (le_sms_MsgRef_t msgRef, const char *LE_NONNULL text)
 
le_result_t le_sms_SetBinary (le_sms_MsgRef_t msgRef, const uint8_t *binPtr, size_t binSize)
 
le_result_t le_sms_SetUCS2 (le_sms_MsgRef_t msgRef, const uint16_t *ucs2Ptr, size_t ucs2Size)
 
le_result_t le_sms_SetPDU (le_sms_MsgRef_t msgRef, const uint8_t *pduPtr, size_t pduSize)
 
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 *LE_NONNULL destStr, const char *LE_NONNULL textStr, le_sms_CallbackResultFunc_t handlerPtr, void *contextPtr)
 
le_sms_MsgRef_t le_sms_SendPdu (const uint8_t *pduPtr, size_t pduSize, 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 telSize)
 
le_result_t le_sms_GetTimeStamp (le_sms_MsgRef_t msgRef, char *timestamp, size_t timestampSize)
 
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 textSize)
 
le_result_t le_sms_GetBinary (le_sms_MsgRef_t msgRef, uint8_t *binPtr, size_t *binSizePtr)
 
le_result_t le_sms_GetUCS2 (le_sms_MsgRef_t msgRef, uint16_t *ucs2Ptr, size_t *ucs2SizePtr)
 
le_result_t le_sms_GetPDU (le_sms_MsgRef_t msgRef, uint8_t *pduPtr, size_t *pduSizePtr)
 
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 telSize)
 
le_result_t le_sms_SetSmsCenterAddress (const char *LE_NONNULL tel)
 
le_result_t le_sms_SetPreferredStorage (le_sms_Storage_t prefStorage)
 
le_result_t le_sms_GetPreferredStorage (le_sms_Storage_t *prefStoragePtr)
 
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)
 
le_result_t le_sms_GetCount (le_sms_Type_t messageType, int32_t *messageCountPtr)
 
void le_sms_StartCount (void)
 
void le_sms_StopCount (void)
 
void le_sms_ResetCount (void)
 
le_result_t le_sms_EnableStatusReport (void)
 
le_result_t le_sms_DisableStatusReport (void)
 
le_result_t le_sms_IsStatusReportEnabled (bool *enabledPtr)
 
le_result_t le_sms_GetTpMr (le_sms_MsgRef_t msgRef, uint8_t *tpMrPtr)
 
le_result_t le_sms_GetTpRa (le_sms_MsgRef_t msgRef, uint8_t *toraPtr, char *ra, size_t raSize)
 
le_result_t le_sms_GetTpScTs (le_sms_MsgRef_t msgRef, char *scts, size_t sctsSize)
 
le_result_t le_sms_GetTpDt (le_sms_MsgRef_t msgRef, char *dt, size_t dtSize)
 
le_result_t le_sms_GetTpSt (le_sms_MsgRef_t msgRef, uint8_t *stPtr)
 

Detailed Description

Macro Definition Documentation

◆ LE_SMS_BINARY_MAX_BYTES

#define LE_SMS_BINARY_MAX_BYTES   140

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

◆ LE_SMS_PDU_MAX_BYTES

#define LE_SMS_PDU_MAX_BYTES   176

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

◆ LE_SMS_PDU_MAX_PAYLOAD

#define LE_SMS_PDU_MAX_PAYLOAD   140

The PDU payload bytes long.

◆ LE_SMS_TEXT_MAX_BYTES

#define LE_SMS_TEXT_MAX_BYTES   161

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

◆ LE_SMS_TEXT_MAX_LEN

#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.

◆ LE_SMS_TIMESTAMP_MAX_BYTES

#define LE_SMS_TIMESTAMP_MAX_BYTES   21

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

◆ LE_SMS_TIMESTAMP_MAX_LEN

#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.

◆ LE_SMS_UCS2_MAX_BYTES

#define LE_SMS_UCS2_MAX_BYTES   140

The UCS2 message can be up to 140 bytes long (70 characters).

◆ LE_SMS_UCS2_MAX_CHARS

#define LE_SMS_UCS2_MAX_CHARS   70

The UCS2 message can be up to 70 characters (140 bytes long).

Typedef Documentation

◆ le_sms_CallbackResultFunc_t

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

Handler for Sending result.

◆ le_sms_DisconnectHandler_t

typedef void(* le_sms_DisconnectHandler_t) (void *)

Type for handler called when a server disconnects.

◆ le_sms_FullStorageEventHandlerRef_t

typedef struct le_sms_FullStorageEventHandler* le_sms_FullStorageEventHandlerRef_t

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

◆ le_sms_FullStorageHandlerFunc_t

typedef void(* le_sms_FullStorageHandlerFunc_t) (le_sms_Storage_t storage, void *contextPtr)

Handler for full storage indication.

◆ le_sms_MsgListRef_t

typedef struct le_sms_MsgList* le_sms_MsgListRef_t

Opaque type for SMS Message Listing.

◆ le_sms_MsgRef_t

typedef struct le_sms_Msg* le_sms_MsgRef_t

Declare a reference type for referring to SMS Message objects.

◆ le_sms_RxMessageHandlerFunc_t

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

Handler for New Message.

◆ le_sms_RxMessageHandlerRef_t

typedef struct le_sms_RxMessageHandler* le_sms_RxMessageHandlerRef_t

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

Enumeration Type Documentation

◆ le_sms_CdmaServiceCat_t

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.

◆ le_sms_ErrorCode3GPP2_t

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.

◆ le_sms_ErrorCode_t

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.

◆ le_sms_Format_t

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_UCS2 

UCS2 message format.

LE_SMS_FORMAT_UNKNOWN 

Unknown message format.

◆ le_sms_Languages_t

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.

◆ le_sms_Status_t

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.

◆ le_sms_Storage_t

SMS storage area.

Enumerator
LE_SMS_STORAGE_NV 

Non volatile memory storage.

LE_SMS_STORAGE_SIM 

Sim SMS storage.

LE_SMS_STORAGE_MAX 

Undefined storage.

◆ le_sms_Type_t

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.

LE_SMS_TYPE_STATUS_REPORT 

SMS Status Report.

Function Documentation

◆ le_sms_ActivateCdmaCellBroadcast()

le_result_t le_sms_ActivateCdmaCellBroadcast ( void  )

Activate CDMA Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.

◆ le_sms_ActivateCellBroadcast()

le_result_t le_sms_ActivateCellBroadcast ( void  )

Activate Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.

◆ le_sms_AddCdmaCellBroadcastServices()

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_sms_AddCellBroadcastIds()

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_AddFullStorageEventHandler()

le_sms_FullStorageEventHandlerRef_t le_sms_AddFullStorageEventHandler ( le_sms_FullStorageHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_sms_FullStorageEvent'

This event provides information on full storage indication.

Parameters
[in]handlerPtr
[in]contextPtr

◆ le_sms_AddRxMessageHandler()

le_sms_RxMessageHandlerRef_t le_sms_AddRxMessageHandler ( le_sms_RxMessageHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Message Format. Message Type. Message Status. CDMA Cell broadcast message languages. CDMA Cell broadcast Service Categories. SMS storage area. 3GPP2 Message Error code when the message sending has failed. Message Error code when the message sending has failed. Declare a reference type for referring to SMS Message objects. Opaque type for SMS Message Listing. Handler for Sending result. Handler for New Message. Reference type used by Add/Remove functions for EVENT 'le_sms_RxMessage' Handler for full storage indication. Reference type used by Add/Remove functions for EVENT 'le_sms_FullStorageEvent' Add handler function for EVENT 'le_sms_RxMessage'

This event provides information on new received messages.

Parameters
[in]handlerPtr
[in]contextPtr

◆ le_sms_ClearCdmaCellBroadcastServices()

le_result_t le_sms_ClearCdmaCellBroadcastServices ( void  )

Clear CDMA Cell Broadcast category services.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.

◆ le_sms_ClearCellBroadcastIds()

le_result_t le_sms_ClearCellBroadcastIds ( void  )

Clear Cell Broadcast message Identifiers.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.

◆ le_sms_ConnectService()

void le_sms_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_sms_Create()

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_CreateRxMsgList()

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_sms_DeactivateCdmaCellBroadcast()

le_result_t le_sms_DeactivateCdmaCellBroadcast ( void  )

Deactivate CDMA Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.

◆ le_sms_DeactivateCellBroadcast()

le_result_t le_sms_DeactivateCellBroadcast ( void  )

Deactivate Cell Broadcast message notification

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.

◆ le_sms_Delete()

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_sms_DeleteFromStorage()

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 The message is not present in storage area.
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.

◆ le_sms_DeleteList()

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.

◆ le_sms_DisableStatusReport()

le_result_t le_sms_DisableStatusReport ( void  )

Disable SMS Status Report for outgoing messages.

Returns
  • LE_OK Function succeeded.
  • LE_FAULT Function failed.

◆ le_sms_DisconnectService()

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_EnableStatusReport()

le_result_t le_sms_EnableStatusReport ( void  )

Enable SMS Status Report for outgoing messages.

Returns
  • LE_OK Function succeeded.
  • LE_FAULT Function failed.

◆ le_sms_Get3GPP2ErrorCode()

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_sms_GetBinary()

le_result_t le_sms_GetBinary ( le_sms_MsgRef_t  msgRef,
uint8_t *  binPtr,
size_t *  binSizePtr 
)

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]binSizePtr

◆ le_sms_GetCellBroadcastId()

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_sms_GetCellBroadcastSerialNumber()

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.

◆ le_sms_GetCount()

le_result_t le_sms_GetCount ( le_sms_Type_t  messageType,
int32_t *  messageCountPtr 
)

Get the number of messages successfully received or sent since last counter reset.

Returns
  • LE_OK Function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]messageTypeMessage type
[out]messageCountPtrNumber of messages

◆ le_sms_GetErrorCode()

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_GetFirst()

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_GetFormat()

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.
Parameters
[in]msgRefReference to the message object.

◆ le_sms_GetNext()

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_sms_GetPDU()

le_result_t le_sms_GetPDU ( le_sms_MsgRef_t  msgRef,
uint8_t *  pduPtr,
size_t *  pduSizePtr 
)

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]pduSizePtr

◆ le_sms_GetPDULen()

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.

◆ le_sms_GetPlatformSpecificErrorCode()

int32_t le_sms_GetPlatformSpecificErrorCode ( le_sms_MsgRef_t  msgRef)

Called to get the platform specific error code.

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

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_sms_GetPreferredStorage()

le_result_t le_sms_GetPreferredStorage ( le_sms_Storage_t prefStoragePtr)

Get the preferred SMS storage for incoming messages.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
Parameters
[out]prefStoragePtrstorage parameter.

◆ le_sms_GetSenderTel()

le_result_t le_sms_GetSenderTel ( le_sms_MsgRef_t  msgRef,
char *  tel,
size_t  telSize 
)

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]telSize

◆ le_sms_GetSmsCenterAddress()

le_result_t le_sms_GetSmsCenterAddress ( char *  tel,
size_t  telSize 
)

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]telSize

◆ le_sms_GetStatus()

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_sms_GetText()

le_result_t le_sms_GetText ( le_sms_MsgRef_t  msgRef,
char *  text,
size_t  textSize 
)

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]textSize

◆ le_sms_GetTimeStamp()

le_result_t le_sms_GetTimeStamp ( le_sms_MsgRef_t  msgRef,
char *  timestamp,
size_t  timestampSize 
)

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) The time zone indicates the difference, expressed in quarters of an hours between the local time and GMT.
[in]timestampSize

◆ le_sms_GetTpDt()

le_result_t le_sms_GetTpDt ( le_sms_MsgRef_t  msgRef,
char *  dt,
size_t  dtSize 
)

Get TP-Discharge-Time of SMS Status Report. TP-Discharge-Time is defined in 3GPP TS 23.040 section 9.2.3.13.

Returns
  • LE_OK Function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_OVERFLOW The Discharge Time length exceeds the length of the provided buffer.
  • LE_FAULT Function failed.
Parameters
[in]msgRefReference to the message object.
[out]dt3GPP TS 23.040 TP-Discharge-Time.
[in]dtSize

◆ le_sms_GetTpMr()

le_result_t le_sms_GetTpMr ( le_sms_MsgRef_t  msgRef,
uint8_t *  tpMrPtr 
)

Get TP-Message-Reference of a message. Message type should be either a SMS Status Report or an outgoing SMS. TP-Message-Reference is defined in 3GPP TS 23.040 section 9.2.3.6.

Returns
  • LE_OK Function succeeded.
  • LE_BAD_PARAMETER Parameter is invalid.
  • LE_FAULT Function failed.
  • LE_UNAVAILABLE Outgoing SMS message is not sent.
Parameters
[in]msgRefReference to the message object.
[out]tpMrPtr3GPP TS 23.040 TP-Message-Reference.

◆ le_sms_GetTpRa()

le_result_t le_sms_GetTpRa ( le_sms_MsgRef_t  msgRef,
uint8_t *  toraPtr,
char *  ra,
size_t  raSize 
)

Get TP-Recipient-Address of SMS Status Report. TP-Recipient-Address is defined in 3GPP TS 23.040 section 9.2.3.14. TP-Recipient-Address Type-of-Address is defined in 3GPP TS 24.011 section 8.2.5.2.

Returns
  • LE_OK Function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_OVERFLOW The Recipient Address length exceeds the length of the provided buffer.
  • LE_FAULT Function failed.
Parameters
[in]msgRefReference to the message object.
[out]toraPtr3GPP TS 24.011 TP-Recipient-Address Type-of-Address.
[out]ra3GPP TS 23.040 TP-Recipient-Address.
[in]raSize

◆ le_sms_GetTpScTs()

le_result_t le_sms_GetTpScTs ( le_sms_MsgRef_t  msgRef,
char *  scts,
size_t  sctsSize 
)

Get TP-Service-Centre-Time-Stamp of SMS Status Report. TP-Service-Centre-Time-Stamp is defined in 3GPP TS 23.040 section 9.2.3.11.

Returns
  • LE_OK Function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_OVERFLOW The SC Timestamp length exceeds the length of the provided buffer.
  • LE_FAULT Function failed.
Parameters
[in]msgRefReference to the message object.
[out]scts3GPP TS 23.040 TP-Service-Centre-Time-Stamp.
[in]sctsSize

◆ le_sms_GetTpSt()

le_result_t le_sms_GetTpSt ( le_sms_MsgRef_t  msgRef,
uint8_t *  stPtr 
)

Get TP-Status of SMS Status Report. TP-Status is defined in 3GPP TS 23.040 section 9.2.3.15.

Returns
  • LE_OK Function succeeded.
  • LE_BAD_PARAMETER A parameter is invalid.
  • LE_FAULT Function failed.
Parameters
[in]msgRefReference to the message object.
[out]stPtr3GPP TS 23.040 TP-Status.

◆ le_sms_GetType()

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.

◆ le_sms_GetUCS2()

le_result_t le_sms_GetUCS2 ( le_sms_MsgRef_t  msgRef,
uint16_t *  ucs2Ptr,
size_t *  ucs2SizePtr 
)

Get the UCS2 Message (16-bit format).

Output parameters are updated with the UCS2 message content and the number of characters. If the UCS2 data exceed the value of the length input parameter, a LE_OVERFLOW error code is returned and 'ucs2Ptr' is filled until of the number of chars specified.

Returns
  • LE_FORMAT_ERROR Message is not in binary format
  • LE_OVERFLOW Message length exceed the maximum length.
  • LE_OK Function succeeded.
Parameters
[in]msgRefReference to the message object.
[out]ucs2PtrUCS2 message.
[in,out]ucs2SizePtr

◆ le_sms_GetUserdataLen()

size_t le_sms_GetUserdataLen ( le_sms_MsgRef_t  msgRef)

Get the message Length value.

Returns
Number of characters for text and UCS2 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.

◆ le_sms_IsStatusReportEnabled()

le_result_t le_sms_IsStatusReportEnabled ( bool *  enabledPtr)

Get SMS Status Report activation state.

Returns
  • LE_OK Function succeeded.
  • LE_BAD_PARAMETER Parameter is invalid.
  • LE_FAULT Function failed.
Parameters
[out]enabledPtrTrue when SMS Status Report is enabled, false otherwise.

◆ le_sms_MarkRead()

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.

◆ le_sms_MarkUnread()

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_sms_RemoveCdmaCellBroadcastServices()

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_sms_RemoveCellBroadcastIds()

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.

◆ le_sms_RemoveFullStorageEventHandler()

void le_sms_RemoveFullStorageEventHandler ( le_sms_FullStorageEventHandlerRef_t  handlerRef)

Remove handler function for EVENT 'le_sms_FullStorageEvent'

Parameters
[in]handlerRef

◆ le_sms_RemoveRxMessageHandler()

void le_sms_RemoveRxMessageHandler ( le_sms_RxMessageHandlerRef_t  handlerRef)

Remove handler function for EVENT 'le_sms_RxMessage'

Parameters
[in]handlerRef

◆ le_sms_ResetCount()

void le_sms_ResetCount ( void  )

Reset the count of messages successfully received and sent.

◆ le_sms_Send()

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_sms_SendAsync()

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]handlerPtrCallBack for sending result.
[in]contextPtr

◆ le_sms_SendPdu()

le_sms_MsgRef_t le_sms_SendPdu ( const uint8_t *  pduPtr,
size_t  pduSize,
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]pduSize
[in]handlerPtrCallBack for sending result.
[in]contextPtr

◆ le_sms_SendText()

le_sms_MsgRef_t le_sms_SendText ( const char *LE_NONNULL  destStr,
const char *LE_NONNULL  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]handlerPtrCallBack for sending result.
[in]contextPtr

◆ le_sms_SetBinary()

le_result_t le_sms_SetBinary ( le_sms_MsgRef_t  msgRef,
const uint8_t *  binPtr,
size_t  binSize 
)

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]binSize

◆ le_sms_SetDestination()

le_result_t le_sms_SetDestination ( le_sms_MsgRef_t  msgRef,
const char *LE_NONNULL  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_sms_SetPDU()

le_result_t le_sms_SetPDU ( le_sms_MsgRef_t  msgRef,
const uint8_t *  pduPtr,
size_t  pduSize 
)

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]pduSize

◆ le_sms_SetPreferredStorage()

le_result_t le_sms_SetPreferredStorage ( le_sms_Storage_t  prefStorage)

Set the preferred SMS storage for incoming messages.

Returns
  • LE_FAULT Function failed.
  • LE_OK Function succeeded.
Parameters
[in]prefStoragestorage parameter.

◆ le_sms_SetServerDisconnectHandler()

LE_FULL_API void le_sms_SetServerDisconnectHandler ( le_sms_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_sms_SetSmsCenterAddress()

le_result_t le_sms_SetSmsCenterAddress ( const char *LE_NONNULL  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_sms_SetText()

le_result_t le_sms_SetText ( le_sms_MsgRef_t  msgRef,
const char *LE_NONNULL  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_sms_SetUCS2()

le_result_t le_sms_SetUCS2 ( le_sms_MsgRef_t  msgRef,
const uint16_t *  ucs2Ptr,
size_t  ucs2Size 
)

Set the UCS2 message content (16-bit format).

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_UCS2_MAX_CHARS), 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]ucs2PtrUCS2 message.
[in]ucs2Size

◆ le_sms_StartCount()

void le_sms_StartCount ( void  )

Start to count the messages successfully received and sent.

◆ le_sms_StopCount()

void le_sms_StopCount ( void  )

Stop to count the messages successfully received and sent.

◆ le_sms_TryConnectService()

le_result_t le_sms_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.