Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 0/6] gemalto's ALS3 and PHS8P support
@ 2018-03-15 12:49 Gabriel Lucas
  2018-03-15 12:49 ` [PATCH 1/6] gemalto: add detection of ALS3 modem Gabriel Lucas
                   ` (5 more replies)
  0 siblings, 6 replies; 39+ messages in thread
From: Gabriel Lucas @ 2018-03-15 12:49 UTC (permalink / raw)
  To: ofono

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

This patch serie bring further support to PHS8P modem
and the same level of support for ALS3 modem. Here are
the lists on enhancements:
- ALS3 is detected by Ofono and uses the gemalto plugin
- SIM removing and insertion is supported
- The optional Technology property on NetworkRegistration
is supported
- We ensure that the modem is ready to work before
initializing it

Some of the enhancements are brought by workarounds because
of AT command interface limitations

Gabriel Lucas (4):
  gemalto: add detection of ALS3 modem
  gemalto: support ALS3 in gemalto's plugin
  sim: give access to the driver
  gemalto: fix sim reinsertion issue

Mariem Cherif (2):
  gemalto: acquire the network technology
  gemalto: handle sim is inserted or removed URCs

 drivers/atmodem/network-registration.c |  45 +++++++++
 include/sim.h                          |   2 +
 plugins/gemalto.c                      | 169 +++++++++++++++++++++++++++++++--
 plugins/udevng.c                       |  18 ++++
 src/sim.c                              |   5 +
 5 files changed, 233 insertions(+), 6 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 39+ messages in thread
* [PATCH 3/6] gemalto: acquire the network technology
@ 2018-03-12 13:19 Gabriel Lucas
  0 siblings, 0 replies; 39+ messages in thread
From: Gabriel Lucas @ 2018-03-12 13:19 UTC (permalink / raw)
  To: ofono

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

From: Mariem Cherif <mariem.cherif@ardia.com.tn>

---
 drivers/atmodem/network-registration.c | 45 ++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index a5e2af3..aec9c2d 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -48,6 +48,7 @@ static const char *cops_prefix[] = { "+COPS:", NULL };
 static const char *csq_prefix[] = { "+CSQ:", NULL };
 static const char *cind_prefix[] = { "+CIND:", NULL };
 static const char *cmer_prefix[] = { "+CMER:", NULL };
+static const char *smoni_prefix[] = { "^SMONI:", "", NULL };
 static const char *zpas_prefix[] = { "+ZPAS:", NULL };
 static const char *option_tech_prefix[] = { "_OCTI:", "_OUWCTI:", NULL };
 
@@ -178,6 +179,32 @@ static int option_parse_tech(GAtResult *result)
 	return tech;
 }
 
+static int cinterion_parse_tech(GAtResult *result)
+{
+	int tech = -1;
+	GAtResultIter iter;
+	GSList *l;
+	g_at_result_iter_init(&iter, result);
+	l = result->lines;
+	if (strstr(l->data, "^SMONI: ") != NULL) {
+		gchar **body = g_strsplit(l->data, "^SMONI: ", 2);
+		if (*body != NULL) {
+			gchar **data = g_strsplit(body[1], ",", 20);
+			if (*data != NULL) {
+				if (g_strcmp0(data[0], "2G") == 0) {
+					tech = ACCESS_TECHNOLOGY_GSM;
+				} else if (g_strcmp0 (data[0], "3G") == 0) {
+					tech = ACCESS_TECHNOLOGY_UTRAN;
+				} else if (g_strcmp0 (data[0], "4G") == 0) {
+					tech = ACCESS_TECHNOLOGY_EUTRAN;
+				}
+			}
+			g_strfreev(body);
+		}
+	}
+	return tech;
+}
+
 static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
 {
 	struct cb_data *cbd = user_data;
@@ -205,6 +232,18 @@ static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	cb(&error, status, lac, ci, tech, cbd->data);
 }
 
+static void cinterion_query_tech_cb(gboolean ok, GAtResult *result,
+                                              gpointer user_data)
+{
+	struct tech_query *tq = user_data;
+	int tech;
+
+	tech = cinterion_parse_tech(result);
+
+	ofono_netreg_status_notify(tq->netreg,
+			tq->status, tq->lac, tq->ci, tech);
+}
+
 static void zte_tech_cb(gboolean ok, GAtResult *result, gpointer user_data)
 {
 	struct cb_data *cbd = user_data;
@@ -1518,6 +1557,12 @@ static void creg_notify(GAtResult *result, gpointer user_data)
 					option_query_tech_cb, tq, g_free) > 0)
 			return;
 		break;
