Open Source Telephony
 help / color / mirror / Atom feed
From: Piotr Haber <gluedig@gmail.com>
To: ofono@ofono.org
Subject: [PATCH 3/3] xe910: support for Telit LE910V2 modem
Date: Fri, 27 Jan 2017 10:54:24 +0100	[thread overview]
Message-ID: <20170127095424.19685-4-gluedig@gmail.com> (raw)
In-Reply-To: <20170127095424.19685-1-gluedig@gmail.com>

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

LE910V2 is next generation Telit LTE modem.
It supports 3GPP Rel. 9 LTE Cat. 4 over multiple bands.
---
 plugins/xe910.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/plugins/xe910.c b/plugins/xe910.c
index 170a6b08..bf40a3de 100644
--- a/plugins/xe910.c
+++ b/plugins/xe910.c
@@ -64,7 +64,8 @@ static const char *qss_prefix[] = { "#QSS:", NULL };
 
 enum modem_model {
 	HE910 = 1,
-	UE910
+	UE910,
+	LE910
 };
 
 static struct {
@@ -84,6 +85,7 @@ static struct {
 	{ UE910,	NULL,	FALSE,	FALSE },
 	{ UE910,	"EUR",	TRUE,	FALSE },
 	{ UE910,	"NAR",	TRUE,	FALSE },
+	{ LE910,	NULL,	FALSE,	FALSE },
 	{ }
 };
 
@@ -297,6 +299,8 @@ static gboolean find_model_variant(struct ofono_modem *modem,
 		data->model = HE910;
 	else if (g_str_equal(model, "UE910"))
 		data->model = UE910;
+	else if (g_str_equal(model, "LE910"))
+		data->model = LE910;
 	else
 		return FALSE;
 
@@ -385,6 +389,8 @@ static int xe910_enable(struct ofono_modem *modem)
 	 */
 	g_at_chat_send(data->chat, "ATE0 +CMEE=1", none_prefix,
 				NULL, NULL, NULL);
+	g_at_chat_send(data->modem, "ATE0", none_prefix,
+				NULL, NULL, NULL);
 
 
 	/* Get modem model and variant */
@@ -472,7 +478,13 @@ static void xe910_post_online(struct ofono_modem *modem)
 
 	gprs = ofono_gprs_create(modem, OFONO_VENDOR_TELIT, "atmodem",
 					data->chat);
-	gc = ofono_gprs_context_create(modem, 0, "atmodem", data->modem);
+
+	if (data->model == LE910)
+		gc = ofono_gprs_context_create(modem, OFONO_VENDOR_TELIT,
+						"telitncmmodem", data->modem);
+	else
+		gc = ofono_gprs_context_create(modem, 0, "atmodem",
+						data->modem);
 
 	if (gprs && gc)
 		ofono_gprs_add_context(gprs, gc);
-- 
2.11.0


  parent reply	other threads:[~2017-01-27  9:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27  9:54 [PATCH 0/3] support Telit LE910 V2 modem Piotr Haber
2017-01-27  9:54 ` [PATCH 1/3] telitmodem: support for CDC-NCM network adapter Piotr Haber
2017-01-28  2:36   ` Denis Kenzior
2017-01-27  9:54 ` [PATCH 2/3] udevng: setup of Telit LE910V2 Piotr Haber
2017-01-28  2:30   ` Denis Kenzior
2017-01-27  9:54 ` Piotr Haber [this message]
2017-01-28  2:37   ` [PATCH 3/3] xe910: support for Telit LE910V2 modem Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170127095424.19685-4-gluedig@gmail.com \
    --to=gluedig@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox