nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ sms_send()

int sms_send ( const char * number,
const uint8_t * data,
uint16_t data_len,
enum sms_data_type type )

#include <include/modem/sms.h>

Send SMS message in given message type.

The message is sent with GSM 7bit encoding used to encode textual SMS messages. SMS-SUBMIT message is specified in 3GPP TS 23.040 Section 9.2.2.2 and data encoding in 3GPP TS 23.038 Section 4 and Section 6.2.

If type is set to SMS_DATA_TYPE_GSM7BIT, input data is treated as string of hexadecimal characters where each pair of two characters form a single byte. Those bytes are treated as GSM 7 bit Default Alphabet as specified in 3GPP TS 23.038 Section 6.2.

This function does not support sending of 8 bit binary data messages or UCS2 encoded text.

Concatenated messages are not supported in this function.

Parameters
[in]numberRecipient number in international format. Maximum length is 20 characters.
[in]dataData to be sent.
[in]data_lenData length.
[in]typeInput data type.
Return values
-EINVALInvalid parameter.
-E2BIGToo much data.
Returns
0 on success, otherwise error code. A positive value on AT error with "ERROR", "+CME ERROR", and "+CMS ERROR" responses. The type can be resolved with nrf_modem_at_err_type and the error value with nrf_modem_at_err.