Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] atmodem/sms: added vendor Gemalto support.
@ 2018-09-23  5:31 Giacinto Cifelli
  2018-09-24 21:04 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Giacinto Cifelli @ 2018-09-23  5:31 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]

Cinterion and Gemalto overlap for now, but
eventually Cinterion will be removed.
---
 drivers/atmodem/sms.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
index fb4d67ae..7944c4e4 100644
--- a/drivers/atmodem/sms.c
+++ b/drivers/atmodem/sms.c
@@ -219,10 +219,16 @@ static void at_cmgs(struct ofono_sms *sms, const unsigned char *pdu,
 	char buf[512];
 	int len;
 
-	if (mms) {
-		snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
-		g_at_chat_send(data->chat, buf, none_prefix,
-				NULL, NULL, NULL);
+	switch(data->vendor) {
+	case OFONO_VENDOR_GEMALTO:
+		break;
+	default:
+		if (mms) {
+			snprintf(buf, sizeof(buf), "AT+CMMS=%d", mms);
+			g_at_chat_send(data->chat, buf, none_prefix,
+					NULL, NULL, NULL);
+		}
+		break;
 	}
 
 	len = snprintf(buf, sizeof(buf), "AT+CMGS=%d\r", tpdu_len);
@@ -330,6 +336,7 @@ static inline void at_ack_delivery(struct ofono_sms *sms)
 	if (data->cnma_ack_pdu) {
 		switch (data->vendor) {
 		case OFONO_VENDOR_CINTERION:
+		case OFONO_VENDOR_GEMALTO:
 			snprintf(buf, sizeof(buf), "AT+CNMA=1");
 			break;
 		default:
@@ -412,9 +419,10 @@ static void at_cmt_notify(GAtResult *result, gpointer user_data)
 
 	switch (data->vendor) {
 	case OFONO_VENDOR_CINTERION:
+	case OFONO_VENDOR_GEMALTO:
 		if (!g_at_result_iter_next_number(&iter, &tpdu_len)) {
 			/*
-			 * Some cinterions modems (ALS3,PLS8...), act in
+			 * Some Gemalto modems (ALS3,PLS8...), act in
 			 * accordance with 3GPP 27.005.  So we need to skip
 			 * the first (<alpha>) field
 			 *  \r\n+CMT: ,23\r\nCAFECAFECAFE... ...\r\n
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] atmodem/sms: added vendor Gemalto support.
  2018-09-23  5:31 [PATCH] atmodem/sms: added vendor Gemalto support Giacinto Cifelli
@ 2018-09-24 21:04 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2018-09-24 21:04 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]



On 09/23/2018 12:31 AM, Giacinto Cifelli wrote:
> Cinterion and Gemalto overlap for now, but
> eventually Cinterion will be removed.

Yes, but some explanation of why CMMS is being taken out for gemalto 
(but not cinterion?) devices might be nice.

> ---
>   drivers/atmodem/sms.c | 18 +++++++++++++-----
>   1 file changed, 13 insertions(+), 5 deletions(-)
> 

And again, do you want to fix the modem drivers as well?

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-24 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-23  5:31 [PATCH] atmodem/sms: added vendor Gemalto support Giacinto Cifelli
2018-09-24 21:04 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox