All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giacinto Cifelli <gciofono@gmail.com>
To: ofono@ofono.org
Subject: [PATCH v7 7/7] plugins/gemalto: use Gemalto lte atom
Date: Thu, 18 Oct 2018 20:49:52 +0200	[thread overview]
Message-ID: <20181018184952.10797-8-gciofono@gmail.com> (raw)
In-Reply-To: <20181018184952.10797-1-gciofono@gmail.com>

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

Switch from atmodem to gemaltomodem for the lte atom, in order to
benefit from the correct syntax for the AT commands.
The current models included in the Gemalto plugin only use one type
of authentication syntax, despite the atom supporting the syntax for
all Gemalto modules.
Therefore for now the variable GemaltoAuthType is set to a fixed value,
independent on the model.
---
 plugins/gemalto.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/plugins/gemalto.c b/plugins/gemalto.c
index 5d3c77a9..3ca9f2d6 100644
--- a/plugins/gemalto.c
+++ b/plugins/gemalto.c
@@ -63,6 +63,13 @@ static const char *none_prefix[] = { NULL };
 static const char *sctm_prefix[] = { "^SCTM:", NULL };
 static const char *sbv_prefix[] = { "^SBV:", NULL };
 
+enum auth_option {
+	GEMALTO_AUTH_DEFAULTS		= 0x00,
+	GEMALTO_AUTH_USE_SGAUTH		= 0x01,
+	GEMALTO_AUTH_ORDER_PWD_USR	= 0x02,
+	GEMALTO_AUTH_ALW_ALL_PARAMS	= 0x04,
+};
+
 struct gemalto_hardware_monitor {
 	DBusMessage *msg;
 	int32_t temperature;
@@ -609,9 +616,12 @@ static void gemalto_post_sim(struct ofono_modem *modem)
 	ofono_call_meter_create(modem, 0, "atmodem", data->app);
 	ofono_call_barring_create(modem, 0, "atmodem", data->app);
 
-	if (!g_strcmp0(model, GEMALTO_MODEL_ALS3_PLS8x))
-		ofono_lte_create(modem, OFONO_VENDOR_CINTERION,
-						"atmodem", data->app);
+	if (!g_strcmp0(model, GEMALTO_MODEL_ALS3_PLS8x)) {
+		ofono_modem_set_integer(modem, "GemaltoAuthType",
+						GEMALTO_AUTH_USE_SGAUTH |
+						GEMALTO_AUTH_ORDER_PWD_USR);
+		ofono_lte_create(modem, 0, "gemaltomodem", data->app);
+	}
 }
 
 static void gemalto_post_online(struct ofono_modem *modem)
-- 
2.17.1


  parent reply	other threads:[~2018-10-18 18:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 18:49 [PATCH v7 0/7] lte atom auth and IP protocol Giacinto Cifelli
2018-10-18 18:49 ` [PATCH v7 1/7] lte-api: protocol and authentication properties Giacinto Cifelli
2018-10-18 18:49 ` [PATCH v7 2/7] lte.h: added proto and authentication handling Giacinto Cifelli
2018-10-18 18:49 ` [PATCH v7 3/7] lte: protocol and authentication for default ctx Giacinto Cifelli
2018-10-18 18:49 ` [PATCH v7 4/7] atmodem/atutil: shared functions for cgdcont Giacinto Cifelli
2018-10-18 18:49 ` [PATCH v7 5/7] atmodem/lte: proto and authentication handling Giacinto Cifelli
2018-10-18 18:49 ` [PATCH v7 6/7] gemalto/lte: Gemalto vendor lte atom Giacinto Cifelli
2018-10-18 19:32   ` Jonas Bonn
2018-10-18 22:59     ` Slava Monich
2018-10-19  3:21     ` Giacinto Cifelli
2018-10-19  6:04       ` Jonas Bonn
2018-10-20 16:18       ` Denis Kenzior
2018-10-20 16:24         ` Giacinto Cifelli
2018-10-20 16:27           ` Denis Kenzior
2018-10-20 16:29             ` Giacinto Cifelli
2018-10-20 16:13     ` Denis Kenzior
2018-10-18 18:49 ` Giacinto Cifelli [this message]
2018-10-18 19:41   ` [PATCH v7 7/7] plugins/gemalto: use Gemalto " Jonas Bonn
2018-10-19  3:09     ` Giacinto Cifelli
2018-10-19  5:57       ` Jonas Bonn
2018-10-19  6:04         ` Giacinto Cifelli

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=20181018184952.10797-8-gciofono@gmail.com \
    --to=gciofono@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.