diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c index 7f12fbdb..6ffee982 100644 --- a/drivers/isimodem/sms.c +++ b/drivers/isimodem/sms.c @@ -473,30 +473,27 @@ static gboolean submit_tpdu(GIsiClient *client, unsigned char *pdu, int pdu_len, 0, /* Repeated message */ 0, 0, /* Filler */ 2, /* Subblock count */ + ISI_16BIT(SMS_SB_SMS_PARAMETERS), + ISI_16BIT(8), /* Subblock length */ + SMS_PARAMETER_LOCATION_DEFAULT, + SMS_PI_SERVICE_CENTER_ADDRESS, + 0, 0, /* Filler */ ISI_16BIT(SMS_SB_TPDU), ISI_16BIT(tpdu_sb_len), tpdu_len, 0, /* Filler */ /* Databytes aligned to next 32bit boundary */ }; - uint8_t params[] = { - ISI_16BIT(SMS_SB_SMS_PARAMETERS), - ISI_16BIT(8), /* Subblock length */ - 1, /* Location number */ - SMS_PI_SERVICE_CENTER_ADDRESS, - 0, 0, /* Filler */ - }; uint8_t padding[4] = { 0 }; - struct iovec iov[4] = { + struct iovec iov[3] = { { hdr, sizeof(hdr) }, { pdu + pdu_len - tpdu_len, tpdu_len }, { padding, tpdu_pad_len }, - { params, sizeof(params) }, }; /* FIXME: Missing SB for SCA if provided */ - return g_isi_client_vsend_with_timeout(client, iov, 4, SMS_TIMEOUT, + return g_isi_client_vsend_with_timeout(client, iov, 3, SMS_TIMEOUT, submit_tpdu_resp_cb, data, notify); } diff --git a/drivers/isimodem/sms.h b/drivers/isimodem/sms.h index 67bcb87e..ab29463d 100644 --- a/drivers/isimodem/sms.h +++ b/drivers/isimodem/sms.h @@ -234,6 +234,10 @@ enum sms_parameter_indicator { SMS_PI_VALIDITY_PERIOD = 0x10, }; +enum sms_parameter_location { + SMS_PARAMETER_LOCATION_DEFAULT = 0x00, +}; + #ifdef __cplusplus }; #endif