+    case OFONO_VENDOR_CINTERION:
+              if (g_at_chat_send(nd->chat, "AT^SMONI",
+                                      smoni_prefix,
+                                      cinterion_query_tech_cb, tq, g_free) > 0)
+                      return;
+              break;
 	}
 
 	g_free(tq);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 39+ messages in thread
* [PATCH 3/6] gemalto: acquire the network technology
@ 2018-03-12 13:12 Gabriel Lucas
  0 siblings, 0 replies; 39+ messages in thread
From: Gabriel Lucas @ 2018-03-12 13:12 UTC (permalink / raw)
  To: ofono

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

From: Mariem Cherif <mariem.cherif@ardia.com.tn>

---
 drivers/atmodem/network-registration.c | 45 ++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index a5e2af3..aec9c2d 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -48,6 +48,7 @@ static const char *cops_prefix[] = { "+COPS:", NULL };
 static const char *csq_prefix[] = { "+CSQ:", NULL };
 static const char *cind_prefix[] = { "+CIND:", NULL };
 static const char *cmer_prefix[] = { "+CMER:", NULL };
+static const char *smoni_prefix[] = { "^SMONI:", "", NULL };
 static const char *zpas_prefix[] = { "+ZPAS:", NULL };
 static const char *option_tech_prefix[] = { "_OCTI:", "_OUWCTI:", NULL };
 
@@ -178,6 +179,32 @@ static int option_parse_tech(GAtResult *result)
 	return tech;
 }
 
+static int cinterion_parse_tech(GAtResult *result)
+{
+	int tech = -1;
+	GAtResultIter iter;
+	GSList *l;
+	g_at_result_iter_init(&iter, result);
+	l = result->lines;
+	if (strstr(l->data, "^SMONI: ") != NULL) {
+		gchar **body = g_strsplit(l->data, "^SMONI: ", 2);
+		if (*body != NULL) {
+			gchar **data = g_strsplit(body[1], ",", 20);
+			if (*data != NULL) {
+				if (g_strcmp0(data[0], "2G") == 0) {
+					tech = ACCESS_TECHNOLOGY_GSM;
+				} else if (g_strcmp0 (data[0], "3G") == 0) {
+					tech = ACCESS_TECHNOLOGY_UTRAN;
+				} else if (g_strcmp0 (data[0], "4G") == 0) {
+					tech = ACCESS_TECHNOLOGY_EUTRAN;
+				}
+			}
+			g_strfreev(body);
+		}
+	}
+	return tech;
+}
+
 static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
 {
 	struct cb_data *cbd = user_data;
@@ -205,6 +232,18 @@ static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	cb(&error, status, lac, ci, tech, cbd->data);
 }
 
+static void cinterion_query_tech_cb(gboolean ok, GAtResult *result,
+                                              gpointer user_data)
+{
+	struct tech_query *tq = user_data;
+	int tech;
+
+	tech = cinterion_parse_tech(result);
+
+	ofono_netreg_status_notify(tq->netreg,
+			tq->status, tq->lac, tq->ci, tech);
+}
+
 static void zte_tech_cb(gboolean ok, GAtResult *result, gpointer user_data)
 {
 	struct cb_data *cbd = user_data;
@@ -1518,6 +1557,12 @@ static void creg_notify(GAtResult *result, gpointer user_data)
 					option_query_tech_cb, tq, g_free) > 0)
 			return;
 		break;
+    case OFONO_VENDOR_CINTERION:
+              if (g_at_chat_send(nd->chat, "AT^SMONI",
+                                      smoni_prefix,
+                                      cinterion_query_tech_cb, tq, g_free) > 0)
+                      return;
+              break;
 	}
 
 	g_free(tq);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 39+ messages in thread
* [PATCH 0/6] gemalto's ALS3 and PHS8P support
@ 2018-03-12 12:57 Gabriel Lucas
  2018-03-12 12:57 ` [PATCH 3/6] gemalto: acquire the network technology Gabriel Lucas
  0 siblings, 1 reply; 39+ messages in thread
From: Gabriel Lucas @ 2018-03-12 12:57 UTC (permalink / raw)
  To: ofono

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

This patch serie bring further support to PHS8P modem
and the same level of support for ALS3 modem. Here are
the lists on enhancements:
- ALS3 is detected by Ofono and uses the gemalto plugin
- SIM removing and insertion is supported
- The optional Technology property on NetworkRegistration
is supported
- We ensure that the modem is ready to work before
initializing it

Some of the enhancements are brought by workarounds because
of AT command interface limitations

Gabriel Lucas (4):
  gemalto: add detection of ALS3 modem
  gemalto: support ALS3 in gemalto's plugin
  sim: give access to the driver
  gemalto: fix sim reinsertion issue

Mariem Cherif (2):
  gemalto: acquire the network technology
  gemalto: handle sim is inserted or removed URCs

 drivers/atmodem/network-registration.c |  45 +++++++++
 include/sim.h                          |   2 +
 plugins/gemalto.c                      | 169 +++++++++++++++++++++++++++++++--
 plugins/udevng.c                       |  18 ++++
 src/sim.c                              |   5 +
 5 files changed, 233 insertions(+), 6 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2018-03-20  8:37 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-15 12:49 [PATCH 0/6] gemalto's ALS3 and PHS8P support Gabriel Lucas
2018-03-15 12:49 ` [PATCH 1/6] gemalto: add detection of ALS3 modem Gabriel Lucas
2018-03-15 17:22   ` Denis Kenzior
2018-03-15 12:49 ` [PATCH 2/6] gemalto: support ALS3 in gemalto's plugin Gabriel Lucas
2018-03-15 17:11   ` Denis Kenzior
2018-03-16 10:30     ` Gabriel Lucas
2018-03-16 14:23       ` Denis Kenzior
2018-03-16 15:53         ` Gabriel Lucas
2018-03-16 15:59           ` Gabriel Lucas
2018-03-16 16:08             ` Gabriel Lucas
2018-03-16 16:08             ` Denis Kenzior
2018-03-19  9:45               ` Gabriel Lucas
2018-03-19 13:50                 ` Denis Kenzior
2018-03-19 15:15                   ` Gabriel Lucas
2018-03-19 15:24                     ` Denis Kenzior
2018-03-15 12:49 ` [PATCH 3/6] gemalto: acquire the network technology Gabriel Lucas
2018-03-15 17:19   ` Denis Kenzior
2018-03-16 12:04     ` Gabriel Lucas
2018-03-16 12:59     ` Gabriel Lucas
2018-03-16 14:27       ` Denis Kenzior
2018-03-16 15:30         ` Gabriel LUCAS
2018-03-15 12:49 ` [PATCH 4/6] gemalto: handle sim is inserted or removed URCs Gabriel Lucas
2018-03-15 17:26   ` Denis Kenzior
2018-03-16 13:28     ` Gabriel Lucas
2018-03-16 14:03       ` Denis Kenzior
2018-03-19 15:57         ` Gabriel Lucas
2018-03-19 16:08           ` Denis Kenzior
2018-03-19 16:26             ` Gabriel Lucas
2018-03-19 17:10               ` Denis Kenzior
2018-03-20  8:37                 ` Gabriel Lucas
2018-03-15 12:49 ` [PATCH 5/6] sim: give access to the driver Gabriel Lucas
2018-03-15 17:27   ` Denis Kenzior
2018-03-15 12:49 ` [PATCH 6/6] gemalto: fix sim reinsertion issue Gabriel Lucas
2018-03-15 17:29   ` Denis Kenzior
2018-03-16 13:30     ` Gabriel Lucas
2018-03-19 16:01     ` Gabriel Lucas
  -- strict thread matches above, loose matches on Subject: below --
2018-03-12 13:19 [PATCH 3/6] gemalto: acquire the network technology Gabriel Lucas
2018-03-12 13:12 Gabriel Lucas
2018-03-12 12:57 [PATCH 0/6] gemalto's ALS3 and PHS8P support Gabriel Lucas
2018-03-12 12:57 ` [PATCH 3/6] gemalto: acquire the network technology Gabriel Lucas

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